diff --git a/patches/Staging/definition b/patches/Staging/definition deleted file mode 100644 index 729dafcc..00000000 --- a/patches/Staging/definition +++ /dev/null @@ -1 +0,0 @@ -Depends: kernel32-BeingDebugged diff --git a/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch b/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch index caaedec9..9ff1b6ba 100644 --- a/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch +++ b/patches/ddraw-Device_Caps/0003-ddraw-Set-ddsOldCaps-correctly-in-ddraw7_GetCaps.patch @@ -1,4 +1,4 @@ -From bc8e93593c9115eb741e1900d8d37ae05c1ba24b Mon Sep 17 00:00:00 2001 +From 336cf41969e853ca0044261f00ed55ac6f668ff1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 4 Mar 2016 22:22:42 +0100 Subject: ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps. @@ -12,7 +12,7 @@ Subject: ddraw: Set ddsOldCaps correctly in ddraw7_GetCaps. 5 files changed, 106 insertions(+) diff --git a/dlls/ddraw/ddraw.c b/dlls/ddraw/ddraw.c -index f55ab0a4186..c1ee8be5014 100644 +index fb91722943e..4b9d9fbf876 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c @@ -1554,6 +1554,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD @@ -109,11 +109,11 @@ index db09e5d8975..53279059105 100644 + test_caps(); } diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c -index 0693dbcbc84..c3e36fdba17 100644 +index 830da89bba2..7ba77be3406 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c -@@ -12772,6 +12772,31 @@ static void test_surface_desc_size(void) - ok(!refcount, "DirectDraw has %u references left.\n", refcount); +@@ -12885,6 +12885,31 @@ static void test_get_surface_from_dc(void) + DestroyWindow(window); } +static void test_caps(void) @@ -144,18 +144,18 @@ index 0693dbcbc84..c3e36fdba17 100644 START_TEST(ddraw4) { IDirectDraw4 *ddraw; -@@ -12874,4 +12899,5 @@ START_TEST(ddraw4) - test_transform_vertices(); +@@ -12988,4 +13013,5 @@ START_TEST(ddraw4) test_display_mode_surface_pixel_format(); test_surface_desc_size(); + test_get_surface_from_dc(); + test_caps(); } diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c -index 7d6b4e9e311..93ef06a864c 100644 +index ba0e4a96e0f..be70456555e 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c -@@ -12463,6 +12463,31 @@ static void test_surface_desc_size(void) - ok(!refcount, "DirectDraw has %u references left.\n", refcount); +@@ -12576,6 +12576,31 @@ static void test_get_surface_from_dc(void) + DestroyWindow(window); } +static void test_caps(void) @@ -186,10 +186,10 @@ index 7d6b4e9e311..93ef06a864c 100644 START_TEST(ddraw7) { HMODULE module = GetModuleHandleA("ddraw.dll"); -@@ -12575,4 +12600,5 @@ START_TEST(ddraw7) - test_edge_antialiasing_blending(); +@@ -12689,4 +12714,5 @@ START_TEST(ddraw7) test_display_mode_surface_pixel_format(); test_surface_desc_size(); + test_get_surface_from_dc(); + test_caps(); } -- diff --git a/patches/kernel32-BeingDebugged/0001-kernel32-Replace-Peb-BeingDebugged-check-by-CheckRem.patch b/patches/kernel32-BeingDebugged/0001-kernel32-Replace-Peb-BeingDebugged-check-by-CheckRem.patch deleted file mode 100644 index 11527b80..00000000 --- a/patches/kernel32-BeingDebugged/0001-kernel32-Replace-Peb-BeingDebugged-check-by-CheckRem.patch +++ /dev/null @@ -1,54 +0,0 @@ -From 8a9f2fac2659ff9d140aecd553dcdcbc46724154 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Tue, 24 Jan 2017 19:18:13 +0800 -Subject: kernel32: Replace Peb->BeingDebugged check by - CheckRemoteDebuggerPresent(). - -misctool.dll from AmiBroker on PROCESS_ATTACH event intentionally sets -teb->peb->BeingDebugged to random value returned by rdtsc instruction, -but that doesn't generate exceptions or debug events under Windows. ---- - dlls/kernel32/process.c | 6 +++++- - include/winbase.h | 1 + - 2 files changed, 6 insertions(+), 1 deletion(-) - -diff --git a/dlls/kernel32/process.c b/dlls/kernel32/process.c -index 0cb3d9bdcb7..70c38ebdf0d 100644 ---- a/dlls/kernel32/process.c -+++ b/dlls/kernel32/process.c -@@ -1085,6 +1085,7 @@ static inline DWORD call_process_entry( PEB *peb, LPTHREAD_START_ROUTINE entry ) - */ - static DWORD WINAPI start_process( LPTHREAD_START_ROUTINE entry ) - { -+ BOOL being_debugged; - PEB *peb = NtCurrentTeb()->Peb; - - if (!entry) -@@ -1098,8 +1099,11 @@ static DWORD WINAPI start_process( LPTHREAD_START_ROUTINE entry ) - DPRINTF( "%04x:Starting process %s (entryproc=%p)\n", GetCurrentThreadId(), - debugstr_w(peb->ProcessParameters->ImagePathName.Buffer), entry ); - -+ if (!CheckRemoteDebuggerPresent( GetCurrentProcess(), &being_debugged )) -+ being_debugged = FALSE; -+ - SetLastError( 0 ); /* clear error code */ -- if (peb->BeingDebugged) DbgBreakPoint(); -+ if (being_debugged) DbgBreakPoint(); - return call_process_entry( peb, entry ); - } - -diff --git a/include/winbase.h b/include/winbase.h -index bf14d790f43..92d112455e9 100644 ---- a/include/winbase.h -+++ b/include/winbase.h -@@ -1737,6 +1737,7 @@ WINBASEAPI BOOL WINAPI CancelTimerQueueTimer(HANDLE,HANDLE); - WINBASEAPI BOOL WINAPI CancelWaitableTimer(HANDLE); - WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3A(const char*,char*,DWORD,BOOL*,BOOL*); - WINBASEAPI BOOL WINAPI CheckNameLegalDOS8Dot3W(const WCHAR*, char*,DWORD,BOOL*,BOOL*); -+WINBASEAPI BOOL WINAPI CheckRemoteDebuggerPresent(HANDLE,PBOOL); - WINBASEAPI BOOL WINAPI ChangeTimerQueueTimer(HANDLE,HANDLE,ULONG,ULONG); - WINADVAPI BOOL WINAPI CheckTokenMembership(HANDLE,PSID,PBOOL); - WINBASEAPI BOOL WINAPI ClearCommBreak(HANDLE); --- -2.11.0 - diff --git a/patches/kernel32-BeingDebugged/definition b/patches/kernel32-BeingDebugged/definition deleted file mode 100644 index 77fa1dd8..00000000 --- a/patches/kernel32-BeingDebugged/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [41648] Replace Peb->BeingDebugged check by CheckRemoteDebuggerPresent diff --git a/patches/ntdll-CLI_Images/definition b/patches/ntdll-CLI_Images/definition index 2a9cf6c9..1d7c420f 100644 --- a/patches/ntdll-CLI_Images/definition +++ b/patches/ntdll-CLI_Images/definition @@ -1,3 +1,2 @@ Fixes: [38661] Implement proper handling of CLI .NET images in Wine library loader Depends: mscoree-CorValidateImage -Depends: kernel32-BeingDebugged diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 74ec06fe..1292fba8 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "06c5a9ab55751b1c66ea0847aea4d4a45d8d343c" + echo "9c72376c8cc03a4ea86dddaa6d18a93a1a33fc73" } # Show version information @@ -174,7 +174,6 @@ patch_enable_all () enable_inseng_Implementation="$1" enable_iphlpapi_System_Ping="$1" enable_iphlpapi_TCP_Table="$1" - enable_kernel32_BeingDebugged="$1" enable_kernel32_COMSPEC="$1" enable_kernel32_CopyFileEx="$1" enable_kernel32_Cwd_Startup_Info="$1" @@ -736,9 +735,6 @@ patch_enable () iphlpapi-TCP_Table) enable_iphlpapi_TCP_Table="$2" ;; - kernel32-BeingDebugged) - enable_kernel32_BeingDebugged="$2" - ;; kernel32-COMSPEC) enable_kernel32_COMSPEC="$2" ;; @@ -2280,13 +2276,9 @@ if test "$enable_ntdll_DllRedirects" -eq 1; then fi if test "$enable_ntdll_CLI_Images" -eq 1; then - if test "$enable_kernel32_BeingDebugged" -gt 1; then - abort "Patchset kernel32-BeingDebugged disabled, but ntdll-CLI_Images depends on that." - fi if test "$enable_mscoree_CorValidateImage" -gt 1; then abort "Patchset mscoree-CorValidateImage disabled, but ntdll-CLI_Images depends on that." fi - enable_kernel32_BeingDebugged=1 enable_mscoree_CorValidateImage=1 fi @@ -2430,13 +2422,6 @@ if test "$enable_advapi32_LsaLookupSids" -eq 1; then enable_server_Misc_ACL=1 fi -if test "$enable_Staging" -eq 1; then - if test "$enable_kernel32_BeingDebugged" -gt 1; then - abort "Patchset kernel32-BeingDebugged disabled, but Staging depends on that." - fi - enable_kernel32_BeingDebugged=1 -fi - # If autoupdate is enabled then create a tempfile to keep track of all patches if test "$enable_patchlist" -eq 1; then @@ -2527,26 +2512,8 @@ if test "$enable_Pipelight" -eq 1; then ) >> "$patchlist" fi -# Patchset kernel32-BeingDebugged -# | -# | This patchset fixes the following Wine bugs: -# | * [#41648] Replace Peb->BeingDebugged check by CheckRemoteDebuggerPresent -# | -# | Modified files: -# | * dlls/kernel32/process.c, include/winbase.h -# | -if test "$enable_kernel32_BeingDebugged" -eq 1; then - patch_apply kernel32-BeingDebugged/0001-kernel32-Replace-Peb-BeingDebugged-check-by-CheckRem.patch - ( - printf '%s\n' '+ { "Dmitry Timoshkov", "kernel32: Replace Peb->BeingDebugged check by CheckRemoteDebuggerPresent().", 1 },'; - ) >> "$patchlist" -fi - # Patchset Staging # | -# | This patchset has the following (direct or indirect) dependencies: -# | * kernel32-BeingDebugged -# | # | Modified files: # | * dlls/kernel32/process.c, dlls/ntdll/misc.c, dlls/ntdll/ntdll.spec, include/wine/library.h, libs/wine/Makefile.in, # | libs/wine/config.c, libs/wine/loader.c, libs/wine/wine.def, libs/wine/wine.map, loader/main.c @@ -5192,7 +5159,7 @@ fi # Patchset ntdll-CLI_Images # | # | This patchset has the following (direct or indirect) dependencies: -# | * kernel32-BeingDebugged, mscoree-CorValidateImage +# | * mscoree-CorValidateImage # | # | This patchset fixes the following Wine bugs: # | * [#38661] Implement proper handling of CLI .NET images in Wine library loader diff --git a/patches/wined3d-CSMT_Main/0030-wined3d-Send-create_buffer_texture-create_texture_vi.patch b/patches/wined3d-CSMT_Main/0030-wined3d-Send-create_buffer_texture-create_texture_vi.patch index 5867d9f8..3d4d33ba 100644 --- a/patches/wined3d-CSMT_Main/0030-wined3d-Send-create_buffer_texture-create_texture_vi.patch +++ b/patches/wined3d-CSMT_Main/0030-wined3d-Send-create_buffer_texture-create_texture_vi.patch @@ -1,4 +1,4 @@ -From 3e3560c91a7fc987f8dd949b93f538f9f6b70013 Mon Sep 17 00:00:00 2001 +From 2f3f8e0f66c51a459b0a2bbd25dc7f6a7c3fe6bd Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 7 Feb 2017 15:02:44 +0100 Subject: wined3d: Send create_buffer_texture / create_texture_view through the @@ -11,7 +11,7 @@ Subject: wined3d: Send create_buffer_texture / create_texture_view through the 3 files changed, 92 insertions(+), 7 deletions(-) diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 1015baf99c5..71119320f56 100644 +index 51f315ee500..4778b73b0dc 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -91,6 +91,8 @@ enum wined3d_cs_op @@ -23,7 +23,7 @@ index 1015baf99c5..71119320f56 100644 WINED3D_CS_OP_STOP, }; -@@ -498,6 +500,24 @@ struct wined3d_cs_buffer_copy +@@ -499,6 +501,24 @@ struct wined3d_cs_buffer_copy unsigned int size; }; @@ -48,7 +48,7 @@ index 1015baf99c5..71119320f56 100644 static inline BOOL wined3d_cs_process_block(struct wined3d_cs *cs, struct wined3d_cs_block *block); static void wined3d_cs_mt_submit(struct wined3d_cs *cs); -@@ -2491,7 +2511,6 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs, +@@ -2507,7 +2527,6 @@ void wined3d_cs_emit_texture_add_dirty_region(struct wined3d_cs *cs, cs->ops->submit(cs); } @@ -56,7 +56,7 @@ index 1015baf99c5..71119320f56 100644 static UINT wined3d_cs_exec_buffer_copy(struct wined3d_cs *cs, const void *data) { const struct wined3d_cs_buffer_copy *op = data; -@@ -2526,6 +2545,55 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d +@@ -2542,6 +2561,55 @@ void wined3d_cs_emit_buffer_copy(struct wined3d_cs *cs, struct wined3d_buffer *d cs->ops->submit(cs); } @@ -112,7 +112,7 @@ index 1015baf99c5..71119320f56 100644 static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void *data) = { /* WINED3D_CS_OP_FENCE */ wined3d_cs_exec_fence, -@@ -2582,6 +2650,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2598,6 +2666,9 @@ static UINT (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_SAMPLER_INIT */ wined3d_cs_exec_sampler_init, /* WINED3D_CS_OP_TEXTURE_ADD_DIRTY_REGION */ wined3d_cs_exec_texture_add_dirty_region, /* WINED3D_CS_OP_BUFFER_COPY */ wined3d_cs_exec_buffer_copy, @@ -123,10 +123,10 @@ index 1015baf99c5..71119320f56 100644 static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size) diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c -index c0e33dac92b..e2c5d82608d 100644 +index b97a25add3e..60bb483e7ff 100644 --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c -@@ -64,7 +64,7 @@ static GLenum get_texture_view_target(const struct wined3d_view_desc *desc, +@@ -72,7 +72,7 @@ static GLenum get_texture_view_target(const struct wined3d_gl_info *gl_info, return texture->target; } @@ -135,7 +135,7 @@ index c0e33dac92b..e2c5d82608d 100644 const struct wined3d_view_desc *desc, struct wined3d_texture *texture, const struct wined3d_format *view_format) { -@@ -125,7 +125,7 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target +@@ -133,7 +133,7 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target context_release(context); } @@ -144,7 +144,7 @@ index c0e33dac92b..e2c5d82608d 100644 struct wined3d_buffer *buffer, const struct wined3d_format *view_format) { const struct wined3d_gl_info *gl_info; -@@ -467,7 +467,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ +@@ -475,7 +475,7 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ FIXME("Ignoring buffer range %u-%u.\n", desc->u.buffer.start_idx, desc->u.buffer.count); } @@ -153,7 +153,7 @@ index c0e33dac92b..e2c5d82608d 100644 } } else -@@ -498,7 +498,8 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ +@@ -506,7 +506,8 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ else if (resource->format->typeless_id == view_format->typeless_id && resource->format->gl_view_class == view_format->gl_view_class) { @@ -163,22 +163,22 @@ index c0e33dac92b..e2c5d82608d 100644 } else { -@@ -663,8 +664,8 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces +@@ -671,8 +672,8 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces if (desc->u.texture.layer_idx || desc->u.texture.layer_count != depth_or_layer_count) { -- create_texture_view(&view->gl_view, get_texture_view_target(desc, texture), +- create_texture_view(&view->gl_view, get_texture_view_target(gl_info, desc, texture), - desc, texture, view->format); + wined3d_cs_emit_create_texture_view(resource->device->cs, &view->gl_view, -+ get_texture_view_target(desc, texture), desc, texture, view->format); ++ get_texture_view_target(gl_info, desc, texture), desc, texture, view->format); } view->layer_idx = desc->u.texture.layer_idx; diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 821b296a919..1f0fbf23b18 100644 +index 76394cac3ca..dbf6ef47134 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3183,6 +3183,8 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource) +@@ -3222,6 +3222,8 @@ static inline void wined3d_resource_wait_idle(struct wined3d_resource *resource) while (InterlockedCompareExchange(&resource->access_count, 0, 0)); } @@ -187,7 +187,7 @@ index 821b296a919..1f0fbf23b18 100644 struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN; void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; -@@ -3198,9 +3200,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * +@@ -3237,9 +3239,14 @@ void wined3d_cs_emit_clear(struct wined3d_cs *cs, DWORD rect_count, const RECT * void wined3d_cs_emit_clear_rtv(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view, const RECT *rect, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil, const struct blit_shader *blitter) DECLSPEC_HIDDEN; @@ -202,7 +202,7 @@ index 821b296a919..1f0fbf23b18 100644 void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object) DECLSPEC_HIDDEN; void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, -@@ -3382,6 +3389,12 @@ struct wined3d_gl_view +@@ -3421,6 +3428,12 @@ struct wined3d_gl_view GLuint name; }; diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index fdee660a..2dc879c0 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -68,7 +68,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c if (!--context->level) { if (context_restore_pixel_format(context)) -@@ -1723,6 +1731,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1719,6 +1727,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -82,7 +82,7 @@ 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) { -@@ -2044,6 +2059,9 @@ out: +@@ -2027,6 +2042,9 @@ out: if (hdc) wined3d_release_dc(swapchain->win_handle, hdc); device->shader_backend->shader_free_context_data(ret); device->adapter->fragment_pipe->free_context_data(ret); @@ -92,7 +92,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -2091,6 +2109,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont +@@ -2074,6 +2092,9 @@ 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->fbo_key); @@ -102,7 +102,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2640,7 +2661,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge +@@ -2627,7 +2648,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge } /* Context activation is done by the caller. */ @@ -114,7 +114,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c UINT rt_count, const struct wined3d_fb_state *fb) { struct wined3d_rendertarget_view **rts = fb->render_targets; -@@ -2649,7 +2674,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2636,7 +2661,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win DWORD rt_mask = 0, *cur_mask; UINT i; @@ -126,7 +126,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c || rt_count != gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, dsv)) -@@ -2694,6 +2723,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2681,6 +2710,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win rt_mask = context_generate_rt_mask_no_fbo(context, rt_count ? wined3d_rendertarget_view_get_surface(rts[0])->container : NULL); } @@ -137,7 +137,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))) -@@ -2733,7 +2766,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2720,7 +2753,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win gl_info->gl_ops.gl.p_glEnable(GL_SCISSOR_TEST); if (rt_count && gl_info->supported[ARB_FRAMEBUFFER_SRGB]) { @@ -150,7 +150,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c gl_info->gl_ops.gl.p_glEnable(GL_FRAMEBUFFER_SRGB); else gl_info->gl_ops.gl.p_glDisable(GL_FRAMEBUFFER_SRGB); -@@ -2750,7 +2788,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2737,7 +2775,11 @@ 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_state *state) { @@ -162,7 +162,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; DWORD rt_mask, rt_mask_bits; unsigned int i; -@@ -2780,7 +2822,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2767,7 +2809,11 @@ 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) { DWORD rt_mask = find_draw_buffers_mask(context, state); @@ -174,7 +174,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c DWORD *cur_mask; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) -@@ -3069,6 +3115,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d +@@ -3056,6 +3102,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -185,7 +185,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c } static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum) -@@ -3503,7 +3553,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context, +@@ -3490,7 +3540,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context, const struct wined3d_device *device, const struct wined3d_state *state) { const struct StateEntry *state_table = context->state_table; @@ -197,7 +197,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c unsigned int i; WORD map; -@@ -3705,6 +3759,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str +@@ -3692,6 +3746,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str TRACE("device %p, target %p.\n", device, target); @@ -4440,7 +4440,7 @@ diff --git a/dlls/wined3d/drawprim.c b/dlls/wined3d/drawprim.c diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -1629,7 +1629,11 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context +@@ -1630,7 +1630,11 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context const struct wined3d_vec4 correction_params = { /* Position is relative to the framebuffer, not the viewport. */ @@ -4631,7 +4631,7 @@ diff --git a/dlls/wined3d/sampler.c b/dlls/wined3d/sampler.c diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -3231,7 +3231,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 +@@ -3235,7 +3235,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 UINT i; memset(args, 0, sizeof(*args)); /* FIXME: Make sure all bits are set. */ @@ -5378,7 +5378,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c swapchain_cleanup(swapchain); swapchain->parent_ops->wined3d_object_destroyed(swapchain->parent); HeapFree(GetProcessHeap(), 0, swapchain); -@@ -485,10 +492,17 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct +@@ -488,10 +495,17 @@ static void wined3d_swapchain_rotate(struct wined3d_swapchain *swapchain, struct } static void swapchain_gl_present(struct wined3d_swapchain *swapchain, @@ -5396,7 +5396,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c const struct wined3d_gl_info *gl_info; struct wined3d_texture *logo_texture; struct wined3d_context *context; -@@ -581,7 +595,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, +@@ -584,7 +598,11 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, swapchain_blit(swapchain, context, src_rect, dst_rect); } @@ -5408,7 +5408,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c gl_info->gl_ops.gl.p_glFinish(); /* call wglSwapBuffers through the gl table to avoid confusing the Steam overlay */ -@@ -619,14 +637,24 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, +@@ -622,14 +640,24 @@ static void swapchain_gl_present(struct wined3d_swapchain *swapchain, wined3d_texture_validate_location(swapchain->back_buffers[swapchain->desc.backbuffer_count - 1], 0, WINED3D_LOCATION_DISCARDED); @@ -5433,7 +5433,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } context_release(context); -@@ -692,7 +720,12 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai +@@ -695,7 +723,12 @@ static void swapchain_gdi_frontbuffer_updated(struct wined3d_swapchain *swapchai } static void swapchain_gdi_present(struct wined3d_swapchain *swapchain, @@ -5446,7 +5446,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c { struct wined3d_surface *front, *back; HBITMAP bitmap; -@@ -782,6 +815,71 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s +@@ -785,6 +818,71 @@ static void wined3d_swapchain_apply_sample_count_override(const struct wined3d_s *quality = 0; } @@ -5518,7 +5518,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3d_device *device, struct wined3d_swapchain_desc *desc, void *parent, const struct wined3d_parent_ops *parent_ops) { -@@ -908,6 +1006,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 +@@ -911,6 +1009,7 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 if (!(device->wined3d->flags & WINED3D_NO3D)) { @@ -5526,7 +5526,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c static const enum wined3d_format_id formats[] = { WINED3DFMT_D24_UNORM_S8_UINT, -@@ -963,6 +1062,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 +@@ -966,6 +1065,11 @@ static HRESULT swapchain_init(struct wined3d_swapchain *swapchain, struct wined3 } context_release(swapchain->context[0]); swapchain_update_swap_interval(swapchain); @@ -5538,7 +5538,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c } if (swapchain->desc.backbuffer_count > 0) -@@ -1290,6 +1394,9 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha +@@ -1293,6 +1397,9 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha enum wined3d_multisample_type multisample_type, unsigned int multisample_quality) { BOOL update_desc = FALSE; @@ -5548,7 +5548,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c TRACE("swapchain %p, buffer_count %u, width %u, height %u, format %s, " "multisample_type %#x, multisample_quality %#x.\n", -@@ -1301,6 +1408,11 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha +@@ -1304,6 +1411,11 @@ HRESULT CDECL wined3d_swapchain_resize_buffers(struct wined3d_swapchain *swapcha if (buffer_count && buffer_count != swapchain->desc.backbuffer_count) FIXME("Cannot change the back buffer count yet.\n"); @@ -5969,7 +5969,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c -@@ -4651,7 +4651,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w +@@ -4640,7 +4640,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w float y_offset = flip ? (center_offset - (2.0f * y) - h) / h : (center_offset - (2.0f * y) - h) / -h; @@ -5981,7 +5981,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 ? clip_control ? 1.0f : 2.0f : 0.0f; float z_offset = zenable ? clip_control ? 0.0f : -1.0f : 0.0f; -@@ -5450,7 +5454,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d +@@ -5439,7 +5443,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d break; } } @@ -5996,7 +5996,7 @@ diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c --- a/dlls/wined3d/view.c +++ b/dlls/wined3d/view.c -@@ -64,7 +64,11 @@ static GLenum get_texture_view_target(const struct wined3d_view_desc *desc, +@@ -72,7 +72,11 @@ static GLenum get_texture_view_target(const struct wined3d_gl_info *gl_info, return texture->target; } @@ -6008,7 +6008,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c const struct wined3d_view_desc *desc, struct wined3d_texture *texture, const struct wined3d_format *view_format) { -@@ -125,7 +129,11 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target +@@ -133,7 +137,11 @@ static void create_texture_view(struct wined3d_gl_view *view, GLenum view_target context_release(context); } @@ -6020,7 +6020,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c struct wined3d_buffer *buffer, const struct wined3d_format *view_format) { const struct wined3d_gl_info *gl_info; -@@ -467,7 +475,11 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ +@@ -475,7 +483,11 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ FIXME("Ignoring buffer range %u-%u.\n", desc->u.buffer.start_idx, desc->u.buffer.count); } @@ -6032,7 +6032,7 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c } } else -@@ -498,7 +510,12 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ +@@ -506,7 +518,12 @@ static HRESULT wined3d_shader_resource_view_init(struct wined3d_shader_resource_ else if (resource->format->typeless_id == view_format->typeless_id && resource->format->gl_view_class == view_format->gl_view_class) { @@ -6045,16 +6045,16 @@ diff --git a/dlls/wined3d/view.c b/dlls/wined3d/view.c } else { -@@ -663,8 +680,13 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces +@@ -671,8 +688,13 @@ static HRESULT wined3d_unordered_access_view_init(struct wined3d_unordered_acces if (desc->u.texture.layer_idx || desc->u.texture.layer_count != depth_or_layer_count) { +#if !defined(STAGING_CSMT) - create_texture_view(&view->gl_view, get_texture_view_target(desc, texture), + create_texture_view(&view->gl_view, get_texture_view_target(gl_info, desc, texture), desc, texture, view->format); +#else /* STAGING_CSMT */ + wined3d_cs_emit_create_texture_view(resource->device->cs, &view->gl_view, -+ get_texture_view_target(desc, texture), desc, texture, view->format); ++ get_texture_view_target(gl_info, desc, texture), desc, texture, view->format); +#endif /* STAGING_CSMT */ } @@ -6108,7 +6108,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1495,6 +1498,9 @@ struct wined3d_query +@@ -1496,6 +1499,9 @@ struct wined3d_query const void *data; DWORD data_size; const struct wined3d_query_ops *query_ops; @@ -6118,7 +6118,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1536,6 +1542,9 @@ struct wined3d_occlusion_query +@@ -1537,6 +1543,9 @@ struct wined3d_occlusion_query GLuint id; struct wined3d_context *context; UINT64 samples; @@ -6128,7 +6128,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_timestamp_query -@@ -1551,6 +1560,38 @@ struct wined3d_timestamp_query +@@ -1552,6 +1561,38 @@ 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; @@ -6167,7 +6167,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1566,6 +1607,9 @@ struct wined3d_context +@@ -1567,6 +1608,9 @@ struct wined3d_context DWORD numDirtyEntries; DWORD isStateDirty[STATE_HIGHEST / (sizeof(DWORD) * CHAR_BIT) + 1]; /* Bitmap to find out quickly if a state is dirty */ unsigned int dirty_compute_states[STATE_COMPUTE_COUNT / (sizeof(unsigned int) * CHAR_BIT) + 1]; @@ -6177,7 +6177,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_device *device; struct wined3d_swapchain *swapchain; -@@ -1679,12 +1723,14 @@ struct wined3d_context +@@ -1680,12 +1724,14 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -6192,7 +6192,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); struct StateEntry -@@ -1823,7 +1869,11 @@ void context_alloc_event_query(struct wined3d_context *context, +@@ -1824,7 +1870,11 @@ void context_alloc_event_query(struct wined3d_context *context, void context_alloc_occlusion_query(struct wined3d_context *context, struct wined3d_occlusion_query *query) DECLSPEC_HIDDEN; void context_apply_blit_state(struct wined3d_context *context, const struct wined3d_device *device) DECLSPEC_HIDDEN;