diff --git a/README.md b/README.md index d906b877..26015d92 100644 --- a/README.md +++ b/README.md @@ -220,7 +220,7 @@ Included bug fixes and improvements * Support for PulseAudio backend for audio ([Wine Bug #10495](https://bugs.winehq.org/show_bug.cgi?id=10495)) * Support for RtlDecompressBuffer ([Wine Bug #37449](https://bugs.winehq.org/show_bug.cgi?id=37449)) * Support for SHCreateSessionKey ([Wine Bug #35630](https://bugs.winehq.org/show_bug.cgi?id=35630)) -* Support for TOOLTIPS_GetTipText edge cases ([Wine Bug #30648](https://bugs.winehq.org/show_bug.cgi?id=30648)) +* ~~Support for TOOLTIPS_GetTipText edge cases~~ ([Wine Bug #30648](https://bugs.winehq.org/show_bug.cgi?id=30648)) * Support for TransmitFile ([Wine Bug #5048](https://bugs.winehq.org/show_bug.cgi?id=5048)) * Support for WTSEnumerateProcessesW ([Wine Bug #29903](https://bugs.winehq.org/show_bug.cgi?id=29903)) * Support for extra large and jumbo icon lists in shell32 ([Wine Bug #24721](https://bugs.winehq.org/show_bug.cgi?id=24721)) diff --git a/debian/changelog b/debian/changelog index 17870d86..39ec0993 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,5 +1,6 @@ wine-staging (1.7.40) UNRELEASED; urgency=low * Removed patch to fix regression causing black screen on startup (accepted upstream). + * Removed patch to fix edge cases in TOOLTIPS_GetTipText (fixed upstream). -- Sebastian Lackner Mon, 23 Mar 2015 16:12:20 +0100 wine-staging (1.7.39) unstable; urgency=low diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 56e61cba..51fa1a65 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -196,7 +196,6 @@ patch_enable_all () enable_user32_DrawTextExW="$1" enable_user32_GetRawInputDeviceList="$1" enable_user32_GetSystemMetrics="$1" - enable_user32_GetTipText="$1" enable_user32_Key_State="$1" enable_user32_Mouse_Message_Hwnd="$1" enable_user32_Painting="$1" @@ -646,9 +645,6 @@ patch_enable () user32-GetSystemMetrics) enable_user32_GetSystemMetrics="$2" ;; - user32-GetTipText) - enable_user32_GetTipText="$2" - ;; user32-Key_State) enable_user32_Key_State="$2" ;; @@ -4102,23 +4098,6 @@ if test "$enable_user32_GetSystemMetrics" -eq 1; then ) >> "$patchlist" fi -# Patchset user32-GetTipText -# | -# | This patchset fixes the following Wine bugs: -# | * [#30648] Support for TOOLTIPS_GetTipText edge cases -# | -# | Modified files: -# | * dlls/comctl32/tooltips.c -# | -if test "$enable_user32_GetTipText" -eq 1; then - patch_apply user32-GetTipText/0001-Fix-TOOLTIPS_GetTipText-when-a-resource-cannot-be-fo.patch - patch_apply user32-GetTipText/0002-Fix-TOOLTIPS_GetTipText-when-a-NULL-instance-is-used.patch - ( - echo '+ { "Erich E. Hoover", "Fix TOOLTIPS_GetTipText when a resource cannot be found.", 1 },'; - echo '+ { "Erich E. Hoover", "Fix TOOLTIPS_GetTipText when a NULL instance is used.", 1 },'; - ) >> "$patchlist" -fi - # Patchset user32-Mouse_Message_Hwnd # | # | This patchset fixes the following Wine bugs: diff --git a/patches/user32-GetTipText/0001-Fix-TOOLTIPS_GetTipText-when-a-resource-cannot-be-fo.patch b/patches/user32-GetTipText/0001-Fix-TOOLTIPS_GetTipText-when-a-resource-cannot-be-fo.patch deleted file mode 100644 index df407e07..00000000 --- a/patches/user32-GetTipText/0001-Fix-TOOLTIPS_GetTipText-when-a-resource-cannot-be-fo.patch +++ /dev/null @@ -1,34 +0,0 @@ -From f9894bb1a114f2e3d87b153815e37cedb3b6b31b Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Sun, 27 Jul 2014 09:12:15 -0600 -Subject: Fix TOOLTIPS_GetTipText when a resource cannot be found. - -Based on patch by Nikolay Sivov. ---- - dlls/comctl32/tooltips.c | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) - -diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c -index f74ea65..b44ccc5 100644 ---- a/dlls/comctl32/tooltips.c -+++ b/dlls/comctl32/tooltips.c -@@ -484,6 +484,8 @@ TOOLTIPS_GetTipText (const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer) - { - TTTOOL_INFO *toolPtr = &infoPtr->tools[nTool]; - -+ /* always NULL-terminate the buffer, just in case we fail to load the string */ -+ buffer[0] = '\0'; - if (IS_INTRESOURCE(toolPtr->lpszText) && toolPtr->hinst) { - /* load a resource */ - TRACE("load res string %p %x\n", -@@ -505,7 +507,6 @@ TOOLTIPS_GetTipText (const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer) - } - else { - /* no text available */ -- buffer[0] = '\0'; - } - - TRACE("%s\n", debugstr_w(buffer)); --- -1.7.9.5 - diff --git a/patches/user32-GetTipText/0002-Fix-TOOLTIPS_GetTipText-when-a-NULL-instance-is-used.patch b/patches/user32-GetTipText/0002-Fix-TOOLTIPS_GetTipText-when-a-NULL-instance-is-used.patch deleted file mode 100644 index 6fafc029..00000000 --- a/patches/user32-GetTipText/0002-Fix-TOOLTIPS_GetTipText-when-a-NULL-instance-is-used.patch +++ /dev/null @@ -1,35 +0,0 @@ -From 1491fbb70dc29e603a466f85311fc96ee95f0b5c Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Sun, 27 Jul 2014 09:12:50 -0600 -Subject: Fix TOOLTIPS_GetTipText when a NULL instance is used. - -Based on patch by Nikolay Sivov. ---- - dlls/comctl32/tooltips.c | 11 +++++------ - 1 file changed, 5 insertions(+), 6 deletions(-) - -diff --git a/dlls/comctl32/tooltips.c b/dlls/comctl32/tooltips.c -index b44ccc5..c3e28bb 100644 ---- a/dlls/comctl32/tooltips.c -+++ b/dlls/comctl32/tooltips.c -@@ -486,12 +486,11 @@ TOOLTIPS_GetTipText (const TOOLTIPS_INFO *infoPtr, INT nTool, WCHAR *buffer) - - /* always NULL-terminate the buffer, just in case we fail to load the string */ - buffer[0] = '\0'; -- if (IS_INTRESOURCE(toolPtr->lpszText) && toolPtr->hinst) { -- /* load a resource */ -- TRACE("load res string %p %x\n", -- toolPtr->hinst, LOWORD(toolPtr->lpszText)); -- LoadStringW (toolPtr->hinst, LOWORD(toolPtr->lpszText), -- buffer, INFOTIPSIZE); -+ if (IS_INTRESOURCE(toolPtr->lpszText)) { -+ HINSTANCE hinst = toolPtr->hinst ? toolPtr->hinst : GetModuleHandleW(NULL); -+ /* load a resource */ -+ TRACE("load res string %p %x\n", hinst, LOWORD(toolPtr->lpszText)); -+ LoadStringW (hinst, LOWORD(toolPtr->lpszText), buffer, INFOTIPSIZE); - } - else if (toolPtr->lpszText) { - if (toolPtr->lpszText == LPSTR_TEXTCALLBACKW) { --- -1.7.9.5 - diff --git a/patches/user32-GetTipText/definition b/patches/user32-GetTipText/definition deleted file mode 100644 index c7ebd132..00000000 --- a/patches/user32-GetTipText/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [30648] Support for TOOLTIPS_GetTipText edge cases diff --git a/patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch b/patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch index 9270e682..b46164a4 100644 --- a/patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch +++ b/patches/wined3d-CSMT_Main/0043-wined3d-Move-the-framebuffer-into-wined3d_state.patch @@ -1,4 +1,4 @@ -From 74b9c4c429f5c388786366e5ed35f5c14df15c35 Mon Sep 17 00:00:00 2001 +From 3633fb5bf88a562326133b84ba9105aff2cbd3c4 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, 171 insertions(+), 126 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index 4a10e00..fb09fd7 100644 +index d745591..f5a7786 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -706,7 +706,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv, @@ -42,10 +42,10 @@ index 4a10e00..fb09fd7 100644 } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 93c8a6a..0445a41 100644 +index 5644ea0..bfedf0e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -1448,6 +1448,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1453,6 +1453,12 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -58,23 +58,23 @@ index 93c8a6a..0445a41 100644 /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) { -@@ -1764,6 +1770,7 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, - +@@ -1770,6 +1776,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); + HeapFree(GetProcessHeap(), 0, ret->current_fb.render_targets); HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -1797,6 +1804,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont - } +@@ -1804,6 +1811,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); + HeapFree(GetProcessHeap(), 0, context->current_fb.render_targets); HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2308,7 +2316,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2315,7 +2323,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 93c8a6a..0445a41 100644 || rt_count != context->gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil)) -@@ -2351,6 +2359,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2358,6 +2366,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 93c8a6a..0445a41 100644 } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))) -@@ -2401,7 +2411,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2408,7 +2418,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 93c8a6a..0445a41 100644 struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; DWORD rt_mask, rt_mask_bits; unsigned int i; -@@ -2431,7 +2441,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2438,7 +2448,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 93c8a6a..0445a41 100644 DWORD rt_mask = find_draw_buffers_mask(context, device); DWORD *cur_mask; -@@ -2461,6 +2471,8 @@ void context_state_fb(struct wined3d_context *context, const struct wined3d_stat +@@ -2468,6 +2478,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 93c8a6a..0445a41 100644 } static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit) -@@ -3034,7 +3046,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, struct wined3d_de +@@ -3056,7 +3068,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,7 +205,7 @@ index 4a04b00..408e9b5 100644 HeapFree(GetProcessHeap(), 0, cs); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 95e5cc7..f8c32eb 100644 +index d7b8ac8..a7fad33 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -860,7 +860,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi @@ -355,7 +355,7 @@ index 95e5cc7..f8c32eb 100644 { WARN("Silently ignoring depth and target clear with mismatching sizes\n"); return WINED3D_OK; -@@ -3688,8 +3668,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device +@@ -3697,8 +3677,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 95e5cc7..f8c32eb 100644 if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -3915,20 +3895,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co +@@ -3924,20 +3904,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co return NULL; } @@ -390,7 +390,7 @@ index 95e5cc7..f8c32eb 100644 TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); -@@ -3968,13 +3949,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -3977,13 +3958,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device } @@ -406,7 +406,7 @@ index 95e5cc7..f8c32eb 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. */ -@@ -3986,18 +3967,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -3995,18 +3976,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 95e5cc7..f8c32eb 100644 wined3d_rendertarget_view_incref(view); wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) -@@ -4353,10 +4335,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4362,10 +4344,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 95e5cc7..f8c32eb 100644 { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4365,6 +4346,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4374,6 +4355,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } wined3d_device_set_depth_stencil_view(device, NULL); @@ -452,7 +452,7 @@ index 95e5cc7..f8c32eb 100644 if (device->onscreen_depth_stencil) { wined3d_surface_decref(device->onscreen_depth_stencil); -@@ -4649,7 +4635,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4658,7 +4644,7 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (device->d3d_initialized) delete_opengl_contexts(device, swapchain); @@ -461,7 +461,7 @@ index 95e5cc7..f8c32eb 100644 &device->adapter->d3d_info, WINED3D_STATE_INIT_DEFAULT))) ERR("Failed to initialize device state, hr %#x.\n", hr); device->update_state = &device->state; -@@ -4658,22 +4644,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4667,22 +4653,21 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, } else if (device->back_buffer_view) { @@ -489,7 +489,7 @@ index 95e5cc7..f8c32eb 100644 wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -4764,17 +4749,17 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso +@@ -4773,17 +4758,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 95e5cc7..f8c32eb 100644 } } break; -@@ -4937,7 +4922,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, +@@ -4946,7 +4931,7 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->blitter = adapter->blitter; @@ -521,10 +521,10 @@ index 95e5cc7..f8c32eb 100644 { ERR("Failed to initialize device state, hr %#x.\n", hr); diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c -index 6ff6cf1..e69a69e 100644 +index f2c2f42..c6a72fc 100644 --- a/dlls/wined3d/drawprim.c +++ b/dlls/wined3d/drawprim.c -@@ -601,7 +601,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co +@@ -611,7 +611,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co if (!index_count) return; @@ -533,7 +533,7 @@ index 6ff6cf1..e69a69e 100644 if (!context->valid) { context_release(context); -@@ -615,7 +615,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co +@@ -625,7 +625,7 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co /* Invalidate the back buffer memory so LockRect will read it the next time */ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -542,7 +542,7 @@ index 6ff6cf1..e69a69e 100644 if (target) { wined3d_resource_load_location(&target->resource, context, target->container->resource.draw_binding); -@@ -624,18 +624,18 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co +@@ -634,18 +634,18 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co } } @@ -564,7 +564,7 @@ index 6ff6cf1..e69a69e 100644 RECT current_rect, draw_rect, r; if (!context->render_offscreen && ds != device->onscreen_depth_stencil) -@@ -661,9 +661,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co +@@ -671,9 +671,9 @@ void draw_primitive(struct wined3d_device *device, UINT start_idx, UINT index_co return; } @@ -577,7 +577,7 @@ index 6ff6cf1..e69a69e 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 0b307d3..ffefab0 100644 +index 0fa8308..c7216de 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -964,7 +964,7 @@ static void shader_generate_glsl_declarations(const struct wined3d_context *cont @@ -590,7 +590,7 @@ index 0b307d3..ffefab0 100644 const struct wined3d_shader_lconst *lconst; const char *prefix; diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index f162fb5..e9ac242 100644 +index 31b391b..6dc1abd 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c @@ -2344,7 +2344,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 @@ -603,7 +603,7 @@ index f162fb5..e9ac242 100644 { static unsigned int warned = 0; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index bfef4b0..aed4a39 100644 +index a949077..f81ab33 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_ @@ -660,7 +660,7 @@ index bfef4b0..aed4a39 100644 float scale; union -@@ -4682,7 +4682,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine +@@ -4677,7 +4677,7 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -669,7 +669,7 @@ index bfef4b0..aed4a39 100644 const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_viewport vp = state->viewport; -@@ -4860,7 +4860,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st +@@ -4855,7 +4855,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st } else { @@ -678,7 +678,7 @@ index bfef4b0..aed4a39 100644 UINT height; UINT width; -@@ -4924,7 +4924,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state +@@ -4919,7 +4919,7 @@ static void psorigin(struct wined3d_context *context, const struct wined3d_state void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -816,10 +816,10 @@ index dd7d2c7..ed2964e 100644 struct wined3d_context *context; struct wined3d_surface *front; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c -index b28142c..4b84711 100644 +index a772af8..d2e7fdc 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c -@@ -3169,7 +3169,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w +@@ -3183,7 +3183,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w float y_offset = (float)(context->render_offscreen ? (63.0 / 64.0 - (2.0 * y) - h) / h : (63.0 / 64.0 - (2.0 * y) - h) / -h); @@ -828,7 +828,7 @@ index b28142c..4b84711 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; -@@ -3599,7 +3599,7 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d +@@ -3613,7 +3613,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; @@ -838,10 +838,10 @@ index b28142c..4b84711 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 b0040a5..9a4e5cb 100644 +index 0f1dfdd..6a5e4b8 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -1119,6 +1119,36 @@ struct wined3d_timestamp_query +@@ -1120,6 +1120,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; @@ -878,7 +878,7 @@ index b0040a5..9a4e5cb 100644 struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1133,6 +1163,7 @@ struct wined3d_context +@@ -1134,6 +1164,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 */ @@ -886,7 +886,7 @@ index b0040a5..9a4e5cb 100644 struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1233,12 +1264,6 @@ struct wined3d_context +@@ -1235,12 +1266,6 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -899,7 +899,7 @@ index b0040a5..9a4e5cb 100644 typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); struct StateEntry -@@ -1913,7 +1938,7 @@ struct wined3d_stream_state +@@ -1917,7 +1942,7 @@ struct wined3d_stream_state struct wined3d_state { DWORD flags; @@ -908,7 +908,7 @@ index b0040a5..9a4e5cb 100644 struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2019,7 +2044,6 @@ struct wined3d_device +@@ -2023,7 +2048,6 @@ struct wined3d_device struct wine_rb_tree samplers; /* Render Target Support */ @@ -916,7 +916,7 @@ index b0040a5..9a4e5cb 100644 struct wined3d_surface *onscreen_depth_stencil; struct wined3d_rendertarget_view *auto_depth_stencil_view; -@@ -2521,9 +2545,8 @@ struct wined3d_stateblock +@@ -2527,9 +2551,8 @@ struct wined3d_stateblock void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -928,7 +928,7 @@ index b0040a5..9a4e5cb 100644 void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; struct wined3d_cs_ops -@@ -2536,7 +2559,6 @@ struct wined3d_cs +@@ -2542,7 +2565,6 @@ struct wined3d_cs { const struct wined3d_cs_ops *ops; struct wined3d_device *device; diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index bd23a19f..d0c1d2ca 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -406,7 +406,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c float scale; union -@@ -4328,9 +4359,15 @@ +@@ -4323,9 +4354,15 @@ } } } else { @@ -422,7 +422,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c WARN("unsupported blending in openGl\n"); } } -@@ -4682,7 +4719,11 @@ +@@ -4677,7 +4714,11 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -434,7 +434,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_viewport vp = state->viewport; -@@ -4860,7 +4901,11 @@ +@@ -4855,7 +4896,11 @@ } else { @@ -446,7 +446,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c UINT height; UINT width; -@@ -4924,7 +4969,11 @@ +@@ -4919,7 +4964,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -1092,7 +1092,7 @@ diff --git a/dlls/wined3d/volume.c b/dlls/wined3d/volume.c diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c -@@ -3169,7 +3169,11 @@ +@@ -3183,7 +3183,11 @@ float y_offset = (float)(context->render_offscreen ? (63.0 / 64.0 - (2.0 * y) - h) / h : (63.0 / 64.0 - (2.0 * y) - h) / -h); @@ -1104,7 +1104,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c 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; -@@ -3292,6 +3296,7 @@ +@@ -3306,6 +3310,7 @@ /* case WINED3D_TTFF_COUNT1: Won't ever get here. */ case WINED3D_TTFF_COUNT2: mat._13 = mat._23 = mat._33 = mat._43 = 0.0f; @@ -1112,7 +1112,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c /* OpenGL divides the first 3 vertex coord by the 4th by default, * which is essentially the same as D3DTTFF_PROJECTED. Make sure that * the 4th coord evaluates to 1.0 to eliminate that. -@@ -3304,6 +3309,20 @@ +@@ -3318,6 +3323,20 @@ * A more serious problem occurs if the app passes 4 coordinates in, and the * 4th is != 1.0(opengl default). This would have to be fixed in draw_strided_slow * or a replacement shader. */ @@ -1133,7 +1133,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c default: mat._14 = mat._24 = mat._34 = 0.0f; mat._44 = 1.0f; } -@@ -3599,7 +3618,11 @@ +@@ -3613,7 +3632,11 @@ unsigned int i; DWORD ttff; DWORD cop, aop, carg0, carg1, carg2, aarg0, aarg1, aarg2; @@ -1204,7 +1204,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); } -@@ -7692,7 +7700,11 @@ +@@ -7703,7 +7711,11 @@ /* Now load the surface */ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO @@ -1216,7 +1216,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)) { -@@ -7722,6 +7734,7 @@ +@@ -7733,6 +7745,7 @@ /* Leave the opengl state valid for blitting */ arbfp_blit_unset(context->gl_info); @@ -1224,7 +1224,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 -@@ -7733,6 +7746,17 @@ +@@ -7744,6 +7757,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); @@ -1284,7 +1284,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -1448,6 +1448,7 @@ +@@ -1453,6 +1453,7 @@ goto out; } @@ -1292,7 +1292,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c ret->current_fb.render_targets = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*ret->current_fb.render_targets) * gl_info->limits.buffers); ret->current_fb.rt_size = gl_info->limits.buffers; -@@ -1456,6 +1457,7 @@ +@@ -1461,6 +1462,7 @@ if (device->context_count) ret->offscreenBuffer = device->contexts[0]->offscreenBuffer; @@ -1300,27 +1300,27 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) { -@@ -1772,7 +1774,9 @@ - +@@ -1778,7 +1780,9 @@ out: device->shader_backend->shader_free_context_data(ret); + device->adapter->fragment_pipe->free_context_data(ret); +#if defined(STAGING_CSMT) HeapFree(GetProcessHeap(), 0, ret->current_fb.render_targets); +#endif /* STAGING_CSMT */ HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -1806,7 +1810,9 @@ - } +@@ -1813,7 +1817,9 @@ device->shader_backend->shader_free_context_data(context); + device->adapter->fragment_pipe->free_context_data(context); +#if defined(STAGING_CSMT) HeapFree(GetProcessHeap(), 0, context->current_fb.render_targets); +#endif /* STAGING_CSMT */ HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2211,7 +2217,11 @@ +@@ -2218,7 +2224,11 @@ return TRUE; } @@ -1332,7 +1332,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c static void context_validate_onscreen_formats(struct wined3d_context *context, const struct wined3d_rendertarget_view *depth_stencil) { -@@ -2227,6 +2237,7 @@ +@@ -2234,6 +2244,7 @@ WARN("Depth stencil format is not supported by WGL, rendering the backbuffer in an FBO\n"); /* The currently active context is the necessary context to access the swapchain's onscreen buffers */ @@ -1340,7 +1340,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c wined3d_resource_load_location(&context->current_rt->resource, context, WINED3D_LOCATION_TEXTURE_RGB); swapchain->render_to_fbo = TRUE; swapchain_update_draw_bindings(swapchain); -@@ -2241,6 +2252,22 @@ +@@ -2248,6 +2259,22 @@ return context_generate_rt_mask_from_surface(rt); else return context_generate_rt_mask(context->offscreenBuffer); @@ -1363,7 +1363,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } /* Context activation is done by the caller. */ -@@ -2272,7 +2299,11 @@ +@@ -2279,7 +2306,11 @@ } else { @@ -1375,7 +1375,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } cur_mask = context->current_fbo ? &context->current_fbo->rt_mask : &context->draw_buffers_mask; -@@ -2318,7 +2349,11 @@ +@@ -2325,7 +2356,11 @@ DWORD rt_mask = 0, *cur_mask; UINT i; @@ -1387,7 +1387,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c || rt_count != context->gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, fb->depth_stencil)) -@@ -2358,11 +2393,17 @@ +@@ -2365,11 +2400,17 @@ } else { @@ -1405,7 +1405,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))) -@@ -2375,7 +2416,11 @@ +@@ -2382,7 +2423,11 @@ } else { @@ -1417,7 +1417,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c rt_count ? wined3d_rendertarget_view_get_surface(rts[0]) : NULL); } -@@ -2410,6 +2455,7 @@ +@@ -2417,6 +2462,7 @@ return TRUE; } @@ -1425,7 +1425,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const struct wined3d_state *state) { struct wined3d_rendertarget_view **rts = state->fb.render_targets; -@@ -2419,6 +2465,18 @@ +@@ -2426,6 +2472,18 @@ if (wined3d_settings.offscreen_rendering_mode != ORM_FBO) return context_generate_rt_mask_no_fbo(context, wined3d_rendertarget_view_get_surface(rts[0])); @@ -1444,7 +1444,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c else if (!context->render_offscreen) return context_generate_rt_mask_from_surface(wined3d_rendertarget_view_get_surface(rts[0])); -@@ -2441,8 +2499,14 @@ +@@ -2448,8 +2506,14 @@ /* Context activation is done by the caller. */ void context_state_fb(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -1459,7 +1459,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c DWORD *cur_mask; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) -@@ -2471,8 +2535,10 @@ +@@ -2478,8 +2542,10 @@ context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -1470,7 +1470,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } static void context_map_stage(struct wined3d_context *context, DWORD stage, DWORD unit) -@@ -2710,12 +2776,22 @@ +@@ -2717,12 +2783,22 @@ /* Context activation is done by the caller. */ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -1493,7 +1493,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c if (rt_mask != *cur_mask) { context_apply_draw_buffers(context, rt_mask); -@@ -2901,7 +2977,11 @@ +@@ -2923,7 +2999,11 @@ { if (state->vertex_declaration->half_float_conv_needed && !stream_info->all_vbo) { @@ -1505,7 +1505,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c context->use_immediate_mode_draw = TRUE; } else -@@ -3041,11 +3121,19 @@ +@@ -3063,11 +3143,19 @@ } /* Context activation is done by the caller. */ @@ -1525,7 +1525,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c unsigned int i, j; WORD map; -@@ -3077,12 +3165,17 @@ +@@ -3099,12 +3187,17 @@ for (i = 0, map = context->stream_info.use_map; map; map >>= 1, ++i) { if (map & 1) @@ -1543,7 +1543,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } if (state->index_buffer) { -@@ -3185,7 +3278,11 @@ +@@ -3207,7 +3300,11 @@ if (texture->texture_srgb.name) wined3d_texture_load(texture, context, TRUE); wined3d_texture_load(texture, context, FALSE); @@ -1751,7 +1751,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -996,9 +1026,14 @@ +@@ -997,9 +1027,14 @@ WORD use_map; /* MAX_ATTRIBS, 16 */ }; @@ -1766,7 +1766,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 -@@ -1083,8 +1118,10 @@ +@@ -1084,8 +1119,10 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1777,7 +1777,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1120,6 +1157,7 @@ +@@ -1121,6 +1158,7 @@ struct list entry; GLuint id; struct wined3d_context *context; @@ -1785,7 +1785,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT64 timestamp; }; -@@ -1155,6 +1193,12 @@ +@@ -1156,6 +1194,12 @@ for (i = 0; i < min(dst->rt_size, src->rt_size); i++) dst->render_targets[i] = src->render_targets[i]; } @@ -1798,7 +1798,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { -@@ -1170,7 +1214,9 @@ +@@ -1171,7 +1215,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 */ @@ -1808,7 +1808,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_swapchain *swapchain; struct wined3d_surface *current_rt; -@@ -1269,8 +1315,17 @@ +@@ -1271,8 +1317,17 @@ GLfloat fog_coord_value; GLfloat color[4], fogstart, fogend, fogcolor[4]; GLuint dummy_arbfp_prog; @@ -1826,7 +1826,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); -@@ -1398,8 +1453,12 @@ +@@ -1402,8 +1457,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; @@ -1839,7 +1839,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, -@@ -1948,7 +2007,11 @@ +@@ -1952,7 +2011,11 @@ struct wined3d_state { DWORD flags; @@ -1851,7 +1851,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]; -@@ -1993,6 +2056,7 @@ +@@ -1997,6 +2060,7 @@ DWORD render_states[WINEHIGHEST_RENDER_STATE + 1]; }; @@ -1859,7 +1859,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_gl_bo { GLuint name; -@@ -2001,6 +2065,7 @@ +@@ -2005,6 +2069,7 @@ UINT size; }; @@ -1867,7 +1867,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 -@@ -2056,11 +2121,23 @@ +@@ -2060,11 +2125,23 @@ struct wined3d_rendertarget_view *back_buffer_view; struct wined3d_swapchain **swapchains; UINT swapchain_count; @@ -1891,7 +1891,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; -@@ -2071,6 +2148,9 @@ +@@ -2075,6 +2152,9 @@ UINT xScreenSpace; UINT yScreenSpace; UINT cursorWidth, cursorHeight; @@ -1901,7 +1901,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h HCURSOR hardwareCursor; /* The Wine logo texture */ -@@ -2102,6 +2182,7 @@ +@@ -2106,6 +2186,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; @@ -1909,7 +1909,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, -@@ -2113,6 +2194,11 @@ +@@ -2117,6 +2198,11 @@ void device_create_dummy_textures(struct wined3d_device *device, struct wined3d_context *context) DECLSPEC_HIDDEN; void device_delete_opengl_contexts_cs(struct wined3d_device *device, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -1921,7 +1921,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) { -@@ -2136,9 +2222,11 @@ +@@ -2140,9 +2226,11 @@ ULONG (*resource_incref)(struct wined3d_resource *resource); ULONG (*resource_decref)(struct wined3d_resource *resource); void (*resource_unload)(struct wined3d_resource *resource); @@ -1933,7 +1933,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_resource -@@ -2161,6 +2249,7 @@ +@@ -2165,6 +2253,7 @@ UINT depth; UINT size; DWORD priority; @@ -1941,7 +1941,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; -@@ -2168,6 +2257,11 @@ +@@ -2172,6 +2261,11 @@ DWORD locations; LONG access_fence; BOOL unmap_dirtify; @@ -1953,7 +1953,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *parent; const struct wined3d_parent_ops *parent_ops; -@@ -2192,6 +2286,7 @@ +@@ -2196,6 +2290,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; @@ -1961,7 +1961,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, -@@ -2238,6 +2333,15 @@ +@@ -2242,6 +2337,15 @@ { while(InterlockedCompareExchange(&resource->access_fence, 0, 0)); } @@ -1977,7 +1977,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 -@@ -2315,7 +2419,9 @@ +@@ -2319,7 +2423,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; @@ -1987,7 +1987,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, -@@ -2349,9 +2455,16 @@ +@@ -2353,9 +2459,16 @@ struct wined3d_resource resource; struct wined3d_texture *container; @@ -2004,7 +2004,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) -@@ -2359,6 +2472,7 @@ +@@ -2363,6 +2476,7 @@ return CONTAINING_RECORD(resource, struct wined3d_volume, resource); } @@ -2012,7 +2012,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; -@@ -2371,6 +2485,23 @@ +@@ -2375,6 +2489,23 @@ struct wined3d_surface_dib { HBITMAP DIBsection; @@ -2036,7 +2036,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT bitmap_size; }; -@@ -2396,7 +2527,11 @@ +@@ -2400,7 +2531,11 @@ struct wined3d_surface_ops { HRESULT (*surface_private_setup)(struct wined3d_surface *surface); @@ -2048,7 +2048,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_surface -@@ -2404,12 +2539,25 @@ +@@ -2408,12 +2543,25 @@ struct wined3d_resource resource; const struct wined3d_surface_ops *surface_ops; struct wined3d_texture *container; @@ -2074,7 +2074,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h GLuint rb_multisample; GLuint rb_resolved; GLenum texture_target; -@@ -2453,10 +2601,19 @@ +@@ -2457,10 +2605,19 @@ 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; @@ -2094,7 +2094,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void surface_modify_ds_location(struct wined3d_surface *surface, DWORD location, UINT w, UINT h) DECLSPEC_HIDDEN; void surface_prepare_rb(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, BOOL multisample) DECLSPEC_HIDDEN; -@@ -2468,6 +2625,7 @@ +@@ -2472,6 +2629,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; @@ -2102,7 +2102,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; -@@ -2486,6 +2644,21 @@ +@@ -2490,6 +2648,21 @@ 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; void surface_flip(struct wined3d_surface *front, struct wined3d_surface *back) DECLSPEC_HIDDEN; @@ -2124,7 +2124,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /* Surface flags: */ #define SFLAG_DIBSECTION 0x00000001 /* Has a DIB section attached for GetDC. */ -@@ -2531,8 +2704,10 @@ +@@ -2537,8 +2710,10 @@ BOOL half_float_conv_needed; }; @@ -2135,7 +2135,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]; -@@ -2600,6 +2775,7 @@ +@@ -2606,6 +2781,7 @@ void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -2143,7 +2143,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; -@@ -2650,6 +2826,32 @@ +@@ -2656,6 +2832,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; @@ -2176,7 +2176,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; -@@ -2697,6 +2899,7 @@ +@@ -2703,6 +2905,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; @@ -2184,7 +2184,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, -@@ -2756,6 +2959,7 @@ +@@ -2762,6 +2965,7 @@ struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void wined3d_cs_emit_getdc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN; void wined3d_cs_emit_releasedc(struct wined3d_cs *cs, struct wined3d_surface *surface) DECLSPEC_HIDDEN; @@ -2192,7 +2192,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 -@@ -2770,8 +2974,12 @@ +@@ -2776,8 +2980,12 @@ struct wined3d_query_ops { HRESULT (*query_get_data)(struct wined3d_query *query, void *data, DWORD data_size, DWORD flags); @@ -2205,7 +2205,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_query -@@ -2785,12 +2993,16 @@ +@@ -2791,12 +2999,16 @@ enum wined3d_query_type type; DWORD data_size; void *extendedData; @@ -2222,7 +2222,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 */ -@@ -2817,7 +3029,9 @@ +@@ -2823,7 +3035,9 @@ GLenum buffer_object_usage; GLenum buffer_type_hint; DWORD flags; @@ -2232,7 +2232,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void *map_ptr; struct wined3d_map_range *maps; -@@ -2842,11 +3056,15 @@ +@@ -2848,11 +3062,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; @@ -2248,7 +2248,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view { -@@ -2884,8 +3102,10 @@ +@@ -2890,8 +3108,10 @@ return surface_from_resource(resource); } @@ -2259,7 +2259,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -2898,8 +3118,12 @@ +@@ -2904,8 +3124,12 @@ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, const RECT *src_rect, @@ -2272,7 +2272,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_swapchain -@@ -2939,8 +3163,10 @@ +@@ -2945,8 +3169,10 @@ HDC swapchain_get_backup_dc(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_draw_bindings(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; void swapchain_update_render_to_fbo(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; @@ -2283,7 +2283,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h /***************************************************************************** * Utility function prototypes -@@ -3152,7 +3378,9 @@ +@@ -3159,7 +3385,9 @@ void shader_generate_main(const struct wined3d_shader *shader, struct wined3d_shader_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; @@ -2296,7 +2296,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c --- a/dlls/wined3d/vertexdeclaration.c +++ b/dlls/wined3d/vertexdeclaration.c -@@ -48,12 +48,14 @@ +@@ -50,12 +50,14 @@ return refcount; } @@ -2311,7 +2311,7 @@ diff --git a/dlls/wined3d/vertexdeclaration.c b/dlls/wined3d/vertexdeclaration.c ULONG CDECL wined3d_vertex_declaration_decref(struct wined3d_vertex_declaration *declaration) { ULONG refcount = InterlockedDecrement(&declaration->ref); -@@ -62,9 +64,15 @@ +@@ -64,9 +66,15 @@ if (!refcount) { @@ -2892,7 +2892,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c const void *idx_data, UINT start_idx, INT base_vertex_index, UINT start_instance, UINT instance_count) { if (idx_size) -@@ -85,7 +89,11 @@ +@@ -95,7 +99,11 @@ */ /* Context activation is done by the caller. */ @@ -2904,7 +2904,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c const struct wined3d_stream_info *si, UINT NumVertexes, GLenum glPrimType, const void *idxData, UINT idxSize, UINT startIdx) { -@@ -93,6 +101,9 @@ +@@ -103,6 +111,9 @@ const WORD *pIdxBufS = NULL; const DWORD *pIdxBufL = NULL; UINT vx_index; @@ -2914,7 +2914,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c LONG SkipnStrides = startIdx; BOOL pixelShader = use_ps(state); BOOL specular_fog = FALSE; -@@ -442,7 +453,11 @@ +@@ -452,7 +463,11 @@ } /* Context activation is done by the caller. */ @@ -2926,7 +2926,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c const struct wined3d_stream_info *si, UINT numberOfVertices, GLenum glPrimitiveType, const void *idxData, UINT idxSize, UINT startIdx) { -@@ -499,7 +514,11 @@ +@@ -509,7 +524,11 @@ } /* Context activation is done by the caller. */ @@ -2938,7 +2938,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c const struct wined3d_stream_info *si, UINT numberOfVertices, GLenum glPrimitiveType, const void *idxData, UINT idxSize, UINT startIdx, UINT base_vertex_index, UINT instance_count) { -@@ -584,10 +603,17 @@ +@@ -594,10 +613,17 @@ } /* Routine common to the draw primitive and draw indexed primitive routines */ @@ -2956,7 +2956,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c const struct wined3d_stream_info *stream_info; struct wined3d_event_query *ib_query = NULL; struct wined3d_stream_info si_emulated; -@@ -600,6 +626,7 @@ +@@ -610,6 +636,7 @@ if (!index_count) return; @@ -2964,7 +2964,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c context = context_acquire(device, wined3d_rendertarget_view_get_surface(state->fb.render_targets[0])); if (!context->valid) { -@@ -641,6 +668,49 @@ +@@ -651,6 +678,49 @@ wined3d_cs_switch_onscreen_ds(device->cs, context, ds); if (ds->resource.locations & location) @@ -3014,7 +3014,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c SetRect(¤t_rect, 0, 0, ds->ds_current_size.cx, ds->ds_current_size.cy); else SetRectEmpty(¤t_rect); -@@ -653,6 +723,7 @@ +@@ -663,6 +733,7 @@ } } @@ -3022,7 +3022,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c if (!context_apply_draw_state(context, device, state)) { context_release(context); -@@ -663,6 +734,18 @@ +@@ -673,6 +744,18 @@ if (state->fb.depth_stencil && state->render_states[WINED3D_RS_ZWRITEENABLE]) { struct wined3d_surface *ds = wined3d_rendertarget_view_get_surface(state->fb.depth_stencil); @@ -3041,7 +3041,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c DWORD location = context->render_offscreen ? ds->container->resource.draw_binding : WINED3D_LOCATION_DRAWABLE; surface_modify_ds_location(ds, location, ds->ds_current_size.cx, ds->ds_current_size.cy); -@@ -745,6 +828,7 @@ +@@ -755,6 +838,7 @@ else WARN_(d3d_perf)("Using immediate mode with vertex shaders for half float emulation.\n"); @@ -3049,7 +3049,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c draw_strided_slow_vs(context, state, stream_info, index_count, state->gl_primitive_type, idx_data, idx_size, start_idx); } -@@ -763,6 +847,26 @@ +@@ -773,6 +857,26 @@ else { draw_strided_fast(gl_info, state->gl_primitive_type, index_count, idx_size, idx_data, @@ -3726,7 +3726,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; -@@ -3351,6 +3643,10 @@ +@@ -3360,6 +3652,10 @@ HRESULT CDECL wined3d_device_draw_indexed_primitive(struct wined3d_device *device, UINT start_idx, UINT index_count) { @@ -3737,7 +3737,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) -@@ -3369,6 +3665,15 @@ +@@ -3378,6 +3674,15 @@ return WINED3DERR_INVALIDCALL; } @@ -3753,7 +3753,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; -@@ -3384,6 +3689,7 @@ +@@ -3393,6 +3698,7 @@ } /* This is a helper function for UpdateTexture, there is no UpdateVolume method in D3D. */ @@ -3761,7 +3761,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) { -@@ -3423,6 +3729,101 @@ +@@ -3432,6 +3738,101 @@ /* Make sure that the destination texture is loaded. */ wined3d_texture_load(dst_texture, context, FALSE); @@ -3863,7 +3863,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Update every surface level of the texture. */ switch (type) -@@ -3436,7 +3837,16 @@ +@@ -3445,7 +3846,16 @@ { src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i)); dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)); @@ -3880,7 +3880,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } break; } -@@ -3450,7 +3860,16 @@ +@@ -3459,7 +3869,16 @@ { src_surface = surface_from_resource(wined3d_texture_get_sub_resource(src_texture, i)); dst_surface = surface_from_resource(wined3d_texture_get_sub_resource(dst_texture, i)); @@ -3897,7 +3897,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } break; } -@@ -3459,6 +3878,7 @@ +@@ -3468,6 +3887,7 @@ { for (i = 0; i < level_count; ++i) { @@ -3905,7 +3905,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)), volume_from_resource(wined3d_texture_get_sub_resource(dst_texture, i))); -@@ -3515,6 +3935,24 @@ +@@ -3524,6 +3944,24 @@ } wined3d_cs_emit_update_texture(device->cs, src_texture, dst_texture); @@ -3930,7 +3930,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -3577,8 +4015,13 @@ +@@ -3586,8 +4024,13 @@ if (state->render_states[WINED3D_RS_ZENABLE] || state->render_states[WINED3D_RS_ZWRITEENABLE] || state->render_states[WINED3D_RS_STENCILENABLE]) { @@ -3944,7 +3944,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -3675,6 +4118,7 @@ +@@ -3684,6 +4127,7 @@ struct wined3d_surface *src_surface, const RECT *src_rect, struct wined3d_surface *dst_surface, const POINT *dst_point) { @@ -3952,7 +3952,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; -@@ -3682,6 +4126,7 @@ +@@ -3691,6 +4135,7 @@ RECT r, dst_rect; POINT p; @@ -3960,7 +3960,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)); -@@ -3693,6 +4138,7 @@ +@@ -3702,6 +4147,7 @@ return WINED3DERR_INVALIDCALL; } @@ -3968,7 +3968,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"); -@@ -3755,6 +4201,9 @@ +@@ -3764,6 +4210,9 @@ wined3d_cs_emit_update_surface(device->cs, src_surface, src_rect, dst_surface, dst_point); return WINED3D_OK; @@ -3978,7 +3978,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } void CDECL wined3d_device_copy_resource(struct wined3d_device *device, -@@ -3856,8 +4305,14 @@ +@@ -3865,8 +4314,14 @@ rect = &r; } @@ -3993,7 +3993,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, -@@ -3871,6 +4326,7 @@ +@@ -3880,6 +4335,7 @@ return NULL; } @@ -4001,7 +4001,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return device->state.fb.render_targets[view_idx]; } -@@ -3886,6 +4342,22 @@ +@@ -3895,6 +4351,22 @@ { struct wined3d_rendertarget_view *prev; struct wined3d_fb_state *fb = &device->state.fb; @@ -4024,7 +4024,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); -@@ -3925,6 +4397,7 @@ +@@ -3934,6 +4406,7 @@ } @@ -4032,7 +4032,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; -@@ -3932,6 +4405,15 @@ +@@ -3941,6 +4414,15 @@ if (view) wined3d_rendertarget_view_incref(view); fb->render_targets[view_idx] = view; @@ -4048,7 +4048,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. */ -@@ -3943,6 +4425,7 @@ +@@ -3952,6 +4434,7 @@ void CDECL wined3d_device_set_depth_stencil_view(struct wined3d_device *device, struct wined3d_rendertarget_view *view) { @@ -4056,7 +4056,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; -@@ -3967,6 +4450,79 @@ +@@ -3976,6 +4459,79 @@ { TRACE("device %p, x_hotspot %u, y_hotspot %u, cursor_image %p.\n", device, x_hotspot, y_hotspot, cursor_image); @@ -4136,7 +4136,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (cursor_image) { -@@ -4002,8 +4558,16 @@ +@@ -4011,8 +4567,16 @@ * 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. */ @@ -4153,7 +4153,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->cursorWidth = cursor_image->resource.width; device->cursorHeight = cursor_image->resource.height; -@@ -4103,6 +4667,12 @@ +@@ -4112,6 +4676,12 @@ else SetCursor(NULL); } @@ -4166,7 +4166,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return oldVisible; } -@@ -4113,8 +4683,10 @@ +@@ -4122,8 +4692,10 @@ TRACE("device %p.\n", device); @@ -4177,7 +4177,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); -@@ -4122,6 +4694,7 @@ +@@ -4131,6 +4703,7 @@ if (resource->pool == WINED3D_POOL_MANAGED && !resource->map_count) { TRACE("Evicting %p.\n", resource); @@ -4185,7 +4185,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_evict_resource(device->cs, resource); } } -@@ -4142,6 +4715,37 @@ +@@ -4151,6 +4724,37 @@ gl_info = context->gl_info; wine_rb_clear(&device->samplers, device_free_sampler, NULL); @@ -4223,7 +4223,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (device->depth_blt_texture) { -@@ -4162,6 +4766,7 @@ +@@ -4171,6 +4775,7 @@ HeapFree(GetProcessHeap(), 0, swapchain->context); swapchain->context = NULL; @@ -4231,7 +4231,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c swapchain->num_contexts = 0; } -@@ -4181,6 +4786,14 @@ +@@ -4190,6 +4795,14 @@ static HRESULT create_primary_opengl_context(struct wined3d_device *device, struct wined3d_swapchain *swapchain) { @@ -4246,7 +4246,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, -@@ -4197,6 +4810,7 @@ +@@ -4206,6 +4819,7 @@ return hr; } @@ -4254,7 +4254,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)) { -@@ -4207,6 +4821,34 @@ +@@ -4216,6 +4830,34 @@ } wined3d_cs_emit_create_dummy_textures(device->cs); @@ -4289,7 +4289,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c return WINED3D_OK; } -@@ -4226,8 +4868,10 @@ +@@ -4235,8 +4877,10 @@ unsigned int i; TRACE("device %p, swapchain_desc %p, mode %p, callback %p.\n", device, swapchain_desc, mode, callback); @@ -4300,7 +4300,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (!(swapchain = wined3d_device_get_swapchain(device, 0))) { -@@ -4243,9 +4887,21 @@ +@@ -4252,9 +4896,21 @@ wined3d_texture_decref(device->logo_texture); device->logo_texture = NULL; } @@ -4322,7 +4322,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4254,6 +4910,7 @@ +@@ -4263,6 +4919,7 @@ } wined3d_device_set_depth_stencil_view(device, NULL); @@ -4330,7 +4330,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (reset_state) { state_unbind_resources(&device->state); -@@ -4263,6 +4920,12 @@ +@@ -4272,6 +4929,12 @@ { wined3d_surface_decref(device->cs->onscreen_depth_stencil); device->cs->onscreen_depth_stencil = NULL; @@ -4343,7 +4343,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } if (reset_state) -@@ -4275,6 +4938,7 @@ +@@ -4284,6 +4947,7 @@ } } @@ -4351,7 +4351,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 -@@ -4296,6 +4960,7 @@ +@@ -4305,6 +4969,7 @@ } device->cs->ops->finish(device->cs); @@ -4359,7 +4359,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c /* Is it necessary to recreate the gl context? Actually every setting can be changed * on an existing gl context, so there's no real need for recreation. * -@@ -4431,6 +5096,13 @@ +@@ -4440,6 +5105,13 @@ } } @@ -4373,7 +4373,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c if (swapchain->desc.enable_auto_depth_stencil) { struct wined3d_resource_desc surface_desc; -@@ -4468,6 +5140,13 @@ +@@ -4477,6 +5149,13 @@ wined3d_device_set_depth_stencil_view(device, device->auto_depth_stencil_view); } @@ -4387,7 +4387,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))) -@@ -4550,12 +5229,20 @@ +@@ -4559,12 +5238,20 @@ } wined3d_cs_emit_reset_state(device->cs); state_cleanup(&device->state); @@ -4408,7 +4408,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; -@@ -4564,6 +5251,7 @@ +@@ -4573,6 +5260,7 @@ } else if (device->back_buffer_view) { @@ -4416,7 +4416,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); -@@ -4579,6 +5267,24 @@ +@@ -4588,6 +5276,24 @@ state->scissor_rect.left = 0; state->scissor_rect.right = swapchain->desc.backbuffer_width; state->scissor_rect.bottom = swapchain->desc.backbuffer_height; @@ -4441,7 +4441,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -4657,6 +5363,10 @@ +@@ -4666,6 +5372,10 @@ TRACE("device %p, resource %p, type %s.\n", device, resource, debug_d3dresourcetype(type)); @@ -4452,7 +4452,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c switch (type) { case WINED3D_RTYPE_SURFACE: -@@ -4667,6 +5377,7 @@ +@@ -4676,6 +5386,7 @@ for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -4460,7 +4460,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); -@@ -4678,6 +5389,19 @@ +@@ -4687,6 +5398,19 @@ { ERR("Surface %p is still in use as depth/stencil buffer.\n", surface); device->state.fb.depth_stencil = NULL; @@ -4480,7 +4480,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c } } break; -@@ -4840,7 +5564,11 @@ +@@ -4849,7 +5573,11 @@ device->blitter = adapter->blitter; @@ -4492,7 +4492,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); -@@ -4939,6 +5667,7 @@ +@@ -4948,6 +5676,7 @@ else return CallWindowProcA(proc, window, message, wparam, lparam); } @@ -4500,7 +4500,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, -@@ -4992,3 +5721,4 @@ +@@ -5001,3 +5730,4 @@ wined3d_device_destroy_bo(device, context, bo); } @@ -4524,7 +4524,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c unsigned int i, extra_constants_needed = 0; const struct wined3d_shader_lconst *lconst; const char *prefix; -@@ -1200,7 +1207,11 @@ +@@ -1203,7 +1210,11 @@ { UINT in_count = min(vec4_varyings(version->major, gl_info), shader->limits->packed_input); @@ -4536,7 +4536,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c shader_addline(buffer, "varying vec4 %s_link[%u];\n", prefix, in_count); shader_addline(buffer, "vec4 %s_in[%u];\n", prefix, in_count); } -@@ -1241,6 +1252,7 @@ +@@ -1244,6 +1255,7 @@ } else { @@ -4544,7 +4544,7 @@ diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c /* This happens because we do not have proper tracking of the * constant registers that are actually used, only the max * limit of the shader version. -@@ -1249,6 +1261,23 @@ +@@ -1252,6 +1264,23 @@ * it and just create the uniform. */ FIXME("Cannot find a free uniform for vpos correction params\n"); @@ -9519,7 +9519,7 @@ diff --git a/dlls/wined3d/buffer.c b/dlls/wined3d/buffer.c diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c -@@ -5340,9 +5340,15 @@ +@@ -5341,9 +5341,15 @@ DebugBreak(); }