From e369069febb9970b5ffb67ca0eac661cd302ac5e Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 4 Feb 2016 16:59:58 +0100 Subject: [PATCH] Rebase against 9c526b41314359c52954f7f367cb9d7b4a26c3ac. --- patches/patchinstall.sh | 2 +- ...e-the-new-window-is-set-up-before-se.patch | 18 +- .../wined3d-CSMT_Main/9999-IfDefined.patch | 264 +++++++++--------- 3 files changed, 142 insertions(+), 142 deletions(-) diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 5203ef80..0d6f270e 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "44f2589e7c239243b587e2d7ff92f4cdde61c3b6" + echo "9c526b41314359c52954f7f367cb9d7b4a26c3ac" } # Show version information diff --git a/patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch b/patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch index 21320cb0..d1f97e0b 100644 --- a/patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch +++ b/patches/wined3d-CSMT_Main/0155-wined3d-Make-sure-the-new-window-is-set-up-before-se.patch @@ -1,4 +1,4 @@ -From cc06aee370abd3cb1d9cd3ff52a8859c7810fcd7 Mon Sep 17 00:00:00 2001 +From 003aabc11ecba217dbf01cd479a9b4b9a9ec4464 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Fri, 29 Aug 2014 14:46:19 +0200 Subject: wined3d: Make sure the new window is set up before setting up a @@ -9,10 +9,10 @@ Subject: wined3d: Make sure the new window is set up before setting up a 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 0173d18..3ae0091 100644 +index 1f02518..f5bc02a 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4454,6 +4454,27 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4570,6 +4570,27 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } } @@ -40,7 +40,7 @@ index 0173d18..3ae0091 100644 TRACE("New params:\n"); TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width); TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height); -@@ -4580,11 +4601,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4696,11 +4717,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, swapchain_desc->multisample_type, swapchain_desc->multisample_quality))) return hr; @@ -52,7 +52,7 @@ index 0173d18..3ae0091 100644 if (swapchain->desc.enable_auto_depth_stencil) { struct wined3d_resource_desc texture_desc; -@@ -4627,11 +4643,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4742,11 +4758,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view); } @@ -61,9 +61,9 @@ index 0173d18..3ae0091 100644 - wined3d_rendertarget_view_decref(device->back_buffer_view); - device->back_buffer_view = NULL; - } - if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface( - surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)), - NULL, &wined3d_null_parent_ops, &device->back_buffer_view))) + if (swapchain->desc.backbuffer_count) + { + view_desc.format_id = swapchain_desc->backbuffer_format; -- -2.5.1 +2.7.0 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 86d295ae..538c76df 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -70,7 +70,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader shader_arb_ps_local_constants(compiled, context, state, rt_height); } -@@ -7872,7 +7880,11 @@ +@@ -7873,7 +7881,11 @@ /* Now load the surface */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO @@ -82,7 +82,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader == WINED3D_LOCATION_DRAWABLE && !wined3d_resource_is_offscreen(&src_surface->container->resource)) { -@@ -7910,6 +7922,7 @@ +@@ -7911,6 +7923,7 @@ /* Leave the opengl state valid for blitting */ arbfp_blit_unset(context->gl_info); @@ -90,7 +90,7 @@ diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader if (wined3d_settings.cs_multithreaded) context->gl_info->gl_ops.gl.p_glFinish(); else if (wined3d_settings.strict_draw_ordering -@@ -7921,6 +7934,17 @@ +@@ -7922,6 +7935,17 @@ wined3d_resource_validate_location(&dst_surface->resource, dst_surface->container->resource.draw_binding); wined3d_resource_invalidate_location(&dst_surface->resource, ~dst_surface->container->resource.draw_binding); @@ -2379,7 +2379,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (FAILED(hr = device->shader_backend->shader_alloc_private(device, device->adapter->vertex_pipe, device->adapter->fragment_pipe))) { -@@ -992,8 +1055,16 @@ +@@ -1000,8 +1063,16 @@ device->swapchains[0] = swapchain; device_init_swapchain_state(device, swapchain); @@ -2396,7 +2396,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->contexts[0]->last_was_rhw = 0; -@@ -1005,7 +1076,11 @@ +@@ -1013,7 +1084,11 @@ case ORM_BACKBUFFER: { @@ -2408,7 +2408,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { TRACE("Using auxiliary buffer for offscreen rendering\n"); device->offscreenBuffer = GL_AUX0; -@@ -1017,9 +1092,16 @@ +@@ -1025,9 +1100,16 @@ } } } @@ -2425,7 +2425,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Clear the screen */ if (swapchain->back_buffers && swapchain->back_buffers[0]) -@@ -1036,6 +1118,9 @@ +@@ -1044,6 +1126,9 @@ return WINED3D_OK; err_out: @@ -2435,7 +2435,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c HeapFree(GetProcessHeap(), 0, device->swapchains); device->swapchain_count = 0; if (device->back_buffer_view) -@@ -1093,6 +1178,10 @@ +@@ -1101,6 +1186,10 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) { struct wined3d_resource *resource, *cursor; @@ -2446,7 +2446,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c struct wined3d_surface *surface; UINT i; -@@ -1101,6 +1190,7 @@ +@@ -1109,6 +1198,7 @@ if (!device->d3d_initialized) return WINED3DERR_INVALIDCALL; @@ -2454,7 +2454,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (wined3d_settings.cs_multithreaded) device->cs->ops->finish(device->cs); -@@ -1139,6 +1229,83 @@ +@@ -1147,6 +1237,83 @@ /* FIXME: Is this in the right place??? */ wined3d_cs_emit_delete_opengl_contexts(device->cs, device->swapchains[0]); @@ -2538,7 +2538,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (device->back_buffer_view) { wined3d_rendertarget_view_decref(device->back_buffer_view); -@@ -1156,6 +1323,11 @@ +@@ -1164,6 +1331,11 @@ device->swapchains = NULL; device->swapchain_count = 0; @@ -2550,7 +2550,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->d3d_initialized = FALSE; return WINED3D_OK; -@@ -1542,6 +1714,16 @@ +@@ -1550,6 +1722,16 @@ TRACE("... Range(%f), Falloff(%f), Theta(%f), Phi(%f)\n", light->range, light->falloff, light->theta, light->phi); @@ -2567,7 +2567,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Save away the information. */ object->OriginalParms = *light; -@@ -1621,9 +1803,11 @@ +@@ -1629,9 +1811,11 @@ FIXME("Unrecognized light type %#x.\n", light->type); } @@ -2579,7 +2579,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -1696,6 +1880,14 @@ +@@ -1704,6 +1888,14 @@ { if (light_info->glIndex != -1) { @@ -2594,7 +2594,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->update_state->lights[light_info->glIndex] = NULL; light_info->glIndex = -1; } -@@ -1737,11 +1929,23 @@ +@@ -1745,11 +1937,23 @@ WARN("Too many concurrently active lights\n"); return WINED3D_OK; } @@ -2618,7 +2618,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -1916,9 +2120,11 @@ +@@ -1924,9 +2128,11 @@ TRACE("device %p, base_index %d.\n", device, base_index); device->update_state->base_vertex_index = base_index; @@ -2630,7 +2630,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } INT CDECL wined3d_device_get_base_vertex_index(const struct wined3d_device *device) -@@ -1964,7 +2170,11 @@ +@@ -1972,7 +2178,11 @@ || !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH)) return; surface = surface_from_resource(texture->sub_resources[0]); @@ -2642,7 +2642,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return; SetRect(&dst_rect, 0, 0, surface->resource.width, surface->resource.height); -@@ -2293,7 +2503,11 @@ +@@ -2301,7 +2511,11 @@ return device->state.sampler[WINED3D_SHADER_TYPE_VERTEX][idx]; } @@ -2654,7 +2654,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { UINT i; -@@ -2326,8 +2540,12 @@ +@@ -2334,8 +2548,12 @@ } else { @@ -2667,7 +2667,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2374,8 +2592,12 @@ +@@ -2382,8 +2600,12 @@ } else { @@ -2680,7 +2680,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2426,8 +2648,13 @@ +@@ -2434,8 +2656,13 @@ memset(device->recording->changed.vertexShaderConstantsF + start_register, 1, sizeof(*device->recording->changed.vertexShaderConstantsF) * vector4f_count); else @@ -2694,7 +2694,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -2562,8 +2789,12 @@ +@@ -2570,8 +2797,12 @@ } else { @@ -2707,7 +2707,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2610,8 +2841,12 @@ +@@ -2618,8 +2849,12 @@ } else { @@ -2720,7 +2720,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2663,8 +2898,12 @@ +@@ -2671,8 +2906,12 @@ memset(device->recording->changed.pixelShaderConstantsF + start_register, 1, sizeof(*device->recording->changed.pixelShaderConstantsF) * vector4f_count); else @@ -2733,7 +2733,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -2824,6 +3063,7 @@ +@@ -2832,6 +3071,7 @@ return hr; } @@ -2741,7 +2741,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (wined3d_settings.cs_multithreaded) { FIXME("Waiting for cs.\n"); -@@ -2831,6 +3071,7 @@ +@@ -2839,6 +3079,7 @@ device->cs->ops->finish(device->cs); } @@ -2749,7 +2749,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_device_get_transform(device, WINED3D_TS_VIEW, &view_mat); wined3d_device_get_transform(device, WINED3D_TS_PROJECTION, &proj_mat); wined3d_device_get_transform(device, WINED3D_TS_WORLD_MATRIX(0), &world_mat); -@@ -3316,6 +3557,10 @@ +@@ -3324,6 +3565,10 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) { @@ -2760,7 +2760,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p.\n", device); if (!device->inScene) -@@ -3324,6 +3569,15 @@ +@@ -3332,6 +3577,15 @@ return WINED3DERR_INVALIDCALL; } @@ -2776,7 +2776,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->inScene = FALSE; return WINED3D_OK; } -@@ -3331,8 +3585,10 @@ +@@ -3339,8 +3593,10 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) { @@ -2787,7 +2787,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, rect_count %u, rects %p, flags %#x, color {%.8e, %.8e, %.8e, %.8e}, depth %.8e, stencil %u.\n", device, rect_count, rects, flags, color->r, color->g, color->b, color->a, depth, stencil); -@@ -3341,12 +3597,19 @@ +@@ -3349,12 +3605,19 @@ WARN("Rects is %p, but rect_count is 0, ignoring clear\n", rects); return WINED3D_OK; } @@ -2807,7 +2807,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (!ds) { WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n"); -@@ -3355,8 +3618,13 @@ +@@ -3363,8 +3626,13 @@ } else if (flags & WINED3DCLEAR_TARGET) { @@ -2821,7 +2821,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { WARN("Silently ignoring depth and target clear with mismatching sizes\n"); return WINED3D_OK; -@@ -3402,6 +3670,9 @@ +@@ -3410,6 +3678,9 @@ enum wined3d_primitive_type primitive_type) { GLenum gl_primitive_type, prev; @@ -2831,7 +2831,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, primitive_type %s\n", device, debug_d3dprimitivetype(primitive_type)); gl_primitive_type = gl_primitive_type_from_d3d(primitive_type); -@@ -3409,8 +3680,13 @@ +@@ -3417,8 +3688,13 @@ device->update_state->gl_primitive_type = gl_primitive_type; if (device->recording) device->recording->changed.primitive_type = TRUE; @@ -2845,7 +2845,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } void CDECL wined3d_device_get_primitive_type(const struct wined3d_device *device, -@@ -3433,6 +3709,14 @@ +@@ -3441,6 +3717,14 @@ return WINED3DERR_INVALIDCALL; } @@ -2860,7 +2860,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_draw(device->cs, start_vertex, vertex_count, 0, 0, FALSE); return WINED3D_OK; -@@ -3449,6 +3733,10 @@ +@@ -3457,6 +3741,10 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count) { @@ -2871,7 +2871,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, start_idx %u, index_count %u.\n", device, start_idx, index_count); if (!device->state.index_buffer) -@@ -3467,6 +3755,15 @@ +@@ -3475,6 +3763,15 @@ return WINED3DERR_INVALIDCALL; } @@ -2887,7 +2887,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_draw(device->cs, start_idx, index_count, 0, 0, TRUE); return WINED3D_OK; -@@ -3482,6 +3779,7 @@ +@@ -3490,6 +3787,7 @@ } /* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */ @@ -2895,7 +2895,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c static void device_update_volume(struct wined3d_context *context, struct wined3d_volume *src_volume, struct wined3d_volume *dst_volume) { -@@ -3521,6 +3819,97 @@ +@@ -3529,6 +3827,97 @@ enum wined3d_resource_type type = src_texture->resource.type; layer_count = src_texture->layer_count; @@ -2993,7 +2993,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c level_count = min(wined3d_texture_get_level_count(src_texture), wined3d_texture_get_level_count(dst_texture)); -@@ -3538,7 +3927,13 @@ +@@ -3546,7 +3935,13 @@ } /* Make sure that the destination texture is loaded. */ @@ -3007,7 +3007,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Update every surface level of the texture. */ switch (type) -@@ -3558,7 +3953,15 @@ +@@ -3566,7 +3961,15 @@ i * src_levels + j + src_skip_levels)); dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i * dst_levels + j)); @@ -3023,7 +3023,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } } break; -@@ -3568,6 +3971,7 @@ +@@ -3576,6 +3979,7 @@ { for (i = 0; i < level_count; ++i) { @@ -3031,7 +3031,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device_update_volume(context, volume_from_resource(wined3d_texture_get_sub_resource(src_texture, i + src_skip_levels)), -@@ -3629,6 +4033,25 @@ +@@ -3637,6 +4041,25 @@ } wined3d_cs_emit_update_texture(device->cs, src_texture, dst_texture); @@ -3057,7 +3057,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -3678,8 +4101,13 @@ +@@ -3686,8 +4109,13 @@ if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_STENCILENABLE]) { @@ -3071,7 +3071,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -3778,6 +4206,7 @@ +@@ -3786,6 +4214,7 @@ struct wined3d_surface *src_surface, const RECT *src_rect, struct wined3d_surface *dst_surface, const POINT *dst_point) { @@ -3079,7 +3079,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c const struct wined3d_format *src_format = src_surface->resource.format; const struct wined3d_format *dst_format = dst_surface->resource.format; UINT update_w, update_h; -@@ -3785,6 +4214,7 @@ +@@ -3793,6 +4222,7 @@ RECT r, dst_rect; POINT p; @@ -3087,7 +3087,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, src_surface %p, src_rect %s, dst_surface %p, dst_point %s.\n", device, src_surface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_point(dst_point)); -@@ -3796,6 +4226,7 @@ +@@ -3804,6 +4234,7 @@ return WINED3DERR_INVALIDCALL; } @@ -3095,7 +3095,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (src_format->id != dst_format->id) { WARN("Source and destination surfaces should have the same format.\n"); -@@ -3860,6 +4291,9 @@ +@@ -3868,6 +4299,9 @@ wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point); return WINED3D_OK; @@ -3105,7 +3105,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } void CDECL wined3d_device_copy_resource(struct wined3d_device *device, -@@ -4036,7 +4470,17 @@ +@@ -4044,7 +4478,17 @@ unsigned int depth_pitch) { struct wined3d_resource *sub_resource; @@ -3123,7 +3123,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, resource %p, sub_resource_idx %u, box %p, data %p, row_pitch %u, depth_pitch %u.\n", device, resource, sub_resource_idx, box, data, row_pitch, depth_pitch); -@@ -4070,7 +4514,14 @@ +@@ -4078,7 +4522,14 @@ WARN("Invalid sub_resource_idx %u.\n", sub_resource_idx); return; } @@ -3138,7 +3138,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (box) { if (box->left >= box->right || box->right > sub_resource->width -@@ -4081,9 +4532,47 @@ +@@ -4089,9 +4540,47 @@ box->left, box->top, box->front, box->right, box->bottom, box->back); return; } @@ -3186,7 +3186,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } HRESULT CDECL wined3d_device_clear_rendertarget_view(struct wined3d_device *device, -@@ -4114,8 +4603,14 @@ +@@ -4122,8 +4611,14 @@ rect = &r; } @@ -3201,7 +3201,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(const struct wined3d_device *device, -@@ -4129,6 +4624,7 @@ +@@ -4137,6 +4632,7 @@ return NULL; } @@ -3209,7 +3209,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return device->state.fb.render_targets[view_idx]; } -@@ -4144,6 +4640,22 @@ +@@ -4152,6 +4648,22 @@ { struct wined3d_rendertarget_view *prev; struct wined3d_fb_state *fb = &device->state.fb; @@ -3232,7 +3232,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); -@@ -4183,6 +4695,7 @@ +@@ -4191,6 +4703,7 @@ } @@ -3240,7 +3240,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c prev = fb->render_targets[view_idx]; if (view == prev) return WINED3D_OK; -@@ -4190,6 +4703,15 @@ +@@ -4198,6 +4711,15 @@ if (view) wined3d_rendertarget_view_incref(view); fb->render_targets[view_idx] = view; @@ -3256,7 +3256,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_set_rendertarget_view(device->cs, view_idx, view); /* Release after the assignment, to prevent device_resource_released() * from seeing the surface as still in use. */ -@@ -4201,6 +4723,7 @@ +@@ -4209,6 +4731,7 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view) { @@ -3264,7 +3264,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c struct wined3d_fb_state *fb = &device->state.fb; struct wined3d_rendertarget_view *prev; -@@ -4218,6 +4741,66 @@ +@@ -4226,6 +4749,66 @@ wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) wined3d_rendertarget_view_decref(prev); @@ -3331,7 +3331,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } HRESULT CDECL wined3d_device_set_cursor_properties(struct wined3d_device *device, -@@ -4238,6 +4821,14 @@ +@@ -4246,6 +4829,14 @@ cursor_image = surface_from_resource(sub_resource); @@ -3346,7 +3346,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (cursor_image->resource.format->id != WINED3DFMT_B8G8R8A8_UNORM) { WARN("Surface %p has an invalid format %s.\n", -@@ -4265,6 +4856,13 @@ +@@ -4273,6 +4864,13 @@ * release it after setting the cursor image. Windows doesn't * addref the set surface, so we can't do this either without * creating circular refcount dependencies. */ @@ -3360,7 +3360,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (cursor_image->resource.width == 32 && cursor_image->resource.height == 32) { -@@ -4369,6 +4967,12 @@ +@@ -4377,6 +4975,12 @@ else SetCursor(NULL); } @@ -3373,7 +3373,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return oldVisible; } -@@ -4379,8 +4983,10 @@ +@@ -4387,8 +4991,10 @@ TRACE("device %p.\n", device); @@ -3384,7 +3384,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Checking resource %p for eviction.\n", resource); -@@ -4388,6 +4994,7 @@ +@@ -4396,6 +5002,7 @@ if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count) { TRACE("Evicting %p.\n", resource); @@ -3392,7 +3392,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_evict_resource(device->cs, resource); } } -@@ -4406,6 +5013,37 @@ +@@ -4414,6 +5021,37 @@ context = context_acquire(device, NULL); gl_info = context->gl_info; @@ -3430,7 +3430,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (device->depth_blt_texture) { -@@ -4427,6 +5065,7 @@ +@@ -4435,6 +5073,7 @@ HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; @@ -3438,7 +3438,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c swapchain->num_contexts = 0; } -@@ -4446,6 +5085,14 @@ +@@ -4454,6 +5093,14 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { @@ -3453,7 +3453,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c HRESULT hr; if (FAILED(hr = device->shader_backend->shader_alloc_private(device, -@@ -4462,6 +5109,7 @@ +@@ -4470,6 +5117,7 @@ return hr; } @@ -3461,7 +3461,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c hr = wined3d_cs_emit_create_swapchain_context(device->cs, swapchain); if (FAILED(hr)) { -@@ -4472,6 +5120,35 @@ +@@ -4480,6 +5128,35 @@ } wined3d_cs_emit_create_dummy_textures(device->cs); @@ -3497,7 +3497,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -4490,9 +5167,11 @@ +@@ -4499,9 +5176,11 @@ TRACE("device %p, swapchain_desc %p, mode %p, callback %p, reset_state %#x.\n", device, swapchain_desc, mode, callback, reset_state); @@ -3509,7 +3509,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (!(swapchain = wined3d_device_get_swapchain(device, 0))) { ERR("Failed to get the first implicit swapchain.\n"); -@@ -4507,9 +5186,21 @@ +@@ -4516,9 +5195,21 @@ wined3d_texture_decref(device->logo_texture); device->logo_texture = NULL; } @@ -3531,7 +3531,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4518,6 +5209,7 @@ +@@ -4527,6 +5218,7 @@ } wined3d_device_set_depth_stencil_view(device, NULL); @@ -3539,7 +3539,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (reset_state) { state_unbind_resources(&device->state); -@@ -4527,6 +5219,12 @@ +@@ -4536,6 +5228,12 @@ { wined3d_texture_decref(device->cs->onscreen_depth_stencil->container); device->cs->onscreen_depth_stencil = NULL; @@ -3552,7 +3552,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } if (reset_state) -@@ -4539,6 +5237,7 @@ +@@ -4548,6 +5246,7 @@ } } @@ -3560,7 +3560,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Free implicit resources and wait for the command stream before modifying * swapchain parameters. After modifying the swapchain parameters a new GL * context may be acquired by the worker thread. This causes problems in the -@@ -4560,6 +5259,7 @@ +@@ -4569,6 +5268,7 @@ } device->cs->ops->finish(device->cs); @@ -3568,7 +3568,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c TRACE("New params:\n"); TRACE("backbuffer_width %u\n", swapchain_desc->backbuffer_width); TRACE("backbuffer_height %u\n", swapchain_desc->backbuffer_height); -@@ -4686,6 +5386,13 @@ +@@ -4695,6 +5395,13 @@ swapchain_desc->multisample_type, swapchain_desc->multisample_quality))) return hr; @@ -3582,7 +3582,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (swapchain->desc.enable_auto_depth_stencil) { struct wined3d_resource_desc texture_desc; -@@ -4728,6 +5435,13 @@ +@@ -4736,6 +5443,13 @@ wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view); } @@ -3593,10 +3593,10 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c + device->back_buffer_view = NULL; + } +#endif /* STAGING_CSMT */ - if (swapchain->desc.backbuffer_count && FAILED(hr = wined3d_rendertarget_view_create_from_surface( - surface_from_resource(wined3d_texture_get_sub_resource(swapchain->back_buffers[0], 0)), - NULL, &wined3d_null_parent_ops, &device->back_buffer_view))) -@@ -4748,12 +5462,20 @@ + if (swapchain->desc.backbuffer_count) + { + view_desc.format_id = swapchain_desc->backbuffer_format; +@@ -4762,12 +5476,20 @@ } wined3d_cs_emit_reset_state(device->cs); state_cleanup(&device->state); @@ -3617,7 +3617,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) ERR("Failed to initialize device state, hr %#x.\n", hr); device->update_state = &device->state; -@@ -4762,6 +5484,7 @@ +@@ -4776,6 +5498,7 @@ } else if (device->back_buffer_view) { @@ -3625,7 +3625,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c struct wined3d_state *state = &device->state; wined3d_device_set_rendertarget_view(device, 0, device->back_buffer_view, FALSE); -@@ -4777,6 +5500,24 @@ +@@ -4791,6 +5514,24 @@ state->scissor_rect.left = 0; state->scissor_rect.right = swapchain->desc.backbuffer_width; state->scissor_rect.bottom = swapchain->desc.backbuffer_height; @@ -3650,7 +3650,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -4852,6 +5593,10 @@ +@@ -4866,6 +5607,10 @@ TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type)); @@ -3661,7 +3661,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c switch (type) { case WINED3D_RTYPE_SURFACE: -@@ -4862,6 +5607,7 @@ +@@ -4876,6 +5621,7 @@ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -3669,7 +3669,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (wined3d_rendertarget_view_get_surface(device->state.fb.render_targets[i]) == surface) { ERR("Surface %p is still in use as render target %u.\n", surface, i); -@@ -4873,6 +5619,19 @@ +@@ -4887,6 +5633,19 @@ { ERR("Surface %p is still in use as depth/stencil buffer.\n", surface); device->state.fb.depth_stencil = NULL; @@ -3689,7 +3689,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } } break; -@@ -5034,7 +5793,11 @@ +@@ -5048,7 +5807,11 @@ device->blitter = adapter->blitter; @@ -3701,7 +3701,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c &adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) { ERR("Failed to initialize device state, hr %#x.\n", hr); -@@ -5133,6 +5896,7 @@ +@@ -5147,6 +5910,7 @@ else return CallWindowProcA(proc, window, message, wparam, lparam); } @@ -3709,7 +3709,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Context activation is done by the caller */ struct wined3d_gl_bo *wined3d_device_get_bo(struct wined3d_device *device, UINT size, GLenum gl_usage, -@@ -5186,3 +5950,4 @@ +@@ -5200,3 +5964,4 @@ wined3d_device_destroy_bo(device, context, bo); } @@ -4671,7 +4671,7 @@ diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -2072,7 +2072,11 @@ +@@ -2073,7 +2073,11 @@ } } @@ -4683,7 +4683,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c { HeapFree(GetProcessHeap(), 0, shader->output_signature.elements); HeapFree(GetProcessHeap(), 0, shader->input_signature.elements); -@@ -2331,10 +2335,16 @@ +@@ -2332,10 +2336,16 @@ if (!refcount) { @@ -4700,7 +4700,7 @@ diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c } return refcount; -@@ -2617,7 +2627,11 @@ +@@ -2618,7 +2628,11 @@ memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ if (!gl_info->supported[ARB_FRAMEBUFFER_SRGB] && state->render_states[WINED3D_RS_SRGBWRITEENABLE]) { @@ -9147,7 +9147,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1103,9 +1133,14 @@ +@@ -1104,9 +1134,14 @@ WORD use_map; /* MAX_ATTRIBS, 16 */ }; @@ -9162,7 +9162,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD get_flexible_vertex_size(DWORD d3dvtVertexType) DECLSPEC_HIDDEN; #define eps 1e-8f -@@ -1193,8 +1228,10 @@ +@@ -1194,8 +1229,10 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -9173,7 +9173,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1230,6 +1267,7 @@ +@@ -1231,6 +1268,7 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -9181,7 +9181,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT64 timestamp; }; -@@ -1265,6 +1303,12 @@ +@@ -1266,6 +1304,12 @@ for (i = 0; i < min(dst->rt_size, src->rt_size); i++) dst->render_targets[i] = src->render_targets[i]; } @@ -9194,7 +9194,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { -@@ -1280,7 +1324,9 @@ +@@ -1281,7 +1325,9 @@ DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ @@ -9204,7 +9204,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1378,8 +1424,17 @@ +@@ -1379,8 +1425,17 @@ GLfloat fog_coord_value; GLfloat color[4], fogstart, fogend, fogcolor[4]; GLuint dummy_arbfp_prog; @@ -9222,7 +9222,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); -@@ -1522,8 +1577,12 @@ +@@ -1523,8 +1578,12 @@ void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN; BOOL context_apply_clear_state(struct wined3d_context *context, const struct wined3d_device *device, UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; @@ -9235,7 +9235,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void context_apply_fbo_state_blit(struct wined3d_context *context, GLenum target, struct wined3d_surface *render_target, struct wined3d_surface *depth_stencil, DWORD location) DECLSPEC_HIDDEN; void context_active_texture(struct wined3d_context *context, const struct wined3d_gl_info *gl_info, -@@ -2106,7 +2165,11 @@ +@@ -2107,7 +2166,11 @@ struct wined3d_state { DWORD flags; @@ -9247,7 +9247,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2151,6 +2214,7 @@ +@@ -2152,6 +2215,7 @@ DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; @@ -9255,7 +9255,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_bo { GLuint name; -@@ -2159,6 +2223,7 @@ +@@ -2160,6 +2224,7 @@ UINT size; }; @@ -9263,7 +9263,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h #define WINED3D_UNMAPPED_STAGE ~0U /* Multithreaded flag. Removed from the public header to signal that -@@ -2214,11 +2279,23 @@ +@@ -2215,11 +2280,23 @@ struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -9287,7 +9287,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* For rendering to a texture using glCopyTexImage */ GLuint depth_blt_texture; -@@ -2229,6 +2306,9 @@ +@@ -2230,6 +2307,9 @@ UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; @@ -9297,7 +9297,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HCURSOR hardwareCursor; /* The Wine logo texture */ -@@ -2263,6 +2343,7 @@ +@@ -2264,6 +2344,7 @@ UINT message, WPARAM wparam, LPARAM lparam, WNDPROC proc) DECLSPEC_HIDDEN; void device_resource_add(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; void device_resource_released(struct wined3d_device *device, struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9305,7 +9305,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN; void device_invalidate_shader_constants(const struct wined3d_device *device, DWORD mask) DECLSPEC_HIDDEN; void device_exec_update_texture(struct wined3d_context *context, struct wined3d_texture *src_texture, -@@ -2275,6 +2356,11 @@ +@@ -2276,6 +2357,11 @@ void device_create_default_sampler(struct wined3d_device *device); void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -9317,7 +9317,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h static inline BOOL isStateDirty(const struct wined3d_context *context, DWORD state) { -@@ -2294,9 +2380,11 @@ +@@ -2295,9 +2381,11 @@ HRESULT (*resource_sub_resource_map)(struct wined3d_resource *resource, unsigned int sub_resource_idx, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags); HRESULT (*resource_sub_resource_unmap)(struct wined3d_resource *resource, unsigned int sub_resource_idx); @@ -9329,7 +9329,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_resource -@@ -2321,6 +2409,7 @@ +@@ -2322,6 +2410,7 @@ UINT depth; UINT size; DWORD priority; @@ -9337,7 +9337,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *heap_memory, *map_heap_memory, *user_memory, *bitmap_data; UINT custom_row_pitch, custom_slice_pitch; struct wined3d_gl_bo *buffer, *map_buffer; -@@ -2328,6 +2417,10 @@ +@@ -2329,6 +2418,10 @@ DWORD locations; LONG access_fence; BOOL unmap_dirtify; @@ -9348,7 +9348,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *parent; const struct wined3d_parent_ops *parent_ops; -@@ -2352,6 +2445,7 @@ +@@ -2353,6 +2446,7 @@ void *parent, const struct wined3d_parent_ops *parent_ops, const struct wined3d_resource_ops *resource_ops) DECLSPEC_HIDDEN; void resource_unload(struct wined3d_resource *resource) DECLSPEC_HIDDEN; @@ -9356,7 +9356,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h DWORD wined3d_resource_access_from_location(DWORD location) DECLSPEC_HIDDEN; BOOL wined3d_resource_allocate_sysmem(struct wined3d_resource *resource) DECLSPEC_HIDDEN; void wined3d_resource_changed(struct wined3d_resource *resource, -@@ -2400,6 +2494,15 @@ +@@ -2401,6 +2495,15 @@ { while(InterlockedCompareExchange(&resource->access_fence, 0, 0)); } @@ -9372,7 +9372,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Tests show that the start address of resources is 32 byte aligned */ #define RESOURCE_ALIGNMENT 16 -@@ -2484,7 +2587,9 @@ +@@ -2485,7 +2588,9 @@ void wined3d_texture_apply_sampler_desc(struct wined3d_texture *texture, const struct wined3d_sampler_desc *sampler_desc, const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN; @@ -9382,7 +9382,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_bind(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, -@@ -2516,8 +2621,15 @@ +@@ -2517,8 +2622,15 @@ struct wined3d_resource resource; struct wined3d_texture *container; @@ -9398,7 +9398,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; static inline struct wined3d_volume *volume_from_resource(struct wined3d_resource *resource) -@@ -2525,6 +2637,7 @@ +@@ -2526,6 +2638,7 @@ return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } @@ -9406,7 +9406,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_volume_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, unsigned int level, struct wined3d_volume **volume) DECLSPEC_HIDDEN; void wined3d_volume_destroy(struct wined3d_volume *volume) DECLSPEC_HIDDEN; -@@ -2540,6 +2653,27 @@ +@@ -2541,6 +2654,27 @@ struct wined3d_surface_dib { HBITMAP DIBsection; @@ -9434,7 +9434,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT bitmap_size; }; -@@ -2565,7 +2699,11 @@ +@@ -2566,7 +2700,11 @@ struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -9446,7 +9446,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_surface -@@ -2573,12 +2711,26 @@ +@@ -2574,12 +2712,26 @@ struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; @@ -9473,7 +9473,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; GLenum texture_target; -@@ -2626,11 +2778,22 @@ +@@ -2627,11 +2779,22 @@ GLenum surface_get_gl_buffer(const struct wined3d_surface *surface) DECLSPEC_HIDDEN; void surface_get_drawable_size(const struct wined3d_surface *surface, const struct wined3d_context *context, unsigned int *width, unsigned int *height) DECLSPEC_HIDDEN; @@ -9496,7 +9496,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_surface_map(struct wined3d_surface *surface, struct wined3d_map_desc *map_desc, const struct wined3d_box *box, DWORD flags) DECLSPEC_HIDDEN; void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; -@@ -2645,6 +2808,7 @@ +@@ -2646,6 +2809,7 @@ const struct wined3d_gl_info *gl_info, void *mem, unsigned int pitch) DECLSPEC_HIDDEN; HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const POINT *dst_point, struct wined3d_surface *src_surface, const RECT *src_rect) DECLSPEC_HIDDEN; @@ -9504,7 +9504,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_surface_create(struct wined3d_texture *container, const struct wined3d_resource_desc *desc, GLenum target, unsigned int level, unsigned int layer, DWORD flags, struct wined3d_surface **surface) DECLSPEC_HIDDEN; -@@ -2659,6 +2823,17 @@ +@@ -2660,6 +2824,17 @@ void wined3d_surface_cleanup_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_getdc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_surface_releasedc_cs(struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -9522,7 +9522,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -2679,8 +2854,10 @@ +@@ -2680,8 +2855,10 @@ GLuint name; }; @@ -9533,7 +9533,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration_element { const struct wined3d_format *format; -@@ -2709,8 +2886,10 @@ +@@ -2710,8 +2887,10 @@ BOOL half_float_conv_needed; }; @@ -9544,7 +9544,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_saved_states { DWORD transform[(HIGHEST_TRANSFORMSTATE >> 5) + 1]; -@@ -2778,6 +2957,7 @@ +@@ -2779,6 +2958,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9552,7 +9552,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT state_init(struct wined3d_state *state, const struct wined3d_gl_info *gl_info, const struct wined3d_d3d_info *d3d_info, DWORD flags) DECLSPEC_HIDDEN; void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; -@@ -2828,6 +3008,32 @@ +@@ -2829,6 +3009,32 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; void wined3d_cs_switch_onscreen_ds(struct wined3d_cs *cs, struct wined3d_context *context, struct wined3d_surface *depth_stencil) DECLSPEC_HIDDEN; @@ -9585,7 +9585,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) DECLSPEC_HIDDEN; -@@ -2877,6 +3083,7 @@ +@@ -2878,6 +3084,7 @@ void wined3d_cs_emit_set_vertex_declaration(struct wined3d_cs *cs, struct wined3d_vertex_declaration *declaration) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_viewport(struct wined3d_cs *cs, const struct wined3d_viewport *viewport) DECLSPEC_HIDDEN; @@ -9593,7 +9593,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_consts_f(struct wined3d_cs *cs, UINT start_register, const float *constants, UINT vector4f_count, enum wined3d_shader_type type) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_consts_b(struct wined3d_cs *cs, UINT start_register, -@@ -2939,6 +3146,7 @@ +@@ -2940,6 +3147,7 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int depth_pitch) DECLSPEC_HIDDEN; @@ -9601,7 +9601,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Direct3D terminology with little modifications. We do not have an issued state * because only the driver knows about it, but we have a created state because d3d -@@ -2953,8 +3161,12 @@ +@@ -2954,8 +3162,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -9614,7 +9614,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2968,12 +3180,16 @@ +@@ -2969,12 +3181,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -9631,7 +9631,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* TODO: Add tests and support for FLOAT16_4 POSITIONT, D3DCOLOR position, other * fixed function semantics as D3DCOLOR or FLOAT16 */ -@@ -3000,7 +3216,9 @@ +@@ -3001,7 +3217,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -9641,7 +9641,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -3025,11 +3243,15 @@ +@@ -3026,11 +3244,15 @@ BYTE *buffer_get_sysmem(struct wined3d_buffer *This, struct wined3d_context *context) DECLSPEC_HIDDEN; void buffer_internal_preload(struct wined3d_buffer *buffer, struct wined3d_context *context, const struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -9657,7 +9657,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HRESULT wined3d_buffer_upload_data(struct wined3d_buffer *buffer, const struct wined3d_box *box, const void *data) DECLSPEC_HIDDEN; -@@ -3067,8 +3289,10 @@ +@@ -3068,8 +3290,10 @@ return surface_from_resource(resource); } @@ -9668,7 +9668,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -3081,8 +3305,12 @@ +@@ -3082,8 +3306,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -9681,7 +9681,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -3121,8 +3349,10 @@ +@@ -3122,8 +3350,10 @@ void swapchain_destroy_contexts(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -9692,7 +9692,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3325,7 +3555,9 @@ +@@ -3326,7 +3556,9 @@ void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_string_buffer *buffer, const struct wined3d_shader_reg_maps *reg_maps, const DWORD *byte_code, void *backend_ctx) DECLSPEC_HIDDEN; BOOL shader_match_semantic(const char *semantic_name, enum wined3d_decl_usage usage) DECLSPEC_HIDDEN;