diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index a7d139f2..ad98db22 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -51,7 +51,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "ad11f38db92b425e8df84dc4f7ea58366b73e32a" + echo "d178301b723b0a05d8dc0c04b185e39f3ac8ba14" } # Show version information diff --git a/patches/wined3d-CSMT_Main/0036-wined3d-Move-the-framebuffer-into-wined3d_state.patch b/patches/wined3d-CSMT_Main/0036-wined3d-Move-the-framebuffer-into-wined3d_state.patch index 3ce4963c..687779ed 100644 --- a/patches/wined3d-CSMT_Main/0036-wined3d-Move-the-framebuffer-into-wined3d_state.patch +++ b/patches/wined3d-CSMT_Main/0036-wined3d-Move-the-framebuffer-into-wined3d_state.patch @@ -1,4 +1,4 @@ -From 68280056e300f90beae6bac338aa94ebacaa4bfc Mon Sep 17 00:00:00 2001 +From f096c2b76bb908a0107daf187adcad6d6ab4723d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Thu, 20 Dec 2012 13:09:17 +0100 Subject: wined3d: Move the framebuffer into wined3d_state @@ -20,7 +20,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state 13 files changed, 172 insertions(+), 127 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index 9a882cc..df89a05 100644 +index 6ecb6fa..cecc75e 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -684,7 +684,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv, @@ -42,10 +42,10 @@ index 9a882cc..df89a05 100644 } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 6d08df9..104172f 100644 +index 26f56ab..b4fefee 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -1506,6 +1506,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1511,6 +1511,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -58,7 +58,7 @@ index 6d08df9..104172f 100644 /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) { -@@ -1833,6 +1839,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1839,6 +1845,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, out: device->shader_backend->shader_free_context_data(ret); device->adapter->fragment_pipe->free_context_data(ret); @@ -66,7 +66,7 @@ index 6d08df9..104172f 100644 HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -1867,6 +1874,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont +@@ -1873,6 +1880,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont device->shader_backend->shader_free_context_data(context); device->adapter->fragment_pipe->free_context_data(context); @@ -74,7 +74,7 @@ index 6d08df9..104172f 100644 HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2378,7 +2386,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2384,7 +2392,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win DWORD rt_mask = 0, *cur_mask; UINT i; @@ -83,7 +83,7 @@ index 6d08df9..104172f 100644 || rt_count != context->gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, dsv)) -@@ -2423,6 +2431,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2429,6 +2437,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win rt_mask = context_generate_rt_mask_no_fbo(device, rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL); } @@ -92,7 +92,7 @@ index 6d08df9..104172f 100644 } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))) -@@ -2473,7 +2483,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2487,7 +2497,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_device *device) { const struct wined3d_state *state = &device->state; @@ -101,7 +101,7 @@ index 6d08df9..104172f 100644 struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; DWORD rt_mask, rt_mask_bits; unsigned int i; -@@ -2503,7 +2513,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2517,7 +2527,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { const struct wined3d_device *device = context->swapchain->device; @@ -110,7 +110,7 @@ index 6d08df9..104172f 100644 DWORD rt_mask = find_draw_buffers_mask(context, device); DWORD *cur_mask; -@@ -2535,6 +2545,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat +@@ -2549,6 +2559,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -119,7 +119,7 @@ index 6d08df9..104172f 100644 } static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit) -@@ -3159,7 +3171,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de +@@ -3192,7 +3204,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de { const struct wined3d_state *state = &device->state; const struct StateEntry *state_table = context->state_table; @@ -205,10 +205,10 @@ index 316ccb8..eefa142 100644 HeapFree(GetProcessHeap(), 0, cs); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index a5c1e59..42c5d14 100644 +index 5e02b97..9ea1d67 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -865,7 +865,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi +@@ -939,7 +939,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi BOOL ds_enable = !!swapchain->desc.enable_auto_depth_stencil; unsigned int i; @@ -217,7 +217,7 @@ index a5c1e59..42c5d14 100644 { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -883,7 +883,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, +@@ -957,7 +957,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, struct wined3d_swapchain_desc *swapchain_desc) { static const struct wined3d_color black = {0.0f, 0.0f, 0.0f, 0.0f}; @@ -225,7 +225,7 @@ index a5c1e59..42c5d14 100644 struct wined3d_swapchain *swapchain = NULL; struct wined3d_context *context; DWORD clear_flags = 0; -@@ -896,9 +895,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, +@@ -970,9 +969,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, if (device->wined3d->flags & WINED3D_NO3D) return WINED3DERR_INVALIDCALL; @@ -235,7 +235,7 @@ index a5c1e59..42c5d14 100644 if (FAILED(hr = device->shader_backend->shader_alloc_private(device, device->adapter->vertex_pipe, device->adapter->fragment_pipe))) { -@@ -986,7 +982,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, +@@ -1061,7 +1057,6 @@ HRESULT CDECL wined3d_device_init_3d(struct wined3d_device *device, return WINED3D_OK; err_out: @@ -243,7 +243,7 @@ index a5c1e59..42c5d14 100644 HeapFree(GetProcessHeap(), 0, device->swapchains); device->swapchain_count = 0; if (device->back_buffer_view) -@@ -1065,8 +1060,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) +@@ -1140,8 +1135,25 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) if (device->cursor_texture) wined3d_texture_decref(device->cursor_texture); @@ -269,7 +269,7 @@ index a5c1e59..42c5d14 100644 /* Unload resources */ LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { -@@ -1097,37 +1109,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) +@@ -1173,37 +1185,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) * destroy the context. */ context_release(context); @@ -307,7 +307,7 @@ index a5c1e59..42c5d14 100644 if (device->back_buffer_view) { wined3d_rendertarget_view_decref(device->back_buffer_view); -@@ -1145,9 +1126,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) +@@ -1221,9 +1202,6 @@ HRESULT CDECL wined3d_device_uninit_3d(struct wined3d_device *device) device->swapchains = NULL; device->swapchain_count = 0; @@ -317,7 +317,7 @@ index a5c1e59..42c5d14 100644 device->d3d_initialized = FALSE; return WINED3D_OK; -@@ -1943,7 +1921,7 @@ static void resolve_depth_buffer(struct wined3d_state *state) +@@ -2021,7 +1999,7 @@ static void resolve_depth_buffer(struct wined3d_state *state) || !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH)) return; surface = surface_from_resource(texture->sub_resources[0]); @@ -325,8 +325,8 @@ index a5c1e59..42c5d14 100644 + if (!(depth_stencil = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil))) return; - wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT); -@@ -3298,6 +3276,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) + SetRect(&dst_rect, 0, 0, surface->resource.width, surface->resource.height); +@@ -3378,6 +3356,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) 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) { @@ -335,7 +335,7 @@ index a5c1e59..42c5d14 100644 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); -@@ -3309,7 +3289,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou +@@ -3389,7 +3369,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) { @@ -344,7 +344,7 @@ index a5c1e59..42c5d14 100644 if (!ds) { WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n"); -@@ -3318,8 +3298,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou +@@ -3398,8 +3378,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou } else if (flags & WINED3DCLEAR_TARGET) { @@ -355,7 +355,7 @@ index a5c1e59..42c5d14 100644 { WARN("Silently ignoring depth and target clear with mismatching sizes\n"); return WINED3D_OK; -@@ -3682,8 +3662,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device +@@ -3749,8 +3729,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_STENCILENABLE]) { @@ -366,7 +366,7 @@ index a5c1e59..42c5d14 100644 if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -4065,20 +4045,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co +@@ -4172,20 +4152,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co return NULL; } @@ -390,7 +390,7 @@ index a5c1e59..42c5d14 100644 TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); -@@ -4118,13 +4099,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -4225,13 +4206,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device } @@ -406,7 +406,7 @@ index a5c1e59..42c5d14 100644 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. */ -@@ -4136,18 +4117,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -4243,18 +4224,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view) { @@ -428,7 +428,7 @@ index a5c1e59..42c5d14 100644 wined3d_rendertarget_view_incref(view); wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) -@@ -4511,10 +4493,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4620,10 +4602,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, wined3d_texture_decref(device->cursor_texture); device->cursor_texture = NULL; } @@ -440,7 +440,7 @@ index a5c1e59..42c5d14 100644 { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4523,6 +4504,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4632,6 +4613,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } wined3d_device_set_depth_stencil_view(device, NULL); @@ -452,7 +452,7 @@ index a5c1e59..42c5d14 100644 if (device->onscreen_depth_stencil) { wined3d_texture_decref(device->onscreen_depth_stencil->container); -@@ -4741,7 +4727,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4850,7 +4836,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (device->d3d_initialized) delete_opengl_contexts(device, swapchain); @@ -461,7 +461,7 @@ index a5c1e59..42c5d14 100644 &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) ERR("Failed to initialize device state, hr %#x.\n", hr); device->update_state = &device->state; -@@ -4750,22 +4736,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4859,22 +4845,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } else if (device->back_buffer_view) { @@ -489,7 +489,7 @@ index a5c1e59..42c5d14 100644 wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -4853,17 +4838,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso +@@ -4962,17 +4947,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -511,7 +511,7 @@ index a5c1e59..42c5d14 100644 } } break; -@@ -5026,7 +5011,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, +@@ -5134,7 +5119,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->blitter = adapter->blitter; @@ -521,7 +521,7 @@ index a5c1e59..42c5d14 100644 { ERR("Failed to initialize device state, hr %#x.\n", hr); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c -index 4b01b7d..7e3a7f7 100644 +index 0afeff9..4e66f01 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c @@ -611,7 +611,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co @@ -575,10 +575,10 @@ index 4b01b7d..7e3a7f7 100644 surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 44e7090..787f64a 100644 +index 6234699..5d7c78a 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -1626,7 +1626,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont +@@ -1627,7 +1627,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont const struct vs_compile_args *vs_args = ctx_priv->cur_vs_args; const struct ps_compile_args *ps_args = ctx_priv->cur_ps_args; const struct wined3d_gl_info *gl_info = context->gl_info; @@ -588,10 +588,10 @@ index 44e7090..787f64a 100644 const struct wined3d_shader_lconst *lconst; const char *prefix; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index c3a842e..ae3770d 100644 +index f2c3e74..f20797b 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -2411,7 +2411,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 +@@ -2450,7 +2450,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 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]) { @@ -601,7 +601,7 @@ index c3a842e..ae3770d 100644 { static unsigned int warned = 0; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index 2be3cab..e789786 100644 +index 1d80fa0..b9263a7 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -105,7 +105,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_ @@ -788,10 +788,10 @@ index cb3d494..6b348b8 100644 if (FAILED(hr = stateblock_allocate_shader_constants(stateblock))) diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index de8d6dc..db36a59 100644 +index 96f5b9f..7784396 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -3283,8 +3283,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE +@@ -3265,8 +3265,8 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE enum wined3d_texture_filter_type filter) { struct wined3d_device *device = dst_surface->resource.device; @@ -802,7 +802,7 @@ index de8d6dc..db36a59 100644 TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, blt_fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c -index b826445..e1e705b 100644 +index dbf2c8b..73730cd 100644 --- a/dlls/wined3d/swapchain.c +++ b/dlls/wined3d/swapchain.c @@ -427,7 +427,7 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, const RECT @@ -815,10 +815,10 @@ index b826445..e1e705b 100644 struct wined3d_context *context; struct wined3d_surface *front; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c -index 4ddfead..32519eb 100644 +index 5eb1696..86a83c8 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c -@@ -3733,7 +3733,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w +@@ -3776,7 +3776,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w float y_offset = context->render_offscreen ? (center_offset - (2.0f * y) - h) / h : (center_offset - (2.0f * y) - h) / -h; @@ -827,7 +827,7 @@ index 4ddfead..32519eb 100644 state->render_states[WINED3D_RS_ZENABLE] : WINED3D_ZB_FALSE; float z_scale = zenable ? 2.0f : 0.0f; float z_offset = zenable ? -1.0f : 0.0f; -@@ -4325,7 +4325,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d +@@ -4368,7 +4368,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d unsigned int i; DWORD ttff; DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2; @@ -837,10 +837,10 @@ index 4ddfead..32519eb 100644 const struct wined3d_d3d_info *d3d_info = context->d3d_info; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 720eb3a..6a10ad7 100644 +index ccc9a93..2ea88c7 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -1149,6 +1149,36 @@ struct wined3d_timestamp_query +@@ -1164,6 +1164,36 @@ struct wined3d_timestamp_query void context_alloc_timestamp_query(struct wined3d_context *context, struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN; void context_free_timestamp_query(struct wined3d_timestamp_query *query) DECLSPEC_HIDDEN; @@ -877,7 +877,7 @@ index 720eb3a..6a10ad7 100644 struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1163,6 +1193,7 @@ struct wined3d_context +@@ -1178,6 +1208,7 @@ struct wined3d_context 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 */ @@ -885,7 +885,7 @@ index 720eb3a..6a10ad7 100644 struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1264,12 +1295,6 @@ struct wined3d_context +@@ -1280,12 +1311,6 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -898,7 +898,7 @@ index 720eb3a..6a10ad7 100644 typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); struct StateEntry -@@ -1986,7 +2011,7 @@ struct wined3d_stream_state +@@ -2008,7 +2033,7 @@ struct wined3d_stream_state struct wined3d_state { DWORD flags; @@ -907,7 +907,7 @@ index 720eb3a..6a10ad7 100644 struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2092,7 +2117,6 @@ struct wined3d_device +@@ -2114,7 +2139,6 @@ struct wined3d_device struct wine_rb_tree samplers; /* Render Target Support */ @@ -915,7 +915,7 @@ index 720eb3a..6a10ad7 100644 struct wined3d_surface *onscreen_depth_stencil; struct wined3d_rendertarget_view *auto_depth_stencil_view; -@@ -2608,9 +2632,8 @@ struct wined3d_stateblock +@@ -2626,9 +2650,8 @@ struct wined3d_stateblock void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -927,7 +927,7 @@ index 720eb3a..6a10ad7 100644 void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; struct wined3d_cs_ops -@@ -2623,7 +2646,6 @@ struct wined3d_cs +@@ -2641,7 +2664,6 @@ struct wined3d_cs { const struct wined3d_cs_ops *ops; struct wined3d_device *device; @@ -936,5 +936,5 @@ index 720eb3a..6a10ad7 100644 size_t data_size; -- -2.6.2 +2.6.4 diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 610e2aa3..dee15c9b 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -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) -@@ -1963,7 +2169,11 @@ +@@ -1964,7 +2170,11 @@ || !(texture->resource.format_flags & WINED3DFMT_FLAG_DEPTH)) return; surface = surface_from_resource(texture->sub_resources[0]); @@ -2641,8 +2641,8 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c +#endif /* STAGING_CSMT */ return; - wined3d_surface_blt(surface, NULL, depth_stencil, NULL, 0, NULL, WINED3D_TEXF_POINT); -@@ -2290,7 +2500,11 @@ + SetRect(&dst_rect, 0, 0, surface->resource.width, surface->resource.height); +@@ -2293,7 +2503,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; -@@ -2323,8 +2537,12 @@ +@@ -2326,8 +2540,12 @@ } else { @@ -2667,7 +2667,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2371,8 +2589,12 @@ +@@ -2374,8 +2592,12 @@ } else { @@ -2680,7 +2680,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2423,8 +2645,13 @@ +@@ -2426,8 +2648,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; } -@@ -2559,8 +2786,12 @@ +@@ -2562,8 +2789,12 @@ } else { @@ -2707,7 +2707,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2607,8 +2838,12 @@ +@@ -2610,8 +2841,12 @@ } else { @@ -2720,7 +2720,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } return WINED3D_OK; -@@ -2660,8 +2895,12 @@ +@@ -2663,8 +2898,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; } -@@ -2821,6 +3060,7 @@ +@@ -2824,6 +3063,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"); -@@ -2828,6 +3068,7 @@ +@@ -2831,6 +3071,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); -@@ -3313,6 +3554,10 @@ +@@ -3316,6 +3557,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) -@@ -3321,6 +3566,15 @@ +@@ -3324,6 +3569,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; } -@@ -3328,8 +3582,10 @@ +@@ -3331,8 +3585,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); -@@ -3338,12 +3594,19 @@ +@@ -3341,12 +3597,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"); -@@ -3352,8 +3615,13 @@ +@@ -3355,8 +3618,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; -@@ -3399,6 +3667,9 @@ +@@ -3402,6 +3670,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); -@@ -3406,8 +3677,13 @@ +@@ -3409,8 +3680,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, -@@ -3430,6 +3706,14 @@ +@@ -3433,6 +3709,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; -@@ -3446,6 +3730,10 @@ +@@ -3449,6 +3733,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) -@@ -3464,6 +3752,15 @@ +@@ -3467,6 +3755,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; -@@ -3479,6 +3776,7 @@ +@@ -3482,6 +3779,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) { -@@ -3518,6 +3816,97 @@ +@@ -3521,6 +3819,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)); -@@ -3535,7 +3924,13 @@ +@@ -3538,7 +3927,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) -@@ -3555,7 +3950,15 @@ +@@ -3558,7 +3953,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; -@@ -3565,6 +3968,7 @@ +@@ -3568,6 +3971,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)), -@@ -3626,6 +4030,25 @@ +@@ -3629,6 +4033,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; } -@@ -3675,8 +4098,13 @@ +@@ -3678,8 +4101,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)) { -@@ -3775,6 +4203,7 @@ +@@ -3778,6 +4206,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; -@@ -3782,6 +4211,7 @@ +@@ -3785,6 +4214,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)); -@@ -3793,6 +4223,7 @@ +@@ -3796,6 +4226,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"); -@@ -3857,6 +4288,9 @@ +@@ -3860,6 +4291,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, -@@ -4029,7 +4463,17 @@ +@@ -4036,7 +4470,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); -@@ -4063,7 +4507,14 @@ +@@ -4070,7 +4514,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 -@@ -4074,9 +4525,47 @@ +@@ -4081,9 +4532,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, -@@ -4107,8 +4596,14 @@ +@@ -4114,8 +4603,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, -@@ -4122,6 +4617,7 @@ +@@ -4129,6 +4624,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]; } -@@ -4137,6 +4633,22 @@ +@@ -4144,6 +4640,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); -@@ -4176,6 +4688,7 @@ +@@ -4183,6 +4695,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; -@@ -4183,6 +4696,15 @@ +@@ -4190,6 +4703,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. */ -@@ -4194,6 +4716,7 @@ +@@ -4201,6 +4723,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; -@@ -4211,6 +4734,66 @@ +@@ -4218,6 +4741,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, -@@ -4231,6 +4814,14 @@ +@@ -4238,6 +4821,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", -@@ -4258,6 +4849,13 @@ +@@ -4265,6 +4856,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) { -@@ -4362,6 +4960,12 @@ +@@ -4369,6 +4967,12 @@ else SetCursor(NULL); } @@ -3373,7 +3373,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return oldVisible; } -@@ -4372,8 +4976,10 @@ +@@ -4379,8 +4983,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); -@@ -4381,6 +4987,7 @@ +@@ -4388,6 +4994,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); } } -@@ -4399,6 +5006,37 @@ +@@ -4406,6 +5013,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) { -@@ -4420,6 +5058,7 @@ +@@ -4427,6 +5065,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; } -@@ -4439,6 +5078,14 @@ +@@ -4446,6 +5085,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, -@@ -4455,6 +5102,7 @@ +@@ -4462,6 +5109,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)) { -@@ -4465,6 +5113,35 @@ +@@ -4472,6 +5120,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; } -@@ -4483,9 +5160,11 @@ +@@ -4490,9 +5167,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"); -@@ -4500,9 +5179,21 @@ +@@ -4507,9 +5186,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) { -@@ -4511,6 +5202,7 @@ +@@ -4518,6 +5209,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); -@@ -4520,6 +5212,12 @@ +@@ -4527,6 +5219,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) -@@ -4532,6 +5230,7 @@ +@@ -4539,6 +5237,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 -@@ -4553,6 +5252,7 @@ +@@ -4560,6 +5259,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); -@@ -4679,6 +5379,13 @@ +@@ -4686,6 +5386,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; -@@ -4721,6 +5428,13 @@ +@@ -4728,6 +5435,13 @@ wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view); } @@ -3596,7 +3596,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c 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))) -@@ -4741,12 +5455,20 @@ +@@ -4748,12 +5462,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; -@@ -4755,6 +5477,7 @@ +@@ -4762,6 +5484,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); -@@ -4770,6 +5493,24 @@ +@@ -4777,6 +5500,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); } -@@ -4845,6 +5586,10 @@ +@@ -4852,6 +5593,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: -@@ -4855,6 +5600,7 @@ +@@ -4862,6 +5607,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); -@@ -4866,6 +5612,19 @@ +@@ -4873,6 +5619,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; -@@ -5027,7 +5786,11 @@ +@@ -5034,7 +5793,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); -@@ -5126,6 +5889,7 @@ +@@ -5133,6 +5896,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, -@@ -5179,3 +5943,4 @@ +@@ -5186,3 +5950,4 @@ wined3d_device_destroy_bo(device, context, bo); }