From 253835e7c32ec7290ad15e83c6f3b3cd16f0ea08 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Thu, 9 Feb 2017 15:38:35 +0100 Subject: [PATCH] Rebase against 6bb8ca1e25a9cfc66f396b2ae6bc423a8057929c. --- ...sOldCaps-correctly-in-ddraw7_GetCaps.patch | 34 +-- ...-temporary-mixing-buffer-after-alloc.patch | 37 ---- patches/dsound-Clear_Mixing_Buffer/definition | 1 - ...ters-before-sound-is-multiplied-to-s.patch | 40 ++-- patches/dsound-EAX/definition | 1 - ...12-ntoskrnl.exe-Add-IoStopTimer-stub.patch | 51 ----- patches/patchinstall.sh | 121 +++-------- ...ort-for-extra-large-and-jumbo-icon-l.patch | 18 +- ...plement-NewMenu-with-new-folder-item.patch | 22 +- patches/user32-Dialog_Focus/definition | 2 +- ...lcLabelRect-should-use-the-button-fo.patch | 40 ---- ...box-rectangle-calculation-in-the-but.patch | 27 --- patches/user32-Groupbox_Rectangle/definition | 1 - .../0001-wined3d-Add-more-blend-modes.patch | 47 ---- patches/wined3d-Blend_Factor/definition | 2 - ...introduce-a-multithreaded-command-st.patch | 86 ++++---- ...e-the-framebuffer-into-wined3d_state.patch | 100 ++++----- .../wined3d-CSMT_Main/9999-IfDefined.patch | 202 +++++++++--------- ...repeated-Unhandled-blend-factor-0-me.patch | 12 +- staging/VERSION | 2 +- 20 files changed, 294 insertions(+), 552 deletions(-) delete mode 100644 patches/dsound-Clear_Mixing_Buffer/0001-dsound-Clear-the-temporary-mixing-buffer-after-alloc.patch delete mode 100644 patches/dsound-Clear_Mixing_Buffer/definition delete mode 100644 patches/ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-IoStopTimer-stub.patch delete mode 100644 patches/user32-Groupbox_Rectangle/0002-user32-BUTTON_CalcLabelRect-should-use-the-button-fo.patch delete mode 100644 patches/user32-Groupbox_Rectangle/0003-user32-Fix-groupbox-rectangle-calculation-in-the-but.patch delete mode 100644 patches/user32-Groupbox_Rectangle/definition delete mode 100644 patches/wined3d-Blend_Factor/0001-wined3d-Add-more-blend-modes.patch delete mode 100644 patches/wined3d-Blend_Factor/definition 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 0bc9b946..caaedec9 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 bbe000942fadd116e85bd64abd6633fa1d9df382 Mon Sep 17 00:00:00 2001 +From bc8e93593c9115eb741e1900d8d37ae05c1ba24b 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,10 +12,10 @@ 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 8bf38ee930f..01a9a904ef5 100644 +index f55ab0a4186..c1ee8be5014 100644 --- a/dlls/ddraw/ddraw.c +++ b/dlls/ddraw/ddraw.c -@@ -1536,6 +1536,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD +@@ -1554,6 +1554,8 @@ static HRESULT WINAPI ddraw7_GetCaps(IDirectDraw7 *iface, DDCAPS *DriverCaps, DD caps.dwCaps |= DDCAPS_ALIGNSTRIDE; caps.dwAlignStrideAlign = DDRAW_STRIDE_ALIGNMENT; @@ -25,11 +25,11 @@ index 8bf38ee930f..01a9a904ef5 100644 if(DriverCaps) diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c -index 5acbee61e00..bb873da220f 100644 +index 278b9c60069..e1a7a1a4d1c 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c -@@ -9953,6 +9953,31 @@ static void test_surface_desc_size(void) - ok(!refcount, "DirectDraw has %u references left.\n", refcount); +@@ -10163,6 +10163,31 @@ static void test_texture_load(void) + DestroyWindow(window); } +static void test_caps(void) @@ -60,17 +60,17 @@ index 5acbee61e00..bb873da220f 100644 START_TEST(ddraw1) { IDirectDraw *ddraw; -@@ -10038,4 +10063,5 @@ START_TEST(ddraw1) - test_transform_vertices(); +@@ -10249,4 +10274,5 @@ START_TEST(ddraw1) test_display_mode_surface_pixel_format(); test_surface_desc_size(); + test_texture_load(); + test_caps(); } diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c -index dc8801c3e12..9afd5e8e681 100644 +index db09e5d8975..53279059105 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c -@@ -11444,6 +11444,31 @@ static void test_surface_desc_size(void) +@@ -11487,6 +11487,31 @@ static void test_surface_desc_size(void) ok(!refcount, "DirectDraw has %u references left.\n", refcount); } @@ -102,17 +102,17 @@ index dc8801c3e12..9afd5e8e681 100644 START_TEST(ddraw2) { IDirectDraw2 *ddraw; -@@ -11538,4 +11563,5 @@ START_TEST(ddraw2) +@@ -11581,4 +11606,5 @@ START_TEST(ddraw2) test_transform_vertices(); test_display_mode_surface_pixel_format(); test_surface_desc_size(); + test_caps(); } diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c -index f2b3e0cf63b..fbefe8425b3 100644 +index 0693dbcbc84..c3e36fdba17 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c -@@ -12729,6 +12729,31 @@ static void test_surface_desc_size(void) +@@ -12772,6 +12772,31 @@ static void test_surface_desc_size(void) ok(!refcount, "DirectDraw has %u references left.\n", refcount); } @@ -144,17 +144,17 @@ index f2b3e0cf63b..fbefe8425b3 100644 START_TEST(ddraw4) { IDirectDraw4 *ddraw; -@@ -12831,4 +12856,5 @@ START_TEST(ddraw4) +@@ -12874,4 +12899,5 @@ START_TEST(ddraw4) test_transform_vertices(); test_display_mode_surface_pixel_format(); test_surface_desc_size(); + test_caps(); } diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c -index 7b88824920e..7957f1733d5 100644 +index 7d6b4e9e311..93ef06a864c 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c -@@ -12424,6 +12424,31 @@ static void test_surface_desc_size(void) +@@ -12463,6 +12463,31 @@ static void test_surface_desc_size(void) ok(!refcount, "DirectDraw has %u references left.\n", refcount); } @@ -186,7 +186,7 @@ index 7b88824920e..7957f1733d5 100644 START_TEST(ddraw7) { HMODULE module = GetModuleHandleA("ddraw.dll"); -@@ -12536,4 +12561,5 @@ START_TEST(ddraw7) +@@ -12575,4 +12600,5 @@ START_TEST(ddraw7) test_edge_antialiasing_blending(); test_display_mode_surface_pixel_format(); test_surface_desc_size(); diff --git a/patches/dsound-Clear_Mixing_Buffer/0001-dsound-Clear-the-temporary-mixing-buffer-after-alloc.patch b/patches/dsound-Clear_Mixing_Buffer/0001-dsound-Clear-the-temporary-mixing-buffer-after-alloc.patch deleted file mode 100644 index 1d9b942e..00000000 --- a/patches/dsound-Clear_Mixing_Buffer/0001-dsound-Clear-the-temporary-mixing-buffer-after-alloc.patch +++ /dev/null @@ -1,37 +0,0 @@ -From 28c420fc650438718b2fdb2c61e1a7188c404b90 Mon Sep 17 00:00:00 2001 -From: "Erich E. Hoover" -Date: Mon, 19 Dec 2016 14:17:23 -0700 -Subject: dsound: Clear the temporary mixing buffer after allocation. - -Signed-off-by: Erich E. Hoover ---- - dlls/dsound/mixer.c | 6 +++--- - 1 file changed, 3 insertions(+), 3 deletions(-) - -diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c -index 309c338cd10..880b29c43b2 100644 ---- a/dlls/dsound/mixer.c -+++ b/dlls/dsound/mixer.c -@@ -429,6 +429,9 @@ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames) - dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes); - } - -+ if(dsb->put_aux == putieee32_sum) -+ memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len); -+ - cp_fields(dsb, frames, &dsb->freqAccNum); - - if (size_bytes > 0) { -@@ -506,9 +509,6 @@ static DWORD DSOUND_MixInBuffer(IDirectSoundBufferImpl *dsb, float *mix_buffer, - - /* Resample buffer to temporary buffer specifically allocated for this purpose, if needed */ - oldpos = dsb->sec_mixpos; -- -- if(dsb->put_aux == putieee32_sum) -- memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len); - DSOUND_MixToTemporary(dsb, frames); - ibuf = dsb->device->tmp_buffer; - --- -2.11.0 - diff --git a/patches/dsound-Clear_Mixing_Buffer/definition b/patches/dsound-Clear_Mixing_Buffer/definition deleted file mode 100644 index 616763c3..00000000 --- a/patches/dsound-Clear_Mixing_Buffer/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: Clear the dsound mixing buffer after allocation diff --git a/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch b/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch index f06e4e9f..d69300aa 100644 --- a/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch +++ b/patches/dsound-EAX/0001-dsound-Apply-filters-before-sound-is-multiplied-to-s.patch @@ -1,4 +1,4 @@ -From b23019f93121d8a1a57912c4ca335fa1c534c8d7 Mon Sep 17 00:00:00 2001 +From f6d6015507f7706db9db58b851b3032c56f4b3ed Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 28 Mar 2015 08:18:10 +0100 Subject: dsound: Apply filters before sound is multiplied to speakers. @@ -7,8 +7,8 @@ Based on a patch by Mark Harmstone. --- dlls/dsound/dsound.c | 1 + dlls/dsound/dsound_private.h | 4 +- - dlls/dsound/mixer.c | 108 ++++++++++++++++++++++++++++++------------- - 3 files changed, 79 insertions(+), 34 deletions(-) + dlls/dsound/mixer.c | 110 ++++++++++++++++++++++++++++++------------- + 3 files changed, 80 insertions(+), 35 deletions(-) diff --git a/dlls/dsound/dsound.c b/dlls/dsound/dsound.c index 4d515adcaf3..65a00787098 100644 @@ -38,7 +38,7 @@ index 8e1e2dafc7c..f22849fb0a2 100644 DSVOLUMEPAN volpan; diff --git a/dlls/dsound/mixer.c b/dlls/dsound/mixer.c -index 1a99eebf30c..5b4af70093f 100644 +index 8413588edfb..a11d6c9e798 100644 --- a/dlls/dsound/mixer.c +++ b/dlls/dsound/mixer.c @@ -278,23 +278,22 @@ static inline float get_current_sample(const IDirectSoundBufferImpl *dsb, @@ -146,7 +146,7 @@ index 1a99eebf30c..5b4af70093f 100644 /** * Mix at most the given amount of data into the allocated temporary buffer * of the given secondary buffer, starting from the dsb's first currently -@@ -458,35 +473,64 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) +@@ -458,34 +473,63 @@ static inline DWORD DSOUND_BufPtrDiff(DWORD buflen, DWORD ptr1, DWORD ptr2) */ static void DSOUND_MixToTemporary(IDirectSoundBufferImpl *dsb, DWORD frames) { @@ -172,22 +172,18 @@ index 1a99eebf30c..5b4af70093f 100644 dsb->device->tmp_buffer = HeapAlloc(GetProcessHeap(), 0, size_bytes); + dsb->device->tmp_buffer_len = size_bytes; } - - if(dsb->put_aux == putieee32_sum) - memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len); +- +- cp_fields(dsb, frames, &dsb->freqAccNum); + if(dsb->put_aux == putieee32_sum) + memset(dsb->device->tmp_buffer, 0, dsb->device->tmp_buffer_len); - -- cp_fields(dsb, frames, &dsb->freqAccNum); ++ + if (using_filters) { + put = putieee32_dsp; + ostride = dsb->mix_channels * sizeof(float); + size_bytes = frames * ostride; - -- if (size_bytes > 0) { -- for (i = 0; i < dsb->num_filters; i++) { -- if (dsb->filters[i].inplace) { -- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL); ++ + if (dsb->device->dsp_buffer_len < size_bytes || !dsb->device->dsp_buffer) { + if (dsb->device->dsp_buffer) + dsb->device->dsp_buffer = HeapReAlloc(GetProcessHeap(), 0, dsb->device->dsp_buffer, size_bytes); @@ -197,12 +193,10 @@ index 1a99eebf30c..5b4af70093f 100644 + } + } -- if (FAILED(hr)) -- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i); -- } else -- WARN("filter %u has no inplace object - unsupported\n", i); -- } -- } +- if (size_bytes > 0) { +- for (i = 0; i < dsb->num_filters; i++) { +- if (dsb->filters[i].inplace) { +- hr = IMediaObjectInPlace_Process(dsb->filters[i].inplace, size_bytes, (BYTE*)dsb->device->tmp_buffer, 0, DMO_INPLACE_NORMAL); + cp_fields(dsb, put, ostride, frames, &dsb->freqAccNum); + + if (using_filters) { @@ -217,7 +211,13 @@ index 1a99eebf30c..5b4af70093f 100644 + WARN("filter %u has no inplace object - unsupported\n", i); + } + } -+ + +- if (FAILED(hr)) +- WARN("IMediaObjectInPlace_Process failed for filter %u\n", i); +- } else +- WARN("filter %u has no inplace object - unsupported\n", i); +- } +- } + istride = ostride; + ostride = dsb->device->pwfx->nChannels * sizeof(float); + for (i = 0; i < frames; i++) { diff --git a/patches/dsound-EAX/definition b/patches/dsound-EAX/definition index f3bfc9a1..85ed7831 100644 --- a/patches/dsound-EAX/definition +++ b/patches/dsound-EAX/definition @@ -1,4 +1,3 @@ Fixes: Software support for Environmental Audio Extensions (EAX) Depends: dsound-Fast_Mixer Depends: dsound-Revert_Cleanup -Depends: dsound-Clear_Mixing_Buffer diff --git a/patches/ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-IoStopTimer-stub.patch b/patches/ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-IoStopTimer-stub.patch deleted file mode 100644 index 800ef1ed..00000000 --- a/patches/ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-IoStopTimer-stub.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 36c47ef4d1227db3ac19e0328cbe038cd172df95 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 29 May 2016 15:33:58 +0200 -Subject: ntoskrnl.exe: Add IoStopTimer stub. - ---- - dlls/ntoskrnl.exe/ntoskrnl.c | 13 +++++++++++-- - dlls/ntoskrnl.exe/ntoskrnl.exe.spec | 2 +- - 2 files changed, 12 insertions(+), 3 deletions(-) - -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.c b/dlls/ntoskrnl.exe/ntoskrnl.c -index a52b5df..97a054b 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.c -+++ b/dlls/ntoskrnl.exe/ntoskrnl.c -@@ -579,9 +579,18 @@ NTSTATUS WINAPI IoInitializeTimer(PDEVICE_OBJECT DeviceObject, - /*********************************************************************** - * IoStartTimer (NTOSKRNL.EXE.@) - */ --void WINAPI IoStartTimer(PDEVICE_OBJECT DeviceObject) -+void WINAPI IoStartTimer( DEVICE_OBJECT *dev ) - { -- FIXME( "stub: %p\n", DeviceObject ); -+ FIXME( "stub: %p\n", dev ); -+} -+ -+ -+/*********************************************************************** -+ * IoStopTimer (NTOSKRNL.EXE.@) -+ */ -+void WINAPI IoStopTimer( DEVICE_OBJECT *dev ) -+{ -+ FIXME( "stub: %p\n", dev ); - } - - -diff --git a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -index b688a3f..1fb6f56 100644 ---- a/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -+++ b/dlls/ntoskrnl.exe/ntoskrnl.exe.spec -@@ -463,7 +463,7 @@ - @ stub IoStartPacket - @ stdcall IoStartTimer(ptr) - @ stub IoStatisticsLock --@ stub IoStopTimer -+@ stdcall IoStopTimer(ptr) - @ stub IoSynchronousInvalidateDeviceRelations - @ stub IoSynchronousPageWrite - @ stub IoThreadToProcess --- -2.8.0 - diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 072b77ed..77d0984a 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,13 +52,13 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "e08ed6cac218fc09044d06d3cbe2a54f7ec898cf" + echo "6bb8ca1e25a9cfc66f396b2ae6bc423a8057929c" } # Show version information version() { - echo "Wine Staging 2.1" + echo "Wine Staging 2.2 (unreleased)" echo "Copyright (C) 2014-2017 the Wine Staging project authors." echo "" echo "Patchset to be applied on upstream Wine:" @@ -145,7 +145,6 @@ patch_enable_all () enable_ddraw_Write_Vtable="$1" enable_dinput_Initialize="$1" enable_dmusic_SynthPort_IKsControl="$1" - enable_dsound_Clear_Mixing_Buffer="$1" enable_dsound_EAX="$1" enable_dsound_Fast_Mixer="$1" enable_dsound_Revert_Cleanup="$1" @@ -403,7 +402,6 @@ patch_enable_all () enable_winecfg_Unmounted_Devices="$1" enable_wined3d_1DTextures="$1" enable_wined3d_Accounting="$1" - enable_wined3d_Blend_Factor="$1" enable_wined3d_CSMT_Helper="$1" enable_wined3d_CSMT_Main="$1" enable_wined3d_DXTn="$1" @@ -651,9 +649,6 @@ patch_enable () dmusic-SynthPort_IKsControl) enable_dmusic_SynthPort_IKsControl="$2" ;; - dsound-Clear_Mixing_Buffer) - enable_dsound_Clear_Mixing_Buffer="$2" - ;; dsound-EAX) enable_dsound_EAX="$2" ;; @@ -1425,9 +1420,6 @@ patch_enable () wined3d-Accounting) enable_wined3d_Accounting="$2" ;; - wined3d-Blend_Factor) - enable_wined3d_Blend_Factor="$2" - ;; wined3d-CSMT_Helper) enable_wined3d_CSMT_Helper="$2" ;; @@ -2017,13 +2009,6 @@ if test "$enable_wined3d_CSMT_Helper" -eq 1; then enable_wined3d_Silence_FIXMEs=1 fi -if test "$enable_wined3d_Blend_Factor" -eq 1; then - if test "$enable_wined3d_Silence_FIXMEs" -gt 1; then - abort "Patchset wined3d-Silence_FIXMEs disabled, but wined3d-Blend_Factor depends on that." - fi - enable_wined3d_Silence_FIXMEs=1 -fi - if test "$enable_wineboot_ProxySettings" -eq 1; then if test "$enable_wineboot_DriveSerial" -gt 1; then abort "Patchset wineboot-DriveSerial disabled, but wineboot-ProxySettings depends on that." @@ -2377,16 +2362,12 @@ if test "$enable_dxdiagn_GetChildContainer_Leaf_Nodes" -eq 1; then fi if test "$enable_dsound_EAX" -eq 1; then - if test "$enable_dsound_Clear_Mixing_Buffer" -gt 1; then - abort "Patchset dsound-Clear_Mixing_Buffer disabled, but dsound-EAX depends on that." - fi if test "$enable_dsound_Fast_Mixer" -gt 1; then abort "Patchset dsound-Fast_Mixer disabled, but dsound-EAX depends on that." fi if test "$enable_dsound_Revert_Cleanup" -gt 1; then abort "Patchset dsound-Revert_Cleanup disabled, but dsound-EAX depends on that." fi - enable_dsound_Clear_Mixing_Buffer=1 enable_dsound_Fast_Mixer=1 enable_dsound_Revert_Cleanup=1 fi @@ -3836,18 +3817,6 @@ if test "$enable_dmusic_SynthPort_IKsControl" -eq 1; then ) >> "$patchlist" fi -# Patchset dsound-Clear_Mixing_Buffer -# | -# | Modified files: -# | * dlls/dsound/mixer.c -# | -if test "$enable_dsound_Clear_Mixing_Buffer" -eq 1; then - patch_apply dsound-Clear_Mixing_Buffer/0001-dsound-Clear-the-temporary-mixing-buffer-after-alloc.patch - ( - printf '%s\n' '+ { "Erich E. Hoover", "dsound: Clear the temporary mixing buffer after allocation.", 1 },'; - ) >> "$patchlist" -fi - # Patchset dsound-Fast_Mixer # | # | This patchset fixes the following Wine bugs: @@ -3880,7 +3849,7 @@ fi # Patchset dsound-EAX # | # | This patchset has the following (direct or indirect) dependencies: -# | * dsound-Clear_Mixing_Buffer, dsound-Fast_Mixer, dsound-Revert_Cleanup +# | * dsound-Fast_Mixer, dsound-Revert_Cleanup # | # | Modified files: # | * dlls/dsound/Makefile.in, dlls/dsound/buffer.c, dlls/dsound/dsound.c, dlls/dsound/dsound_eax.h, @@ -6020,7 +5989,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then patch_apply ntoskrnl-Stubs/0009-ntoskrnl.exe-Implement-MmMapLockedPages-and-MmUnmapL.patch patch_apply ntoskrnl-Stubs/0010-ntoskrnl.exe-Implement-KeInitializeMutex.patch patch_apply ntoskrnl-Stubs/0011-ntoskrnl.exe-Add-IoGetDeviceAttachmentBaseRef-stub.patch - patch_apply ntoskrnl-Stubs/0012-ntoskrnl.exe-Add-IoStopTimer-stub.patch ( printf '%s\n' '+ { "Austin English", "ntoskrnl.exe: Add KeWaitForMultipleObjects stub.", 1 },'; printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Add stubs for ExAcquireFastMutexUnsafe and ExReleaseFastMutexUnsafe.", 1 },'; @@ -6032,7 +6000,6 @@ if test "$enable_ntoskrnl_Stubs" -eq 1; then printf '%s\n' '+ { "Christian Costa", "ntoskrnl.exe: Implement MmMapLockedPages and MmUnmapLockedPages.", 1 },'; printf '%s\n' '+ { "Alexander Morozov", "ntoskrnl.exe: Implement KeInitializeMutex.", 1 },'; printf '%s\n' '+ { "Jarkko Korpi", "ntoskrnl.exe: Add IoGetDeviceAttachmentBaseRef stub.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "ntoskrnl.exe: Add IoStopTimer stub.", 1 },'; ) >> "$patchlist" fi @@ -7446,7 +7413,7 @@ fi # Patchset user32-Dialog_Focus # | # | This patchset fixes the following Wine bugs: -# | * [#37425] Set focus to dialog itself when it has no controls +# | * [#5402] Set focus to dialog itself when it has no controls # | # | Modified files: # | * dlls/user32/dialog.c, dlls/user32/tests/msg.c @@ -7537,20 +7504,13 @@ fi # Patchset user32-Groupbox_Rectangle # | -# | This patchset fixes the following Wine bugs: -# | * [#41830] Fix groupbox rectangle calculation and font handling -# | # | Modified files: # | * dlls/user32/button.c # | if test "$enable_user32_Groupbox_Rectangle" -eq 1; then patch_apply user32-Groupbox_Rectangle/0001-user32-Always-restore-previously-selected-font-in-th.patch - patch_apply user32-Groupbox_Rectangle/0002-user32-BUTTON_CalcLabelRect-should-use-the-button-fo.patch - patch_apply user32-Groupbox_Rectangle/0003-user32-Fix-groupbox-rectangle-calculation-in-the-but.patch ( printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Always restore previously selected font in the button painting helpers.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "user32: BUTTON_CalcLabelRect should use the button font.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "user32: Fix groupbox rectangle calculation in the button'\''s WM_SETTEXT handler.", 1 },'; ) >> "$patchlist" fi @@ -8325,50 +8285,6 @@ if test "$enable_wined3d_Accounting" -eq 1; then ) >> "$patchlist" fi -# Patchset wined3d-Silence_FIXMEs -# | -# | This patchset fixes the following Wine bugs: -# | * [#42140] Silence noisy FIXME in gl_stencil_op -# | -# | Modified files: -# | * dlls/wined3d/resource.c, dlls/wined3d/state.c, dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c -# | -if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then - patch_apply wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch - patch_apply wined3d-Silence_FIXMEs/0002-wined3d-Display-FIXME-for-cmp-function-0-only-once.patch - patch_apply wined3d-Silence_FIXMEs/0003-wined3d-Silence-repeated-resource_check_usage-FIXME.patch - patch_apply wined3d-Silence_FIXMEs/0004-wined3d-Print-FIXME-only-once-in-surface_cpu_blt.patch - patch_apply wined3d-Silence_FIXMEs/0005-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch - patch_apply wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch - patch_apply wined3d-Silence_FIXMEs/0007-wined3d-Display-FIXME-only-once-when-blen-op-is-0.patch - patch_apply wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch - ( - printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "wined3d: Display FIXME for cmp function 0 only once.", 1 },'; - printf '%s\n' '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },'; - printf '%s\n' '+ { "Christian Costa", "wined3d: Print FIXME only once in surface_cpu_blt.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },'; - printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence extremely noisy FIXME in wined3d_texture_add_dirty_region.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "wined3d: Display FIXME only once when blen op is 0.", 1 },'; - printf '%s\n' '+ { "Christian Costa", "wined3d: Silence noisy fixme Unrecognized stencil op 0.", 1 },'; - ) >> "$patchlist" -fi - -# Patchset wined3d-Blend_Factor -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * wined3d-Silence_FIXMEs -# | -# | Modified files: -# | * dlls/wined3d/state.c, include/wine/wined3d.h -# | -if test "$enable_wined3d_Blend_Factor" -eq 1; then - patch_apply wined3d-Blend_Factor/0001-wined3d-Add-more-blend-modes.patch - ( - printf '%s\n' '+ { "Michael Müller", "wined3d: Add more blend modes.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-QUERY_Stubs # | # | This patchset fixes the following Wine bugs: @@ -8410,6 +8326,35 @@ if test "$enable_wined3d_Revert_Pixel_Center_Offset" -eq 1; then ) >> "$patchlist" fi +# Patchset wined3d-Silence_FIXMEs +# | +# | This patchset fixes the following Wine bugs: +# | * [#42140] Silence noisy FIXME in gl_stencil_op +# | +# | Modified files: +# | * dlls/wined3d/resource.c, dlls/wined3d/state.c, dlls/wined3d/surface.c, dlls/wined3d/swapchain.c, dlls/wined3d/texture.c +# | +if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then + patch_apply wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch + patch_apply wined3d-Silence_FIXMEs/0002-wined3d-Display-FIXME-for-cmp-function-0-only-once.patch + patch_apply wined3d-Silence_FIXMEs/0003-wined3d-Silence-repeated-resource_check_usage-FIXME.patch + patch_apply wined3d-Silence_FIXMEs/0004-wined3d-Print-FIXME-only-once-in-surface_cpu_blt.patch + patch_apply wined3d-Silence_FIXMEs/0005-wined3d-Silence-repeated-wined3d_swapchain_present-F.patch + patch_apply wined3d-Silence_FIXMEs/0006-wined3d-Silence-extremely-noisy-FIXME-in-wined3d_tex.patch + patch_apply wined3d-Silence_FIXMEs/0007-wined3d-Display-FIXME-only-once-when-blen-op-is-0.patch + patch_apply wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch + ( + printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence repeated '\''Unhandled blend factor 0'\'' messages.", 1 },'; + printf '%s\n' '+ { "Christian Costa", "wined3d: Display FIXME for cmp function 0 only once.", 1 },'; + printf '%s\n' '+ { "Erich E. Hoover", "wined3d: Silence repeated resource_check_usage FIXME.", 2 },'; + printf '%s\n' '+ { "Christian Costa", "wined3d: Print FIXME only once in surface_cpu_blt.", 1 },'; + printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence repeated wined3d_swapchain_present FIXME.", 1 },'; + printf '%s\n' '+ { "Sebastian Lackner", "wined3d: Silence extremely noisy FIXME in wined3d_texture_add_dirty_region.", 1 },'; + printf '%s\n' '+ { "Christian Costa", "wined3d: Display FIXME only once when blen op is 0.", 1 },'; + printf '%s\n' '+ { "Christian Costa", "wined3d: Silence noisy fixme Unrecognized stencil op 0.", 1 },'; + ) >> "$patchlist" +fi + # Patchset wined3d-CSMT_Helper # | # | This patchset has the following (direct or indirect) dependencies: diff --git a/patches/shell32-Icons/0001-shell32-Add-support-for-extra-large-and-jumbo-icon-l.patch b/patches/shell32-Icons/0001-shell32-Add-support-for-extra-large-and-jumbo-icon-l.patch index 28a04662..a5236715 100644 --- a/patches/shell32-Icons/0001-shell32-Add-support-for-extra-large-and-jumbo-icon-l.patch +++ b/patches/shell32-Icons/0001-shell32-Add-support-for-extra-large-and-jumbo-icon-l.patch @@ -1,4 +1,4 @@ -From a66b90e5aec80fd065815dcd31f567256ed989b1 Mon Sep 17 00:00:00 2001 +From 65740badb8194172c48dd52a17299128077d6fff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 3 Aug 2014 02:23:44 +0200 Subject: shell32: Add support for extra large and jumbo icon lists. (v2) @@ -10,7 +10,7 @@ Subject: shell32: Add support for extra large and jumbo icon lists. (v2) 3 files changed, 159 insertions(+), 81 deletions(-) diff --git a/dlls/shell32/iconcache.c b/dlls/shell32/iconcache.c -index c3284a2..7f33131 100644 +index c3284a27d67..7f33131f4bd 100644 --- a/dlls/shell32/iconcache.c +++ b/dlls/shell32/iconcache.c @@ -62,7 +62,9 @@ typedef struct @@ -314,22 +314,22 @@ index c3284a2..7f33131 100644 * PidlToSicIndex [INTERNAL] * diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h -index 0178e10..dd680a4 100644 +index bdebcba0e39..fbb8e8811ab 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h -@@ -245,4 +245,7 @@ HRESULT get_typeinfo(enum tid_t, ITypeInfo**) DECLSPEC_HIDDEN; - void release_typelib(void) DECLSPEC_HIDDEN; - void release_desktop_folder(void) DECLSPEC_HIDDEN; +@@ -235,4 +235,7 @@ static inline WCHAR *strdupW(const WCHAR *src) + return dest; + } +void SHELL_GetInternalImageLists(HIMAGELIST *lpSmallList, HIMAGELIST *lpLargeList, + HIMAGELIST *lpExtraLargeList, HIMAGELIST *lpJumboList) DECLSPEC_HIDDEN; + #endif diff --git a/dlls/shell32/shellord.c b/dlls/shell32/shellord.c -index 60492de..e04157c 100644 +index 1a67a5298c4..a69eee8ac0d 100644 --- a/dlls/shell32/shellord.c +++ b/dlls/shell32/shellord.c -@@ -2171,20 +2171,32 @@ void WINAPI SHFlushSFCache(void) +@@ -2180,20 +2180,32 @@ void WINAPI SHFlushSFCache(void) */ HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv) { @@ -371,5 +371,5 @@ index 60492de..e04157c 100644 if (hNew) { -- -2.9.0 +2.11.0 diff --git a/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch b/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch index d9f1da19..3c152e37 100644 --- a/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch +++ b/patches/shell32-NewMenu_Interface/0001-shell32-Implement-NewMenu-with-new-folder-item.patch @@ -1,4 +1,4 @@ -From 28156cc0d0a9a5bba13889f5abf846c5af086a3d Mon Sep 17 00:00:00 2001 +From e412429964c86aabcea561e5eca9b625fe2e094b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 16 Aug 2015 17:34:22 +0200 Subject: shell32: Implement NewMenu with new folder item. @@ -14,7 +14,7 @@ Subject: shell32: Implement NewMenu with new folder item. create mode 100644 dlls/shell32/shellnew.c diff --git a/dlls/shell32/Makefile.in b/dlls/shell32/Makefile.in -index 038db7f..7b677ff 100644 +index 970ecba4f65..25d9ebd541b 100644 --- a/dlls/shell32/Makefile.in +++ b/dlls/shell32/Makefile.in @@ -32,6 +32,7 @@ C_SRCS = \ @@ -26,7 +26,7 @@ index 038db7f..7b677ff 100644 shellord.c \ shellpath.c \ diff --git a/dlls/shell32/shell32_classes.idl b/dlls/shell32/shell32_classes.idl -index 68ce2b5..5b2a07f 100644 +index cc57b2bab57..e8476a03cb3 100644 --- a/dlls/shell32/shell32_classes.idl +++ b/dlls/shell32/shell32_classes.idl @@ -76,6 +76,11 @@ coclass KnownFolderManager { interface IKnownFolderManager; } @@ -42,10 +42,10 @@ index 68ce2b5..5b2a07f 100644 ] coclass AutoComplete { interface IAutoComplete2; } diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h -index 642fab7..2c1aa3e 100644 +index bdebcba0e39..ececaa77ef8 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h -@@ -99,6 +99,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID +@@ -101,6 +101,7 @@ HRESULT WINAPI RecycleBin_Constructor(IUnknown * pUnkOuter, REFIID riif, LPVOID HRESULT WINAPI QueryAssociations_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppOutput) DECLSPEC_HIDDEN; HRESULT WINAPI ExplorerBrowser_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; HRESULT WINAPI KnownFolderManager_Constructor(IUnknown *pUnkOuter, REFIID riid, LPVOID *ppv) DECLSPEC_HIDDEN; @@ -55,7 +55,7 @@ index 642fab7..2c1aa3e 100644 HRESULT WINAPI CPanel_ExtractIconW(LPITEMIDLIST pidl, LPCWSTR pszFile, UINT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIconSize) DECLSPEC_HIDDEN; diff --git a/dlls/shell32/shellnew.c b/dlls/shell32/shellnew.c new file mode 100644 -index 0000000..59e18d6 +index 00000000000..59e18d6d228 --- /dev/null +++ b/dlls/shell32/shellnew.c @@ -0,0 +1,558 @@ @@ -618,19 +618,19 @@ index 0000000..59e18d6 + return hr; +} diff --git a/dlls/shell32/shellole.c b/dlls/shell32/shellole.c -index dd54900..3d2dbf4 100644 +index d3d972b96d1..88dfdeca461 100644 --- a/dlls/shell32/shellole.c +++ b/dlls/shell32/shellole.c -@@ -84,6 +84,7 @@ static const struct { - {&CLSID_KnownFolderManager, KnownFolderManager_Constructor}, +@@ -88,6 +88,7 @@ static const struct { {&CLSID_Shell, IShellDispatch_Constructor}, {&CLSID_DestinationList, CustomDestinationList_Constructor}, + {&CLSID_ShellImageDataFactory, ShellImageDataFactory_Constructor}, + {&CLSID_NewMenu, NewMenu_Constructor}, {NULL, NULL} }; diff --git a/include/shlguid.h b/include/shlguid.h -index 2279def..09aacc5 100644 +index 2279defb1db..09aacc58e66 100644 --- a/include/shlguid.h +++ b/include/shlguid.h @@ -146,6 +146,8 @@ DEFINE_GUID(CLSID_ProgressDialog, 0xf8383852, 0xfcd3, 0x11d1, 0xa6, 0xb9, 0x0, 0 @@ -643,5 +643,5 @@ index 2279def..09aacc5 100644 DEFINE_GUID(FMTID_ShellDetails, 0x28636aa6, 0x953d, 0x11d2, 0xb5, 0xd6, 0x0, 0xc0, 0x4f, 0xd9, 0x18, 0xd0); #define PID_FINDDATA 0 -- -2.9.0 +2.11.0 diff --git a/patches/user32-Dialog_Focus/definition b/patches/user32-Dialog_Focus/definition index 704ba7d0..0be81f96 100644 --- a/patches/user32-Dialog_Focus/definition +++ b/patches/user32-Dialog_Focus/definition @@ -1 +1 @@ -Fixes: [37425] Set focus to dialog itself when it has no controls +Fixes: [5402] Set focus to dialog itself when it has no controls diff --git a/patches/user32-Groupbox_Rectangle/0002-user32-BUTTON_CalcLabelRect-should-use-the-button-fo.patch b/patches/user32-Groupbox_Rectangle/0002-user32-BUTTON_CalcLabelRect-should-use-the-button-fo.patch deleted file mode 100644 index 13659d2c..00000000 --- a/patches/user32-Groupbox_Rectangle/0002-user32-BUTTON_CalcLabelRect-should-use-the-button-fo.patch +++ /dev/null @@ -1,40 +0,0 @@ -From 3452ba066216b5c7175a66cf612812bab5c81cd8 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Sun, 27 Nov 2016 14:01:58 +0800 -Subject: user32: BUTTON_CalcLabelRect should use the button font. - -Otherwise WM_SETTEXT handler gets wrong rectangle to erase an old text. ---- - dlls/user32/button.c | 7 +++++++ - 1 file changed, 7 insertions(+) - -diff --git a/dlls/user32/button.c b/dlls/user32/button.c -index e4074cd..623b425 100644 ---- a/dlls/user32/button.c -+++ b/dlls/user32/button.c -@@ -596,15 +596,22 @@ static UINT BUTTON_CalcLabelRect(HWND hwnd, HDC hdc, RECT *rc) - switch (style & (BS_ICON|BS_BITMAP)) - { - case BS_TEXT: -+ { -+ HFONT hFont, hPrevFont = 0; -+ - if (!(text = get_button_text( hwnd ))) goto empty_rect; - if (!text[0]) - { - HeapFree( GetProcessHeap(), 0, text ); - goto empty_rect; - } -+ -+ if ((hFont = get_button_font( hwnd ))) hPrevFont = SelectObject( hdc, hFont ); - DrawTextW(hdc, text, -1, &r, dtStyle | DT_CALCRECT); -+ if (hPrevFont) SelectObject( hdc, hPrevFont ); - HeapFree( GetProcessHeap(), 0, text ); - break; -+ } - - case BS_ICON: - if (!GetIconInfo((HICON)GetWindowLongPtrW( hwnd, HIMAGE_GWL_OFFSET ), &iconInfo)) --- -2.9.0 - diff --git a/patches/user32-Groupbox_Rectangle/0003-user32-Fix-groupbox-rectangle-calculation-in-the-but.patch b/patches/user32-Groupbox_Rectangle/0003-user32-Fix-groupbox-rectangle-calculation-in-the-but.patch deleted file mode 100644 index 119aadb3..00000000 --- a/patches/user32-Groupbox_Rectangle/0003-user32-Fix-groupbox-rectangle-calculation-in-the-but.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 62276b1f14a98c34737b195705c79f60a2561f59 Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Sun, 27 Nov 2016 14:07:12 +0800 -Subject: user32: Fix groupbox rectangle calculation in the button's WM_SETTEXT - handler. - ---- - dlls/user32/button.c | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/dlls/user32/button.c b/dlls/user32/button.c -index 623b425..86b3b1e 100644 ---- a/dlls/user32/button.c -+++ b/dlls/user32/button.c -@@ -394,6 +394,9 @@ LRESULT ButtonWndProc_common(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, - - GetClientRect(hWnd, &client); - rc = client; -+ /* FIXME: check other BS_* handlers */ -+ if (btn_type == BS_GROUPBOX) -+ InflateRect(&rc, -7, 1); /* GB_Paint does this */ - BUTTON_CalcLabelRect(hWnd, hdc, &rc); - /* Clip by client rect bounds */ - if (rc.right > client.right) rc.right = client.right; --- -2.9.0 - diff --git a/patches/user32-Groupbox_Rectangle/definition b/patches/user32-Groupbox_Rectangle/definition deleted file mode 100644 index 33db92b3..00000000 --- a/patches/user32-Groupbox_Rectangle/definition +++ /dev/null @@ -1 +0,0 @@ -Fixes: [41830] Fix groupbox rectangle calculation and font handling diff --git a/patches/wined3d-Blend_Factor/0001-wined3d-Add-more-blend-modes.patch b/patches/wined3d-Blend_Factor/0001-wined3d-Add-more-blend-modes.patch deleted file mode 100644 index c03cd2b4..00000000 --- a/patches/wined3d-Blend_Factor/0001-wined3d-Add-more-blend-modes.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 835b3f4dbfff6eb52e605933387200b488ded25a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sun, 22 Jan 2017 15:00:38 +0100 -Subject: wined3d: Add more blend modes. - ---- - dlls/wined3d/state.c | 8 ++++++++ - include/wine/wined3d.h | 4 ++++ - 2 files changed, 12 insertions(+) - -diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index 5952c6cc610..1a8c0431511 100644 ---- a/dlls/wined3d/state.c -+++ b/dlls/wined3d/state.c -@@ -412,6 +412,14 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo - return GL_CONSTANT_COLOR_EXT; - case WINED3D_BLEND_INVBLENDFACTOR: - return GL_ONE_MINUS_CONSTANT_COLOR_EXT; -+ case WINED3D_BLEND_SRC1COLOR: -+ return GL_SRC1_COLOR; -+ case WINED3D_BLEND_INVSRC1COLOR: -+ return GL_ONE_MINUS_SRC1_COLOR; -+ case WINED3D_BLEND_SRC1ALPHA: -+ return GL_SRC1_ALPHA; -+ case WINED3D_BLEND_INVSRC1ALPHA: -+ return GL_ONE_MINUS_SRC1_ALPHA; - default: - { - static int once; -diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index dc333448772..ffad17fa6e8 100644 ---- a/include/wine/wined3d.h -+++ b/include/wine/wined3d.h -@@ -400,6 +400,10 @@ enum wined3d_blend - WINED3D_BLEND_BOTHINVSRCALPHA = 13, - WINED3D_BLEND_BLENDFACTOR = 14, - WINED3D_BLEND_INVBLENDFACTOR = 15, -+ WINED3D_BLEND_SRC1COLOR = 16, -+ WINED3D_BLEND_INVSRC1COLOR = 17, -+ WINED3D_BLEND_SRC1ALPHA = 18, -+ WINED3D_BLEND_INVSRC1ALPHA = 19, - }; - - enum wined3d_blend_op --- -2.11.0 - diff --git a/patches/wined3d-Blend_Factor/definition b/patches/wined3d-Blend_Factor/definition deleted file mode 100644 index 5770e7e3..00000000 --- a/patches/wined3d-Blend_Factor/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: Implement some more wined3d blend modes -Depends: wined3d-Silence_FIXMEs diff --git a/patches/wined3d-CSMT_Main/0002-wined3d-Hackily-introduce-a-multithreaded-command-st.patch b/patches/wined3d-CSMT_Main/0002-wined3d-Hackily-introduce-a-multithreaded-command-st.patch index fe90e4af..664b0a77 100644 --- a/patches/wined3d-CSMT_Main/0002-wined3d-Hackily-introduce-a-multithreaded-command-st.patch +++ b/patches/wined3d-CSMT_Main/0002-wined3d-Hackily-introduce-a-multithreaded-command-st.patch @@ -1,4 +1,4 @@ -From dc12ee16f10892c34b7132b062d7c47f76691c8f Mon Sep 17 00:00:00 2001 +From b3515e5f92033c1a785e656eddcba4ffa711f0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 1 Oct 2013 14:31:56 +0200 Subject: wined3d: Hackily introduce a multithreaded command stream @@ -27,10 +27,10 @@ index c1dbe9e835f..5ca4a14fa6a 100644 memset(&data, 0xff, sizeof(data)); hr = ID3D10Asynchronous_GetData(query, &data, sizeof(DWORD), 0); diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index a63a4ea507b..40e0241a463 100644 +index da2edc5d2d6..61617d147bb 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -5245,7 +5245,7 @@ static void test_occlusion_query(void) +@@ -4767,7 +4767,7 @@ static void test_occlusion_query(void) memset(&data, 0xff, sizeof(data)); hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(data), 0); ok(hr == S_OK, "Got unexpected hr %#x.\n", hr); @@ -39,7 +39,7 @@ index a63a4ea507b..40e0241a463 100644 memset(&data, 0xff, sizeof(data)); hr = ID3D11DeviceContext_GetData(context, query, &data, sizeof(DWORD), 0); -@@ -9533,7 +9533,7 @@ static void test_draw_uav_only(void) +@@ -8893,7 +8893,7 @@ static void test_draw_uav_only(void) draw_quad(&test_context); draw_quad(&test_context); draw_quad(&test_context); @@ -49,7 +49,7 @@ index a63a4ea507b..40e0241a463 100644 ID3D11PixelShader_Release(ps); ID3D11Texture2D_Release(texture); diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 40e514cec7b..9bef6188f68 100644 +index f2168d66a33..3a728162eb4 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c @@ -1353,6 +1353,9 @@ void context_release(struct wined3d_context *context) @@ -62,7 +62,7 @@ index 40e514cec7b..9bef6188f68 100644 if (!--context->level) { if (context_restore_pixel_format(context)) -@@ -3658,6 +3661,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str +@@ -3694,6 +3697,13 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str TRACE("device %p, target %p.\n", device, target); @@ -77,7 +77,7 @@ index 40e514cec7b..9bef6188f68 100644 current_context = NULL; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 220ddeebe98..c0d8a5f2fd5 100644 +index 422f3f1e5df..518db143421 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -18,14 +18,26 @@ @@ -529,7 +529,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined3d_texture *texture) -@@ -1015,12 +1179,14 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined +@@ -1015,13 +1179,15 @@ void wined3d_cs_emit_set_texture(struct wined3d_cs *cs, UINT stage, struct wined cs->ops->submit(cs); } @@ -539,13 +539,14 @@ index 220ddeebe98..c0d8a5f2fd5 100644 const struct wined3d_cs_set_shader_resource_view *op = data; cs->state.shader_resource_view[op->type][op->view_idx] = op->view; - device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + if (op->type != WINED3D_SHADER_TYPE_COMPUTE) + device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + + return sizeof(*op); } void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned int view_idx, -@@ -1036,7 +1202,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i +@@ -1037,7 +1203,7 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i cs->ops->submit(cs); } @@ -554,7 +555,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 { const struct wined3d_cs_set_unordered_access_view *op = data; struct wined3d_unordered_access_view *prev; -@@ -1050,6 +1216,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con +@@ -1051,6 +1217,8 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con InterlockedDecrement(&prev->resource->bind_count); device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING); @@ -563,7 +564,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type, -@@ -1066,12 +1234,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3 +@@ -1067,12 +1235,14 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3 cs->ops->submit(cs); } @@ -579,7 +580,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, -@@ -1088,13 +1258,15 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type +@@ -1089,7 +1259,7 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type cs->ops->submit(cs); } @@ -588,15 +589,16 @@ index 220ddeebe98..c0d8a5f2fd5 100644 { const struct wined3d_cs_set_shader *op = data; - cs->state.shader[op->type] = op->shader; +@@ -1097,6 +1267,8 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) device_invalidate_state(cs->device, STATE_SHADER(op->type)); - device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + if (op->type != WINED3D_SHADER_TYPE_COMPUTE) + device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + + return sizeof(*op); } void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type type, struct wined3d_shader *shader) -@@ -1109,12 +1281,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type +@@ -1111,12 +1283,14 @@ void wined3d_cs_emit_set_shader(struct wined3d_cs *cs, enum wined3d_shader_type cs->ops->submit(cs); } @@ -612,7 +614,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, -@@ -1129,12 +1303,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, +@@ -1131,12 +1305,14 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, cs->ops->submit(cs); } @@ -628,7 +630,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render_state state, DWORD value) -@@ -1149,12 +1325,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render +@@ -1151,12 +1327,14 @@ void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, enum wined3d_render cs->ops->submit(cs); } @@ -644,7 +646,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, -@@ -1171,12 +1349,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, +@@ -1173,12 +1351,14 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, cs->ops->submit(cs); } @@ -660,7 +662,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, -@@ -1193,13 +1373,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, +@@ -1195,13 +1375,15 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, cs->ops->submit(cs); } @@ -677,7 +679,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state, -@@ -1215,12 +1397,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform +@@ -1217,12 +1399,14 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform cs->ops->submit(cs); } @@ -693,7 +695,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane) -@@ -1235,7 +1419,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const +@@ -1237,7 +1421,7 @@ void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const cs->ops->submit(cs); } @@ -702,7 +704,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 { const struct wined3d_cs_set_color_key *op = data; struct wined3d_texture *texture = op->texture; -@@ -1296,6 +1480,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat +@@ -1298,6 +1482,8 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat break; } } @@ -711,7 +713,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, -@@ -1318,12 +1504,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture +@@ -1320,12 +1506,14 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture cs->ops->submit(cs); } @@ -727,7 +729,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_material *material) -@@ -1337,7 +1525,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma +@@ -1339,7 +1527,7 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma cs->ops->submit(cs); } @@ -736,7 +738,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 { struct wined3d_adapter *adapter = cs->device->adapter; -@@ -1345,6 +1533,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data) +@@ -1347,6 +1535,8 @@ static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data) memset(&cs->state, 0, sizeof(cs->state)); state_init(&cs->state, &cs->fb, &adapter->gl_info, &adapter->d3d_info, WINED3D_STATE_NO_REF | WINED3D_STATE_INIT_DEFAULT); @@ -745,7 +747,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) -@@ -1357,11 +1547,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) +@@ -1359,11 +1549,13 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) cs->ops->submit(cs); } @@ -760,7 +762,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void *object), void *object) -@@ -1376,12 +1568,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void +@@ -1378,12 +1570,14 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void cs->ops->submit(cs); } @@ -776,7 +778,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *query, DWORD flags) -@@ -1396,13 +1590,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu +@@ -1398,13 +1592,41 @@ void wined3d_cs_emit_query_issue(struct wined3d_cs *cs, struct wined3d_query *qu cs->ops->submit(cs); } @@ -819,7 +821,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) -@@ -1418,13 +1640,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso +@@ -1420,13 +1642,15 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso cs->ops->submit(cs); } @@ -836,7 +838,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resource *resource) -@@ -1440,13 +1664,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou +@@ -1442,13 +1666,15 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou cs->ops->submit(cs); } @@ -853,7 +855,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, -@@ -1464,17 +1690,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, +@@ -1466,17 +1692,19 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, op->flags = flags; op->hr = &hr; @@ -875,7 +877,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 } HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx) -@@ -1488,13 +1716,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc +@@ -1490,13 +1718,35 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc op->sub_resource_idx = sub_resource_idx; op->hr = &hr; @@ -913,7 +915,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 /* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present, /* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear, /* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch, -@@ -1526,10 +1776,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -1528,10 +1778,12 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state, /* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, @@ -926,7 +928,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 }; static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size) -@@ -1603,9 +1855,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops = +@@ -1605,9 +1857,113 @@ static const struct wined3d_cs_ops wined3d_cs_st_ops = { wined3d_cs_st_require_space, wined3d_cs_st_submit, @@ -1040,7 +1042,7 @@ index 220ddeebe98..c0d8a5f2fd5 100644 struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) { const struct wined3d_gl_info *gl_info = &device->adapter->gl_info; -@@ -1635,12 +1991,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) +@@ -1637,12 +1993,64 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) return NULL; } @@ -1119,7 +1121,7 @@ index 3bdba105105..abb4a664c1a 100644 if (data) diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c -index e7962465279..a8409cfd4b8 100644 +index 2085864bc7f..01eb71a89e7 100644 --- a/dlls/wined3d/wined3d_main.c +++ b/dlls/wined3d/wined3d_main.c @@ -90,6 +90,7 @@ struct wined3d_settings wined3d_settings = @@ -1149,7 +1151,7 @@ index e7962465279..a8409cfd4b8 100644 if (hkey) RegCloseKey( hkey ); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 00709bdab09..d225e85b909 100644 +index d93befa13bb..2ab0aca10ab 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -306,6 +306,7 @@ struct wined3d_settings @@ -1160,7 +1162,7 @@ index 00709bdab09..d225e85b909 100644 }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -2705,11 +2706,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource) +@@ -2730,11 +2731,6 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource) InterlockedDecrement(&resource->access_count); } @@ -1172,7 +1174,7 @@ index 00709bdab09..d225e85b909 100644 void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN; HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, enum wined3d_resource_type type, const struct wined3d_format *format, -@@ -3119,10 +3115,23 @@ enum wined3d_push_constants +@@ -3144,10 +3140,23 @@ enum wined3d_push_constants WINED3D_PUSH_CONSTANTS_PS_B, }; @@ -1196,7 +1198,7 @@ index 00709bdab09..d225e85b909 100644 void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants); }; -@@ -3133,11 +3142,22 @@ struct wined3d_cs +@@ -3158,11 +3167,22 @@ struct wined3d_cs struct wined3d_device *device; struct wined3d_fb_state fb; struct wined3d_state state; @@ -1220,7 +1222,7 @@ index 00709bdab09..d225e85b909 100644 struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) DECLSPEC_HIDDEN; void wined3d_cs_destroy(struct wined3d_cs *cs) DECLSPEC_HIDDEN; -@@ -3149,10 +3169,12 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, +@@ -3174,10 +3194,12 @@ void wined3d_cs_emit_dispatch(struct wined3d_cs *cs, unsigned int group_count_x, unsigned int group_count_y, unsigned int group_count_z) DECLSPEC_HIDDEN; void wined3d_cs_emit_draw(struct wined3d_cs *cs, int base_vertex_idx, unsigned int start_idx, unsigned int index_count, unsigned int start_instance, unsigned int instance_count, BOOL indexed) DECLSPEC_HIDDEN; diff --git a/patches/wined3d-CSMT_Main/0031-wined3d-Move-the-framebuffer-into-wined3d_state.patch b/patches/wined3d-CSMT_Main/0031-wined3d-Move-the-framebuffer-into-wined3d_state.patch index 57a8a7ac..ed29947f 100644 --- a/patches/wined3d-CSMT_Main/0031-wined3d-Move-the-framebuffer-into-wined3d_state.patch +++ b/patches/wined3d-CSMT_Main/0031-wined3d-Move-the-framebuffer-into-wined3d_state.patch @@ -1,4 +1,4 @@ -From 184350c6cdfd80d576b8c15fbba5c2edc90eaf0b Mon Sep 17 00:00:00 2001 +From 905a31e15556a725e6ab9ee0e8e32d46474a820b 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 @@ -19,7 +19,7 @@ Subject: wined3d: Move the framebuffer into wined3d_state 12 files changed, 183 insertions(+), 127 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index 7fc97b5d999..8128c099076 100644 +index 85ed462c78d..1191a6d5873 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -701,7 +701,7 @@ static void shader_arb_load_constants_internal(struct shader_arb_priv *priv, @@ -41,10 +41,10 @@ index 7fc97b5d999..8128c099076 100644 } diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c -index 9bef6188f68..51dfaea4ed4 100644 +index 3a728162eb4..bc27695c08e 100644 --- a/dlls/wined3d/context.c +++ b/dlls/wined3d/context.c -@@ -1716,6 +1716,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1726,6 +1726,11 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -56,7 +56,7 @@ index 9bef6188f68..51dfaea4ed4 100644 /* Initialize the texture unit mapping to a 1:1 mapping */ for (s = 0; s < MAX_COMBINED_SAMPLERS; ++s) { -@@ -2036,6 +2041,7 @@ out: +@@ -2047,6 +2052,7 @@ 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); @@ -64,7 +64,7 @@ index 9bef6188f68..51dfaea4ed4 100644 HeapFree(GetProcessHeap(), 0, ret->free_event_queries); HeapFree(GetProcessHeap(), 0, ret->free_occlusion_queries); HeapFree(GetProcessHeap(), 0, ret->free_timestamp_queries); -@@ -2083,6 +2089,7 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont +@@ -2094,6 +2100,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->fbo_key); @@ -72,7 +72,7 @@ index 9bef6188f68..51dfaea4ed4 100644 HeapFree(GetProcessHeap(), 0, context->draw_buffers); HeapFree(GetProcessHeap(), 0, context->blit_targets); device_context_remove(device, context); -@@ -2641,7 +2648,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2652,7 +2659,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win DWORD rt_mask = 0, *cur_mask; UINT i; @@ -81,7 +81,7 @@ index 9bef6188f68..51dfaea4ed4 100644 || rt_count != gl_info->limits.buffers) { if (!context_validate_rt_config(rt_count, rts, dsv)) -@@ -2686,6 +2693,8 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2697,6 +2704,8 @@ 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); } @@ -90,7 +90,7 @@ index 9bef6188f68..51dfaea4ed4 100644 } else if (wined3d_settings.offscreen_rendering_mode == ORM_FBO && (!rt_count || wined3d_resource_is_offscreen(rts[0]->resource))) -@@ -2742,7 +2751,7 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2753,7 +2762,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_state *state) { @@ -99,7 +99,7 @@ index 9bef6188f68..51dfaea4ed4 100644 struct wined3d_shader *ps = state->shader[WINED3D_SHADER_TYPE_PIXEL]; DWORD rt_mask, rt_mask_bits; unsigned int i; -@@ -2772,7 +2781,7 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2783,7 +2792,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) { DWORD rt_mask = find_draw_buffers_mask(context, state); @@ -108,7 +108,7 @@ index 9bef6188f68..51dfaea4ed4 100644 DWORD *cur_mask; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) -@@ -3061,6 +3070,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d +@@ -3072,6 +3081,8 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -117,7 +117,7 @@ index 9bef6188f68..51dfaea4ed4 100644 } static BOOL fixed_get_input(BYTE usage, BYTE usage_idx, unsigned int *regnum) -@@ -3492,7 +3503,7 @@ BOOL context_apply_draw_state(struct wined3d_context *context, +@@ -3507,7 +3518,7 @@ 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; @@ -127,7 +127,7 @@ index 9bef6188f68..51dfaea4ed4 100644 WORD map; diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index 71119320f56..01c81cde95e 100644 +index 553a58b7219..947ed482eca 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -621,7 +621,7 @@ static UINT wined3d_cs_exec_present(struct wined3d_cs *cs, const void *data) @@ -238,7 +238,7 @@ index 71119320f56..01c81cde95e 100644 if (!prev != !op->view) { -@@ -1697,11 +1697,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma +@@ -1699,11 +1699,13 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma static UINT wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data) { struct wined3d_adapter *adapter = cs->device->adapter; @@ -254,7 +254,7 @@ index 71119320f56..01c81cde95e 100644 return sizeof(struct wined3d_cs_reset_state); } -@@ -2799,15 +2801,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) +@@ -2793,15 +2795,13 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) return NULL; cs->tls_idx = TLS_OUT_OF_INDEXES; @@ -272,7 +272,7 @@ index 71119320f56..01c81cde95e 100644 cs->ops = &wined3d_cs_st_ops; cs->device = device; -@@ -2840,7 +2840,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) +@@ -2834,7 +2834,6 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) err: state_cleanup(&cs->state); if (cs->tls_idx != TLS_OUT_OF_INDEXES) TlsFree(cs->tls_idx); @@ -280,7 +280,7 @@ index 71119320f56..01c81cde95e 100644 HeapFree(GetProcessHeap(), 0, cs->data); HeapFree(GetProcessHeap(), 0, cs); return NULL; -@@ -2869,7 +2868,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) +@@ -2863,7 +2862,6 @@ void wined3d_cs_destroy(struct wined3d_cs *cs) } TlsFree(cs->tls_idx); @@ -289,7 +289,7 @@ index 71119320f56..01c81cde95e 100644 HeapFree(GetProcessHeap(), 0, cs); } diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 04736737ddd..e840ff67cdb 100644 +index 4ae48f5de17..7c6b5052ecf 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -955,7 +955,7 @@ static void device_init_swapchain_state(struct wined3d_device *device, struct wi @@ -389,7 +389,7 @@ index 04736737ddd..e840ff67cdb 100644 return; if (src_view->resource->type == WINED3D_RTYPE_BUFFER) { -@@ -3523,6 +3498,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) +@@ -3447,6 +3422,8 @@ HRESULT CDECL wined3d_device_end_scene(struct wined3d_device *device) HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_count, const RECT *rects, DWORD flags, const struct wined3d_color *color, float depth, DWORD stencil) { @@ -398,7 +398,7 @@ index 04736737ddd..e840ff67cdb 100644 TRACE("device %p, rect_count %u, rects %p, flags %#x, color %s, depth %.8e, stencil %u.\n", device, rect_count, rects, flags, debug_color(color), depth, stencil); -@@ -3534,7 +3511,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou +@@ -3458,7 +3435,7 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou if (flags & (WINED3DCLEAR_ZBUFFER | WINED3DCLEAR_STENCIL)) { @@ -407,7 +407,7 @@ index 04736737ddd..e840ff67cdb 100644 if (!ds) { WARN("Clearing depth and/or stencil without a depth stencil buffer attached, returning WINED3DERR_INVALIDCALL\n"); -@@ -3543,8 +3520,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou +@@ -3467,8 +3444,8 @@ HRESULT CDECL wined3d_device_clear(struct wined3d_device *device, DWORD rect_cou } else if (flags & WINED3DCLEAR_TARGET) { @@ -418,7 +418,7 @@ index 04736737ddd..e840ff67cdb 100644 { WARN("Silently ignoring depth and target clear with mismatching sizes\n"); return WINED3D_OK; -@@ -3894,8 +3871,8 @@ HRESULT CDECL wined3d_device_validate_device(const struct wined3d_device *device +@@ -3818,8 +3795,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]) { @@ -429,7 +429,7 @@ index 04736737ddd..e840ff67cdb 100644 if (ds && rt && (ds->width < rt->width || ds->height < rt->height)) { -@@ -4330,20 +4307,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co +@@ -4254,20 +4231,21 @@ struct wined3d_rendertarget_view * CDECL wined3d_device_get_rendertarget_view(co return NULL; } @@ -453,7 +453,7 @@ index 04736737ddd..e840ff67cdb 100644 TRACE("device %p, view_idx %u, view %p, set_viewport %#x.\n", device, view_idx, view, set_viewport); -@@ -4380,13 +4358,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -4304,13 +4282,13 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device } @@ -469,7 +469,7 @@ index 04736737ddd..e840ff67cdb 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. */ -@@ -4398,18 +4376,19 @@ HRESULT CDECL wined3d_device_set_rendertarget_view(struct wined3d_device *device +@@ -4322,18 +4300,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) { @@ -491,7 +491,7 @@ index 04736737ddd..e840ff67cdb 100644 wined3d_rendertarget_view_incref(view); wined3d_cs_emit_set_depth_stencil_view(device->cs, view); if (prev) -@@ -4756,10 +4735,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4680,10 +4659,9 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, wined3d_texture_decref(device->cursor_texture); device->cursor_texture = NULL; } @@ -503,7 +503,7 @@ index 04736737ddd..e840ff67cdb 100644 { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { -@@ -4770,6 +4748,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4694,6 +4672,11 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (reset_state) { @@ -515,7 +515,7 @@ index 04736737ddd..e840ff67cdb 100644 LIST_FOR_EACH_ENTRY_SAFE(resource, cursor, &device->resources, struct wined3d_resource, resource_list_entry) { TRACE("Enumerating resource %p.\n", resource); -@@ -4934,27 +4917,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, +@@ -4858,27 +4841,28 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, if (device->d3d_initialized) delete_opengl_contexts(device, swapchain); @@ -551,7 +551,7 @@ index 04736737ddd..e840ff67cdb 100644 wined3d_cs_emit_set_scissor_rect(device->cs, &state->scissor_rect); } -@@ -5046,11 +5030,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso +@@ -4970,11 +4954,11 @@ void device_resource_released(struct wined3d_device *device, struct wined3d_reso { for (i = 0; i < device->adapter->gl_info.limits.buffers; ++i) { @@ -565,7 +565,7 @@ index 04736737ddd..e840ff67cdb 100644 ERR("Resource %p is still in use as depth/stencil buffer.\n", resource); } -@@ -5176,8 +5160,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, +@@ -5100,8 +5084,12 @@ HRESULT device_init(struct wined3d_device *device, struct wined3d *wined3d, device->blitter = adapter->blitter; @@ -594,7 +594,7 @@ index 49804131efb..28b4c5a48da 100644 struct wined3d_event_query *ib_query = NULL; struct wined3d_rendertarget_view *dsv, *rtv; diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index ce935a05716..5e8390ae376 100644 +index bc041179b55..985261b6a73 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c @@ -1612,7 +1612,7 @@ static void shader_glsl_load_constants(void *shader_priv, struct wined3d_context @@ -607,10 +607,10 @@ index ce935a05716..5e8390ae376 100644 0.0f, 0.0f, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 00ed4527f6d..96615cd4222 100644 +index 490c985acf1..b84e43d6294 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -3218,7 +3218,7 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 +@@ -3219,7 +3219,7 @@ 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. */ @@ -620,7 +620,7 @@ index 00ed4527f6d..96615cd4222 100644 static unsigned int warned = 0; diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index f91c9ffb32b..c0bc5042a16 100644 +index 2e556c798fd..66e4eb4fd89 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -152,7 +152,7 @@ static void state_zenable(struct wined3d_context *context, const struct wined3d_ @@ -683,7 +683,7 @@ index f91c9ffb32b..c0bc5042a16 100644 float scale; union -@@ -4632,8 +4632,8 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine +@@ -4637,8 +4637,8 @@ 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) { @@ -694,7 +694,7 @@ index f91c9ffb32b..c0bc5042a16 100644 const struct wined3d_gl_info *gl_info = context->gl_info; struct wined3d_viewport vp = state->viewport; unsigned int width, height; -@@ -4672,8 +4672,8 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine +@@ -4677,8 +4677,8 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine static void viewport_miscpart_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -705,7 +705,7 @@ index f91c9ffb32b..c0bc5042a16 100644 float pixel_center_offset = context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f; const struct wined3d_gl_info *gl_info = context->gl_info; -@@ -4868,7 +4868,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st +@@ -4873,7 +4873,7 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st } else { @@ -714,7 +714,7 @@ index f91c9ffb32b..c0bc5042a16 100644 UINT height; UINT width; -@@ -4944,7 +4944,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state +@@ -4949,7 +4949,7 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); @@ -824,10 +824,10 @@ index ed39a15c7be..913d630cf97 100644 if (type == WINED3D_SBT_RECORDED) return WINED3D_OK; diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c -index 05fb8357126..5ad5e003c20 100644 +index e65630fafc8..c5ad5bd8475 100644 --- a/dlls/wined3d/surface.c +++ b/dlls/wined3d/surface.c -@@ -2513,7 +2513,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE +@@ -2514,7 +2514,7 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE { struct wined3d_texture *dst_texture = dst_surface->container; struct wined3d_device *device = dst_texture->resource.device; @@ -837,7 +837,7 @@ index 05fb8357126..5ad5e003c20 100644 struct wined3d_texture *src_texture; diff --git a/dlls/wined3d/utils.c b/dlls/wined3d/utils.c -index 5c928041ead..11270802fa5 100644 +index d1c5ef51fd5..cffe9f43b42 100644 --- a/dlls/wined3d/utils.c +++ b/dlls/wined3d/utils.c @@ -4645,7 +4645,7 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w @@ -859,10 +859,10 @@ index 5c928041ead..11270802fa5 100644 || !state->render_states[WINED3D_RS_CLIPPLANEENABLE]) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 1f0fbf23b18..5991eb95787 100644 +index f0777c9bd34..811fb28e2c9 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -1516,6 +1516,36 @@ struct wined3d_timestamp_query +@@ -1540,6 +1540,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; @@ -899,15 +899,15 @@ index 1f0fbf23b18..5991eb95787 100644 struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1530,6 +1560,7 @@ struct wined3d_context - DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ +@@ -1555,6 +1585,7 @@ 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]; + struct wined3d_fb_state current_fb; struct wined3d_device *device; struct wined3d_swapchain *swapchain; -@@ -1642,12 +1673,6 @@ struct wined3d_context +@@ -1667,12 +1698,6 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -920,7 +920,7 @@ index 1f0fbf23b18..5991eb95787 100644 typedef void (*APPLYSTATEFUNC)(struct wined3d_context *ctx, const struct wined3d_state *state, DWORD state_id); struct StateEntry -@@ -2469,7 +2494,7 @@ struct wined3d_stream_state +@@ -2494,7 +2519,7 @@ struct wined3d_stream_state struct wined3d_state { DWORD flags; @@ -929,7 +929,7 @@ index 1f0fbf23b18..5991eb95787 100644 struct wined3d_vertex_declaration *vertex_declaration; struct wined3d_stream_output stream_output[MAX_STREAM_OUT]; -@@ -2583,7 +2608,6 @@ struct wined3d_device +@@ -2608,7 +2633,6 @@ struct wined3d_device struct wine_rb_tree samplers; /* Render Target Support */ @@ -937,7 +937,7 @@ index 1f0fbf23b18..5991eb95787 100644 struct wined3d_rendertarget_view *auto_depth_stencil_view; /* For rendering to a texture using glCopyTexImage */ -@@ -3125,9 +3149,8 @@ struct wined3d_stateblock +@@ -3150,9 +3174,8 @@ struct wined3d_stateblock void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -949,7 +949,7 @@ index 1f0fbf23b18..5991eb95787 100644 void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; enum wined3d_push_constants -@@ -3163,7 +3186,6 @@ struct wined3d_cs +@@ -3188,7 +3211,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 d47a442d..9f1d347a 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -65,7 +65,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c if (!--context->level) { if (context_restore_pixel_format(context)) -@@ -1713,6 +1718,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, +@@ -1723,6 +1728,13 @@ struct wined3d_context *context_create(struct wined3d_swapchain *swapchain, goto out; } @@ -79,7 +79,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) { -@@ -2033,6 +2045,9 @@ out: +@@ -2044,6 +2056,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); @@ -89,7 +89,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); -@@ -2080,6 +2095,9 @@ void context_destroy(struct wined3d_device *device, struct wined3d_context *cont +@@ -2091,6 +2106,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); @@ -99,7 +99,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); -@@ -2629,7 +2647,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge +@@ -2640,7 +2658,11 @@ static BOOL context_validate_rt_config(UINT rt_count, struct wined3d_rendertarge } /* Context activation is done by the caller. */ @@ -111,7 +111,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; -@@ -2638,7 +2660,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2649,7 +2671,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win DWORD rt_mask = 0, *cur_mask; UINT i; @@ -123,7 +123,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)) -@@ -2683,6 +2709,10 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2694,6 +2720,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); } @@ -134,7 +134,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))) -@@ -2722,7 +2752,12 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2733,7 +2763,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]) { @@ -147,7 +147,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); -@@ -2739,7 +2774,11 @@ BOOL context_apply_clear_state(struct wined3d_context *context, const struct win +@@ -2750,7 +2785,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) { @@ -159,7 +159,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; -@@ -2769,7 +2808,11 @@ static DWORD find_draw_buffers_mask(const struct wined3d_context *context, const +@@ -2780,7 +2819,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); @@ -171,7 +171,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c DWORD *cur_mask; if (wined3d_settings.offscreen_rendering_mode == ORM_FBO) -@@ -3058,6 +3101,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d +@@ -3069,6 +3112,10 @@ void context_state_drawbuf(struct wined3d_context *context, const struct wined3d context_apply_draw_buffers(context, rt_mask); *cur_mask = rt_mask; } @@ -182,7 +182,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) -@@ -3489,7 +3536,11 @@ BOOL context_apply_draw_state(struct wined3d_context *context, +@@ -3504,7 +3551,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; @@ -194,7 +194,7 @@ diff --git a/dlls/wined3d/context.c b/dlls/wined3d/context.c unsigned int i; WORD map; -@@ -3658,6 +3709,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str +@@ -3694,6 +3745,15 @@ struct wined3d_context *context_acquire(const struct wined3d_device *device, str TRACE("device %p, target %p.\n", device, target); @@ -1292,7 +1292,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c { const struct wined3d_gl_info *gl_info = &cs->device->adapter->gl_info; const struct wined3d_d3d_info *d3d_info = &cs->device->adapter->d3d_info; -@@ -1001,26 +1631,44 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data) +@@ -1001,27 +1631,45 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data) if (new_use_color_key) device_invalidate_state(cs->device, STATE_COLOR_KEY); @@ -1329,7 +1329,8 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c const struct wined3d_cs_set_shader_resource_view *op = data; cs->state.shader_resource_view[op->type][op->view_idx] = op->view; - device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + if (op->type != WINED3D_SHADER_TYPE_COMPUTE) + device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); +#if defined(STAGING_CSMT) + + return sizeof(*op); @@ -1337,7 +1338,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned int view_idx, -@@ -1028,15 +1676,25 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i +@@ -1029,15 +1677,25 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i { struct wined3d_cs_set_unordered_access_view *op; @@ -1363,7 +1364,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c { const struct wined3d_cs_set_unordered_access_view *op = data; struct wined3d_unordered_access_view *prev; -@@ -1050,6 +1708,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con +@@ -1051,6 +1709,10 @@ static void wined3d_cs_exec_set_unordered_access_view(struct wined3d_cs *cs, con InterlockedDecrement(&prev->resource->bind_count); device_invalidate_state(cs->device, STATE_UNORDERED_ACCESS_VIEW_BINDING); @@ -1374,7 +1375,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3d_shader_type type, -@@ -1057,21 +1719,35 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3 +@@ -1058,21 +1720,35 @@ void wined3d_cs_emit_set_shader_resource_view(struct wined3d_cs *cs, enum wined3 { struct wined3d_cs_set_shader_resource_view *op; @@ -1410,7 +1411,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type type, -@@ -1079,42 +1755,70 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type +@@ -1080,16 +1756,26 @@ void wined3d_cs_emit_set_sampler(struct wined3d_cs *cs, enum wined3d_shader_type { struct wined3d_cs_set_sampler *op; @@ -1437,9 +1438,10 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c { const struct wined3d_cs_set_shader *op = data; - cs->state.shader[op->type] = op->shader; +@@ -1097,26 +1783,44 @@ static void wined3d_cs_exec_set_shader(struct wined3d_cs *cs, const void *data) device_invalidate_state(cs->device, STATE_SHADER(op->type)); - device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); + if (op->type != WINED3D_SHADER_TYPE_COMPUTE) + device_invalidate_state(cs->device, STATE_SHADER_RESOURCE_BINDING); +#if defined(STAGING_CSMT) + + return sizeof(*op); @@ -1481,7 +1483,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, -@@ -1122,6 +1826,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, +@@ -1124,6 +1828,7 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, { struct wined3d_cs_set_rasterizer_state *op; @@ -1489,7 +1491,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op = cs->ops->require_space(cs, sizeof(*op)); op->opcode = WINED3D_CS_OP_SET_RASTERIZER_STATE; op->state = rasterizer_state; -@@ -1130,31 +1835,57 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, +@@ -1132,31 +1837,57 @@ void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, } static void wined3d_cs_exec_set_render_state(struct wined3d_cs *cs, const void *data) @@ -1547,7 +1549,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, -@@ -1162,21 +1893,35 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, +@@ -1164,21 +1895,35 @@ void wined3d_cs_emit_set_texture_state(struct wined3d_cs *cs, UINT stage, { struct wined3d_cs_set_texture_state *op; @@ -1583,7 +1585,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, -@@ -1184,22 +1929,36 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, +@@ -1186,22 +1931,36 @@ void wined3d_cs_emit_set_sampler_state(struct wined3d_cs *cs, UINT sampler_idx, { struct wined3d_cs_set_sampler_state *op; @@ -1620,7 +1622,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform_state state, -@@ -1207,35 +1966,59 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform +@@ -1209,35 +1968,59 @@ void wined3d_cs_emit_set_transform(struct wined3d_cs *cs, enum wined3d_transform { struct wined3d_cs_set_transform *op; @@ -1680,7 +1682,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c { const struct wined3d_cs_set_color_key *op = data; struct wined3d_texture *texture = op->texture; -@@ -1296,6 +2079,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat +@@ -1298,6 +2081,10 @@ static void wined3d_cs_exec_set_color_key(struct wined3d_cs *cs, const void *dat break; } } @@ -1691,7 +1693,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, -@@ -1303,7 +2090,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture +@@ -1305,7 +2092,11 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture { struct wined3d_cs_set_color_key *op; @@ -1703,7 +1705,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op->opcode = WINED3D_CS_OP_SET_COLOR_KEY; op->texture = texture; op->flags = flags; -@@ -1314,22 +2105,33 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture +@@ -1316,22 +2107,33 @@ void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture } else op->set = 0; @@ -1737,7 +1739,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op = cs->ops->require_space(cs, sizeof(*op)); op->opcode = WINED3D_CS_OP_SET_MATERIAL; op->material = *material; -@@ -1340,17 +2142,37 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma +@@ -1342,17 +2144,37 @@ void wined3d_cs_emit_set_material(struct wined3d_cs *cs, const struct wined3d_ma static void wined3d_cs_exec_reset_state(struct wined3d_cs *cs, const void *data) { struct wined3d_adapter *adapter = cs->device->adapter; @@ -1775,7 +1777,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op = cs->ops->require_space(cs, sizeof(*op)); op->opcode = WINED3D_CS_OP_RESET_STATE; -@@ -1358,17 +2180,32 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) +@@ -1360,17 +2182,32 @@ void wined3d_cs_emit_reset_state(struct wined3d_cs *cs) } static void wined3d_cs_exec_destroy_object(struct wined3d_cs *cs, const void *data) @@ -1808,7 +1810,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op->opcode = WINED3D_CS_OP_DESTROY_OBJECT; op->callback = callback; op->object = object; -@@ -1376,40 +2213,96 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void +@@ -1378,40 +2215,96 @@ void wined3d_cs_emit_destroy_object(struct wined3d_cs *cs, void (*callback)(void cs->ops->submit(cs); } @@ -1905,7 +1907,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op->opcode = WINED3D_CS_OP_PRELOAD_RESOURCE; op->resource = resource; -@@ -1418,20 +2311,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso +@@ -1420,20 +2313,32 @@ void wined3d_cs_emit_preload_resource(struct wined3d_cs *cs, struct wined3d_reso cs->ops->submit(cs); } @@ -1938,7 +1940,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op->opcode = WINED3D_CS_OP_UNLOAD_RESOURCE; op->resource = resource; -@@ -1440,13 +2345,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou +@@ -1442,13 +2347,21 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou cs->ops->submit(cs); } @@ -1960,7 +1962,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, -@@ -1455,7 +2368,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, +@@ -1457,7 +2370,11 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, struct wined3d_cs_map *op; HRESULT hr; @@ -1972,7 +1974,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op->opcode = WINED3D_CS_OP_MAP; op->resource = resource; op->sub_resource_idx = sub_resource_idx; -@@ -1464,17 +2381,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, +@@ -1466,17 +2383,29 @@ HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, op->flags = flags; op->hr = &hr; @@ -2002,7 +2004,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c } HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx) -@@ -1482,19 +2411,805 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc +@@ -1484,19 +2413,805 @@ HRESULT wined3d_cs_unmap(struct wined3d_cs *cs, struct wined3d_resource *resourc struct wined3d_cs_unmap *op; HRESULT hr; @@ -2808,7 +2810,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c /* WINED3D_CS_OP_PRESENT */ wined3d_cs_exec_present, /* WINED3D_CS_OP_CLEAR */ wined3d_cs_exec_clear, /* WINED3D_CS_OP_DISPATCH */ wined3d_cs_exec_dispatch, -@@ -1526,13 +3241,43 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -1528,13 +3243,43 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_RESET_STATE */ wined3d_cs_exec_reset_state, /* WINED3D_CS_OP_DESTROY_OBJECT */ wined3d_cs_exec_destroy_object, /* WINED3D_CS_OP_QUERY_ISSUE */ wined3d_cs_exec_query_issue, @@ -2852,7 +2854,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c { if (size > cs->data_size) { -@@ -1556,6 +3301,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs) +@@ -1558,6 +3303,7 @@ static void wined3d_cs_st_submit(struct wined3d_cs *cs) wined3d_cs_op_handlers[opcode](cs, cs->data); } @@ -2860,7 +2862,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants) { -@@ -1596,15 +3342,161 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus +@@ -1598,15 +3344,161 @@ static void wined3d_cs_st_push_constants(struct wined3d_cs *cs, enum wined3d_pus for (i = 0, context_count = device->context_count; i < context_count; ++i) { device->contexts[i]->constant_update_mask |= push_constant_info[p].mask; @@ -3022,7 +3024,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) { -@@ -1614,34 +3506,97 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) +@@ -1616,34 +3508,97 @@ struct wined3d_cs *wined3d_cs_create(struct wined3d_device *device) if (!(cs = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*cs)))) return NULL; @@ -4370,7 +4372,7 @@ diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c device->update_state = &device->state; if (!(device->cs = wined3d_cs_create(device))) -@@ -5283,3 +5789,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -5289,3 +5795,58 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL else return CallWindowProcA(proc, window, message, wparam, lparam); } @@ -4638,7 +4640,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 -@@ -3218,7 +3218,11 @@ void find_ps_compile_args(const struct wined3d_state *state, const struct wined3 +@@ -3219,7 +3219,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. */ @@ -4733,7 +4735,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c float scale; union -@@ -4632,8 +4660,13 @@ static void vertexdeclaration(struct wined3d_context *context, const struct wine +@@ -4637,8 +4665,13 @@ 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) { @@ -4747,7 +4749,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; unsigned int width, height; -@@ -4672,8 +4705,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine +@@ -4677,8 +4710,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine static void viewport_miscpart_cc(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id) { @@ -4761,7 +4763,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c float pixel_center_offset = context->d3d_info->wined3d_creation_flags & WINED3D_PIXEL_CENTER_INTEGER ? 0.5f : 0.0f; const struct wined3d_gl_info *gl_info = context->gl_info; -@@ -4868,7 +4906,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st +@@ -4873,7 +4911,11 @@ static void scissorrect(struct wined3d_context *context, const struct wined3d_st } else { @@ -4773,7 +4775,7 @@ diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c UINT height; UINT width; -@@ -4944,7 +4986,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state +@@ -4949,7 +4991,11 @@ void state_srgbwrite(struct wined3d_context *context, const struct wined3d_state TRACE("context %p, state %p, state_id %#x.\n", context, state, state_id); @@ -4979,7 +4981,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -2476,8 +2494,12 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st +@@ -2477,8 +2495,12 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st { struct wined3d_resource *resource = &s->container->resource; struct wined3d_device *device = resource->device; @@ -4992,7 +4994,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c const struct blit_shader *blitter; HRESULT hr; -@@ -2488,6 +2510,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st +@@ -2489,6 +2511,7 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st return WINED3DERR_INVALIDCALL; } @@ -5000,7 +5002,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c view_desc.format_id = resource->format->id; view_desc.flags = 0; view_desc.u.texture.level_idx = s->texture_level; -@@ -2503,6 +2526,19 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st +@@ -2504,6 +2527,19 @@ HRESULT surface_color_fill(struct wined3d_surface *s, const RECT *rect, const st hr = blitter->color_fill(device, view, rect, color); wined3d_rendertarget_view_decref(view); @@ -5020,7 +5022,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c return hr; } -@@ -2513,7 +2549,11 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE +@@ -2514,7 +2550,11 @@ static HRESULT surface_blt_special(struct wined3d_surface *dst_surface, const RE { struct wined3d_texture *dst_texture = dst_surface->container; struct wined3d_device *device = dst_texture->resource.device; @@ -5032,7 +5034,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_swapchain *src_swapchain, *dst_swapchain; struct wined3d_texture *src_texture; -@@ -2871,7 +2911,11 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, +@@ -2872,7 +2912,11 @@ static HRESULT surface_load_texture(struct wined3d_surface *surface, /* Don't use PBOs for converted surfaces. During PBO conversion we look at * WINED3D_TEXTURE_CONVERTED but it isn't set (yet) in all cases it is * getting called. */ @@ -5044,7 +5046,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c { TRACE("Removing the pbo attached to surface %p.\n", surface); -@@ -3886,7 +3930,11 @@ const struct blit_shader cpu_blit = { +@@ -3891,7 +3935,11 @@ const struct blit_shader cpu_blit = { cpu_blit_blit_surface, }; @@ -5056,7 +5058,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c struct wined3d_surface *src_surface, const RECT *src_rect, DWORD flags, const struct wined3d_blt_fx *fx, enum wined3d_texture_filter_type filter) { -@@ -3896,9 +3944,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -3901,9 +3949,14 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst struct wined3d_texture *dst_texture = dst_surface->container; struct wined3d_device *device = dst_texture->resource.device; struct wined3d_swapchain *src_swapchain, *dst_swapchain; @@ -5071,7 +5073,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c DWORD src_ds_flags, dst_ds_flags; BOOL scale, convert; -@@ -3911,6 +3964,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -3916,6 +3969,7 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst | WINED3D_BLT_DO_NOT_WAIT | WINED3D_BLT_ALPHA_TEST; @@ -5079,7 +5081,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c TRACE("dst_surface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p, filter %s.\n", dst_surface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx, debug_d3dtexturefiltertype(filter)); -@@ -3928,10 +3982,12 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -3933,10 +3987,12 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst fx->src_color_key.color_space_high_value); } @@ -5092,7 +5094,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } if (dst_texture->sub_resources[dst_sub_resource_idx].map_count -@@ -3989,6 +4045,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -3994,6 +4050,15 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst if (!once++) FIXME("Can't handle WINED3D_BLT_DO_NOT_WAIT flag.\n"); flags &= ~WINED3D_BLT_DO_NOT_WAIT; @@ -5108,7 +5110,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } if (!device->d3d_initialized) -@@ -4013,11 +4078,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4018,11 +4083,13 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst goto fallback; } @@ -5122,7 +5124,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c dst_swapchain = dst_texture->swapchain; /* This isn't strictly needed. FBO blits for example could deal with -@@ -4053,13 +4120,21 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4058,13 +4125,21 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst TRACE("Depth fill.\n"); if (!surface_convert_depth_to_float(dst_surface, fx->fill_color, &depth)) @@ -5144,7 +5146,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c if (src_ds_flags != dst_ds_flags) { WARN("Rejecting depth / stencil blit between incompatible formats.\n"); -@@ -4069,6 +4144,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4074,6 +4149,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst if (SUCCEEDED(wined3d_surface_depth_blt(src_surface, src_texture->resource.draw_binding, src_rect, dst_surface, dst_texture->resource.draw_binding, dst_rect))) return WINED3D_OK; @@ -5156,7 +5158,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } else -@@ -4104,7 +4184,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4109,7 +4189,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst goto fallback; if (SUCCEEDED(surface_color_fill(dst_surface, dst_rect, &color))) @@ -5168,7 +5170,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } else { -@@ -4147,7 +4231,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4152,7 +4236,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst context, dst_texture->resource.draw_binding); context_release(context); } @@ -5180,7 +5182,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4171,7 +4259,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4176,7 +4264,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst wined3d_swapchain_present(dst_swapchain, NULL, NULL, dst_swapchain->win_handle, 0); dst_swapchain->desc.swap_effect = swap_effect; @@ -5192,7 +5194,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } if (fbo_blit_supported(&device->adapter->gl_info, blit_op, -@@ -4192,7 +4284,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4197,7 +4289,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst wined3d_texture_invalidate_location(dst_texture, dst_sub_resource_idx, ~dst_texture->resource.draw_binding); @@ -5204,7 +5206,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } blitter = wined3d_select_blitter(&device->adapter->gl_info, &device->adapter->d3d_info, blit_op, -@@ -4202,7 +4298,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4207,7 +4303,11 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst { blitter->blit_surface(device, blit_op, filter, src_surface, src_rect, dst_surface, dst_rect, color_key); @@ -5216,7 +5218,7 @@ diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c } } } -@@ -4210,9 +4310,151 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst +@@ -4215,9 +4315,151 @@ HRESULT wined3d_surface_blt(struct wined3d_surface *dst_surface, const RECT *dst fallback: /* Special cases for render targets. */ if (SUCCEEDED(surface_blt_special(dst_surface, dst_rect, src_surface, src_rect, flags, fx, filter))) @@ -5808,7 +5810,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (resource->type == WINED3D_RTYPE_TEXTURE_2D) { -@@ -2631,11 +2721,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 +@@ -2632,11 +2722,23 @@ static HRESULT texture_init(struct wined3d_texture *texture, const struct wined3 TRACE("Created surface level %u, layer %u @ %p.\n", i, j, surface); @@ -5832,7 +5834,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } } } -@@ -2838,7 +2940,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2839,7 +2941,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { @@ -5844,7 +5846,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c wined3d_texture_bind_and_dirtify(texture, context, location == WINED3D_LOCATION_TEXTURE_SRGB); wined3d_texture_get_pitch(texture, sub_resource_idx, &row_pitch, &slice_pitch); -@@ -2884,7 +2990,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2885,7 +2991,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_BUFFER: if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { @@ -5856,7 +5858,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->locations & WINED3D_LOCATION_TEXTURE_RGB) wined3d_texture_bind_and_dirtify(texture, context, FALSE); -@@ -3421,13 +3531,49 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct +@@ -3422,13 +3532,49 @@ HRESULT CDECL wined3d_texture_create(struct wined3d_device *device, const struct return WINED3D_OK; } @@ -5906,7 +5908,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c TRACE("texture %p, sub_resource_idx %u, dc %p.\n", texture, sub_resource_idx, dc); -@@ -3452,6 +3598,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -3453,6 +3599,7 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i if (texture->resource.map_count && !(texture->flags & WINED3D_TEXTURE_GET_DC_LENIENT)) return WINED3DERR_INVALIDCALL; @@ -5914,7 +5916,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (device->d3d_initialized) context = context_acquire(device, NULL); -@@ -3469,11 +3616,40 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i +@@ -3470,11 +3617,40 @@ HRESULT CDECL wined3d_texture_get_dc(struct wined3d_texture *texture, unsigned i texture->flags |= WINED3D_TEXTURE_DC_IN_USE; ++texture->resource.map_count; ++sub_resource->map_count; @@ -5955,7 +5957,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsigned int sub_resource_idx, HDC dc) -@@ -3504,6 +3680,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign +@@ -3505,6 +3681,7 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign return WINED3DERR_INVALIDCALL; } @@ -5963,7 +5965,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (!(texture->resource.usage & WINED3DUSAGE_OWNDC) && !(device->wined3d->flags & WINED3D_NO3D)) wined3d_surface_destroy_dc(surface); -@@ -3514,4 +3691,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign +@@ -3515,4 +3692,9 @@ HRESULT CDECL wined3d_texture_release_dc(struct wined3d_texture *texture, unsign texture->flags &= ~WINED3D_TEXTURE_DC_IN_USE; return WINED3D_OK; @@ -5976,7 +5978,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 -@@ -4645,7 +4645,11 @@ void get_projection_matrix(const struct wined3d_context *context, const struct w +@@ -4649,7 +4649,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; @@ -5988,7 +5990,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; -@@ -5444,7 +5448,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d +@@ -5448,7 +5452,11 @@ void gen_ffp_frag_op(const struct wined3d_context *context, const struct wined3d break; } } @@ -6115,7 +6117,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; extern struct wined3d_settings wined3d_settings DECLSPEC_HIDDEN; -@@ -1459,6 +1462,9 @@ struct wined3d_query +@@ -1483,6 +1486,9 @@ struct wined3d_query const void *data; DWORD data_size; const struct wined3d_query_ops *query_ops; @@ -6125,7 +6127,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; union wined3d_gl_query_object -@@ -1500,6 +1506,9 @@ struct wined3d_occlusion_query +@@ -1524,6 +1530,9 @@ struct wined3d_occlusion_query GLuint id; struct wined3d_context *context; UINT64 samples; @@ -6135,7 +6137,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h }; struct wined3d_timestamp_query -@@ -1515,6 +1524,38 @@ struct wined3d_timestamp_query +@@ -1539,6 +1548,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; @@ -6174,17 +6176,17 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_context { const struct wined3d_gl_info *gl_info; -@@ -1529,6 +1570,9 @@ struct wined3d_context - DWORD dirtyArray[STATE_HIGHEST + 1]; /* Won't get bigger than that, a state is never marked dirty 2 times */ +@@ -1554,6 +1595,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]; +#if defined(STAGING_CSMT) + struct wined3d_fb_state current_fb; +#endif /* STAGING_CSMT */ struct wined3d_device *device; struct wined3d_swapchain *swapchain; -@@ -1641,12 +1685,14 @@ struct wined3d_context +@@ -1666,12 +1710,14 @@ struct wined3d_context GLuint dummy_arbfp_prog; }; @@ -6199,7 +6201,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 -@@ -1785,7 +1831,11 @@ void context_alloc_event_query(struct wined3d_context *context, +@@ -1810,7 +1856,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; @@ -6211,7 +6213,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h UINT rt_count, const struct wined3d_fb_state *fb) DECLSPEC_HIDDEN; void context_apply_compute_state(struct wined3d_context *context, const struct wined3d_device *device, const struct wined3d_state *state) DECLSPEC_HIDDEN; -@@ -2468,7 +2518,11 @@ struct wined3d_stream_state +@@ -2494,7 +2544,11 @@ struct wined3d_stream_state struct wined3d_state { DWORD flags; @@ -6223,7 +6225,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]; -@@ -2516,6 +2570,16 @@ struct wined3d_state +@@ -2542,6 +2596,16 @@ struct wined3d_state struct wined3d_rasterizer_state *rasterizer_state; }; @@ -6240,7 +6242,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 -@@ -2574,7 +2638,9 @@ struct wined3d_device +@@ -2600,7 +2664,9 @@ struct wined3d_device struct wine_rb_tree samplers; /* Render Target Support */ @@ -6250,7 +6252,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_rendertarget_view *auto_depth_stencil_view; /* For rendering to a texture using glCopyTexImage */ -@@ -2630,6 +2696,17 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -2656,6 +2722,17 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL 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; void device_invalidate_state(const struct wined3d_device *device, DWORD state) DECLSPEC_HIDDEN; @@ -6268,7 +6270,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) { -@@ -2705,11 +2782,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource) +@@ -2731,11 +2808,13 @@ static inline void wined3d_resource_release(struct wined3d_resource *resource) InterlockedDecrement(&resource->access_count); } @@ -6282,7 +6284,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void resource_cleanup(struct wined3d_resource *resource) DECLSPEC_HIDDEN; HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *device, enum wined3d_resource_type type, const struct wined3d_format *format, -@@ -2820,7 +2899,11 @@ struct wined3d_texture +@@ -2846,7 +2925,11 @@ struct wined3d_texture unsigned int map_count; DWORD locations; @@ -6294,7 +6296,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h } sub_resources[1]; }; -@@ -2873,9 +2956,16 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, +@@ -2899,9 +2982,16 @@ void wined3d_texture_bind_and_dirtify(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; BOOL wined3d_texture_check_block_align(const struct wined3d_texture *texture, unsigned int level, const struct wined3d_box *box) DECLSPEC_HIDDEN; @@ -6311,7 +6313,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_invalidate_location(struct wined3d_texture *texture, unsigned int sub_resource_idx, DWORD location) DECLSPEC_HIDDEN; void wined3d_texture_load(struct wined3d_texture *texture, -@@ -2888,6 +2978,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned +@@ -2914,6 +3004,10 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned struct wined3d_context *context, DWORD location) DECLSPEC_HIDDEN; void wined3d_texture_prepare_texture(struct wined3d_texture *texture, struct wined3d_context *context, BOOL srgb) DECLSPEC_HIDDEN; @@ -6322,7 +6324,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_texture_set_map_binding(struct wined3d_texture *texture, DWORD map_binding) DECLSPEC_HIDDEN; void wined3d_texture_set_swapchain(struct wined3d_texture *texture, struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; -@@ -2995,6 +3089,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P +@@ -3021,6 +3115,11 @@ HRESULT surface_upload_from_surface(struct wined3d_surface *dst_surface, const P void wined3d_surface_upload_data(struct wined3d_surface *surface, const struct wined3d_gl_info *gl_info, const struct wined3d_format *format, const RECT *src_rect, UINT src_pitch, const POINT *dst_point, BOOL srgb, const struct wined3d_const_bo_address *data) DECLSPEC_HIDDEN; @@ -6334,7 +6336,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void draw_textured_quad(const struct wined3d_surface *src_surface, struct wined3d_context *context, const RECT *src_rect, const RECT *dst_rect, enum wined3d_texture_filter_type filter) DECLSPEC_HIDDEN; -@@ -3009,6 +3108,10 @@ struct wined3d_sampler +@@ -3035,6 +3134,10 @@ struct wined3d_sampler GLuint name; }; @@ -6345,7 +6347,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_vertex_declaration_element { const struct wined3d_format *format; -@@ -3104,9 +3207,14 @@ struct wined3d_stateblock +@@ -3130,9 +3233,14 @@ struct wined3d_stateblock void stateblock_init_contained_states(struct wined3d_stateblock *stateblock) DECLSPEC_HIDDEN; void state_cleanup(struct wined3d_state *state) DECLSPEC_HIDDEN; @@ -6360,7 +6362,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void state_unbind_resources(struct wined3d_state *state) DECLSPEC_HIDDEN; enum wined3d_push_constants -@@ -3119,6 +3227,7 @@ enum wined3d_push_constants +@@ -3145,6 +3253,7 @@ enum wined3d_push_constants WINED3D_PUSH_CONSTANTS_PS_B, }; @@ -6368,7 +6370,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_cs_ops { void *(*require_space)(struct wined3d_cs *cs, size_t size); -@@ -3126,34 +3235,128 @@ struct wined3d_cs_ops +@@ -3152,34 +3261,128 @@ struct wined3d_cs_ops void (*push_constants)(struct wined3d_cs *cs, enum wined3d_push_constants p, unsigned int start_idx, unsigned int count, const void *constants); }; @@ -6497,7 +6499,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_clip_plane(struct wined3d_cs *cs, UINT plane_idx, const struct wined3d_vec4 *plane) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_color_key(struct wined3d_cs *cs, struct wined3d_texture *texture, -@@ -3164,9 +3367,17 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, +@@ -3190,9 +3393,17 @@ void wined3d_cs_emit_set_depth_stencil_view(struct wined3d_cs *cs, struct wined3d_rendertarget_view *view) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_index_buffer(struct wined3d_cs *cs, struct wined3d_buffer *buffer, enum wined3d_format_id format_id, unsigned int offset) DECLSPEC_HIDDEN; @@ -6515,7 +6517,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void wined3d_cs_emit_set_rasterizer_state(struct wined3d_cs *cs, struct wined3d_rasterizer_state *rasterizer_state) DECLSPEC_HIDDEN; void wined3d_cs_emit_set_render_state(struct wined3d_cs *cs, -@@ -3198,17 +3409,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i +@@ -3224,17 +3435,35 @@ void wined3d_cs_emit_set_unordered_access_view(struct wined3d_cs *cs, unsigned i 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; @@ -6551,7 +6553,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 */ -@@ -3309,6 +3538,14 @@ struct wined3d_gl_view +@@ -3335,6 +3564,14 @@ struct wined3d_gl_view GLuint name; }; @@ -6566,7 +6568,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h struct wined3d_shader_resource_view { LONG refcount; -@@ -3344,7 +3581,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_ +@@ -3370,7 +3607,12 @@ void wined3d_unordered_access_view_invalidate_location(struct wined3d_unordered_ struct wined3d_swapchain_ops { void (*swapchain_present)(struct wined3d_swapchain *swapchain, @@ -6579,7 +6581,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h void (*swapchain_frontbuffer_updated)(struct wined3d_swapchain *swapchain); }; -@@ -3381,6 +3623,10 @@ struct wined3d_swapchain +@@ -3407,6 +3649,10 @@ struct wined3d_swapchain void wined3d_swapchain_activate(struct wined3d_swapchain *swapchain, BOOL activate) DECLSPEC_HIDDEN; struct wined3d_context *swapchain_get_context(struct wined3d_swapchain *swapchain) DECLSPEC_HIDDEN; diff --git a/patches/wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch b/patches/wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch index d99c5ab9..6fa6a161 100644 --- a/patches/wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch +++ b/patches/wined3d-Silence_FIXMEs/0001-wined3d-Silence-repeated-Unhandled-blend-factor-0-me.patch @@ -1,4 +1,4 @@ -From fbbc2b263f3ec7769a2f3b5ab17ae2e841b95876 Mon Sep 17 00:00:00 2001 +From 6c46c1e7d4c3ac8fe3482dc7d948b6d4397b6ef7 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sun, 15 Mar 2015 01:33:05 +0100 Subject: wined3d: Silence repeated 'Unhandled blend factor 0' messages. @@ -8,12 +8,12 @@ Subject: wined3d: Silence repeated 'Unhandled blend factor 0' messages. 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index 67570d5..1bc2973 100644 +index 540a1b36174..d7f70545905 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c -@@ -360,8 +360,11 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo - case WINED3D_BLEND_INVBLENDFACTOR: - return GL_ONE_MINUS_CONSTANT_COLOR_EXT; +@@ -415,8 +415,11 @@ static GLenum gl_blend_factor(enum wined3d_blend factor, const struct wined3d_fo + case WINED3D_BLEND_INVSRC1ALPHA: + return GL_ONE_MINUS_SRC1_ALPHA; default: - FIXME("Unhandled blend factor %#x.\n", factor); + { @@ -25,5 +25,5 @@ index 67570d5..1bc2973 100644 } -- -2.3.2 +2.11.0 diff --git a/staging/VERSION b/staging/VERSION index c376cb80..bd345cde 100644 --- a/staging/VERSION +++ b/staging/VERSION @@ -1 +1 @@ -Wine Staging 2.1 +Wine Staging 2.2 (unreleased)