From d7385d6c01b693a02192c9a98499ac8d60a377c9 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Tue, 12 Sep 2017 03:12:34 +0200 Subject: [PATCH] Rebase against 19d57982ecb4520453a1b77ace386c625312e265. --- ...-Protect-TTM_ADDTOOLW-from-invalid-t.patch | 4 +- ...t-use-draw_quad-in-test_cb_relative_.patch | 51 ------ ...d11-tests-Add-some-basic-depth-tests.patch | 151 +++--------------- ...d3d11-Implement-depth-bias-and-slope.patch | 6 +- ...t-for-SlopeScaledDepthBias-in-RSSetS.patch | 4 +- ...2-tests-Add-tests-for-NtQuerySection.patch | 12 +- patches/patchinstall.sh | 42 +---- ...plement-IWICBitmapFrameEncode-SetPal.patch | 62 ------- .../wined3d-CSMT_Main/9999-IfDefined.patch | 14 +- ...t-copying-sub-resources-between-comp.patch | 42 ++--- ...sts-Add-basic-dual-source-blend-test.patch | 10 +- ...dd-test-for-nointerpolation-modifier.patch | 10 +- ...ort-for-interpolation-modifiers-in-s.patch | 32 ++-- .../definition | 1 - ...-Allow-arbitrary-viewports-for-d3d11.patch | 23 +-- ...e-conservative-depth-output-register.patch | 105 ------------ ...ervative-depth-access-information-to.patch | 100 ------------ patches/wined3d-conservative_depth/definition | 2 - 18 files changed, 107 insertions(+), 564 deletions(-) delete mode 100644 patches/d3d11-Depth_Bias/0001-d3d11-tests-Don-t-use-draw_quad-in-test_cb_relative_.patch delete mode 100644 patches/windowscodecs-GIF_Encoder/0003-windowscodecs-Implement-IWICBitmapFrameEncode-SetPal.patch delete mode 100644 patches/wined3d-conservative_depth/0001-wined3d-Recognize-conservative-depth-output-register.patch delete mode 100644 patches/wined3d-conservative_depth/0002-wined3d-Add-conservative-depth-access-information-to.patch delete mode 100644 patches/wined3d-conservative_depth/definition diff --git a/patches/comctl32-TTM_ADDTOOLW/0001-comctl32-tooltip-Protect-TTM_ADDTOOLW-from-invalid-t.patch b/patches/comctl32-TTM_ADDTOOLW/0001-comctl32-tooltip-Protect-TTM_ADDTOOLW-from-invalid-t.patch index 2d02c105..43dcd29b 100644 --- a/patches/comctl32-TTM_ADDTOOLW/0001-comctl32-tooltip-Protect-TTM_ADDTOOLW-from-invalid-t.patch +++ b/patches/comctl32-TTM_ADDTOOLW/0001-comctl32-tooltip-Protect-TTM_ADDTOOLW-from-invalid-t.patch @@ -66,13 +66,13 @@ index 8bf6919..eea1d2e 100644 } else if (isW) { - INT len = lstrlenW (ti->lpszText); -- TRACE("add text %s!\n", debugstr_w(ti->lpszText)); +- TRACE("add text %s\n", debugstr_w(ti->lpszText)); - toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR)); - strcpyW (toolPtr->lpszText, ti->lpszText); + __TRY + { + INT len = lstrlenW (ti->lpszText); -+ TRACE("add text %s!\n", debugstr_w(ti->lpszText)); ++ TRACE("add text %s\n", debugstr_w(ti->lpszText)); + toolPtr->lpszText = Alloc ((len + 1)*sizeof(WCHAR)); + strcpyW (toolPtr->lpszText, ti->lpszText); + } diff --git a/patches/d3d11-Depth_Bias/0001-d3d11-tests-Don-t-use-draw_quad-in-test_cb_relative_.patch b/patches/d3d11-Depth_Bias/0001-d3d11-tests-Don-t-use-draw_quad-in-test_cb_relative_.patch deleted file mode 100644 index 55ca6064..00000000 --- a/patches/d3d11-Depth_Bias/0001-d3d11-tests-Don-t-use-draw_quad-in-test_cb_relative_.patch +++ /dev/null @@ -1,51 +0,0 @@ -From 1706e3e86b8a58ff9060ab9d16bfef351971f3e2 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Fri, 7 Jul 2017 04:06:01 +0200 -Subject: d3d11/tests: Don't use draw_quad in test_cb_relative_addressing. - ---- - dlls/d3d11/tests/d3d11.c | 10 +++++++++- - 1 file changed, 9 insertions(+), 1 deletion(-) - -diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 241320d0a74..83ae6413f99 100644 ---- a/dlls/d3d11/tests/d3d11.c -+++ b/dlls/d3d11/tests/d3d11.c -@@ -12101,6 +12101,7 @@ static void test_cb_relative_addressing(void) - ID3D11Buffer *colors_cb, *index_cb; - unsigned int i, index[4] = {0}; - ID3D11DeviceContext *context; -+ unsigned int stride, offset; - ID3D11PixelShader *ps; - ID3D11Device *device; - HRESULT hr; -@@ -12241,10 +12242,17 @@ float4 main(const ps_in v) : SV_TARGET - hr = ID3D11Device_CreatePixelShader(device, ps_code, sizeof(ps_code), NULL, &ps); - ok(SUCCEEDED(hr), "Failed to create pixel shader, hr %#x.\n", hr); - -+ ID3D11DeviceContext_VSSetShader(context, test_context.vs, NULL, 0); - ID3D11DeviceContext_VSSetConstantBuffers(context, 0, 1, &index_cb); - ID3D11DeviceContext_VSSetConstantBuffers(context, 1, 1, &colors_cb); - ID3D11DeviceContext_PSSetShader(context, ps, NULL, 0); - -+ stride = sizeof(*quad); -+ offset = 0; -+ ID3D11DeviceContext_IASetInputLayout(context, test_context.input_layout); -+ ID3D11DeviceContext_IASetPrimitiveTopology(context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); -+ ID3D11DeviceContext_IASetVertexBuffers(context, 0, 1, &test_context.vb, &stride, &offset); -+ - for (i = 0; i < ARRAY_SIZE(test_data); ++i) - { - ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, white_color); -@@ -12252,7 +12260,7 @@ float4 main(const ps_in v) : SV_TARGET - index[0] = test_data[i].index; - ID3D11DeviceContext_UpdateSubresource(context, (ID3D11Resource *)index_cb, 0, NULL, &index, 0, 0); - -- draw_quad(&test_context); -+ ID3D11DeviceContext_Draw(context, 4, 0); - check_texture_color(test_context.backbuffer, test_data[i].expected, 1); - } - --- -2.13.1 - diff --git a/patches/d3d11-Depth_Bias/0002-d3d11-tests-Add-some-basic-depth-tests.patch b/patches/d3d11-Depth_Bias/0002-d3d11-tests-Add-some-basic-depth-tests.patch index 64ebddc3..39e7e205 100644 --- a/patches/d3d11-Depth_Bias/0002-d3d11-tests-Add-some-basic-depth-tests.patch +++ b/patches/d3d11-Depth_Bias/0002-d3d11-tests-Add-some-basic-depth-tests.patch @@ -1,137 +1,38 @@ -From f6b0a2ea8cfe9fe2bb272689dffb0f9e27b38f0b Mon Sep 17 00:00:00 2001 +From a2011b8504dd6c5634d5ea369d04287d9d5ee6e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 7 Jul 2017 05:44:09 +0200 Subject: d3d11/tests: Add some basic depth tests. --- - dlls/d3d11/tests/d3d11.c | 253 +++++++++++++++++++++++++++++++++++++++++++---- - 1 file changed, 232 insertions(+), 21 deletions(-) + dlls/d3d11/tests/d3d11.c | 209 ++++++++++++++++++++++++++++++++++++++++++++++- + 1 file changed, 206 insertions(+), 3 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 83ae6413f99..7c9c8395315 100644 +index 22f5997896a..2552a6cc701 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -1194,6 +1194,7 @@ struct d3d11_test_context - ID3D11InputLayout *input_layout; - ID3D11VertexShader *vs; - ID3D11Buffer *vb; -+ float last_depth; - - ID3D11PixelShader *ps; - ID3D11Buffer *ps_cb; -@@ -1270,12 +1271,13 @@ static void release_test_context_(unsigned int line, struct d3d11_test_context * - ok_(__FILE__, line)(!ref, "Device has %u references left.\n", ref); - } - --#define draw_quad(c) draw_quad_(__LINE__, c) --static void draw_quad_(unsigned int line, struct d3d11_test_context *context) -+#define draw_quad(c) draw_quad_(__LINE__, c, 0.0f) -+#define draw_quad_depth(c,d) draw_quad_(__LINE__, c, d) -+static void draw_quad_(unsigned int line, struct d3d11_test_context *context, float depth) - { - static const D3D11_INPUT_ELEMENT_DESC default_layout_desc[] = - { -- {"POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, -+ {"POSITION", 0, DXGI_FORMAT_R32G32B32_FLOAT, 0, 0, D3D11_INPUT_PER_VERTEX_DATA, 0}, - }; - static const DWORD default_vs_code[] = - { -@@ -1301,12 +1303,12 @@ static void draw_quad_(unsigned int line, struct d3d11_test_context *context) - 0x49534f50, 0x4e4f4954, 0xababab00, 0x4e47534f, 0x0000002c, 0x00000001, 0x00000008, 0x00000020, - 0x00000000, 0x00000001, 0x00000003, 0x00000000, 0x0000000f, 0x505f5653, 0x5449534f, 0x004e4f49, - }; -- static const struct vec2 quad[] = -+ struct vec3 quad[] = - { -- {-1.0f, -1.0f}, -- {-1.0f, 1.0f}, -- { 1.0f, -1.0f}, -- { 1.0f, 1.0f}, -+ {-1.0f, -1.0f, depth}, -+ {-1.0f, 1.0f, depth}, -+ { 1.0f, -1.0f, depth}, -+ { 1.0f, 1.0f, depth}, - }; - - ID3D11Device *device = context->device; -@@ -1324,6 +1326,11 @@ static void draw_quad_(unsigned int line, struct d3d11_test_context *context) - hr = ID3D11Device_CreateVertexShader(device, default_vs_code, sizeof(default_vs_code), NULL, &context->vs); - ok_(__FILE__, line)(SUCCEEDED(hr), "Failed to create vertex shader, hr %#x.\n", hr); - } -+ else if (context->last_depth != depth) -+ { -+ ID3D11DeviceContext_UpdateSubresource(context->immediate_context, -+ (ID3D11Resource *)context->vb, 0, NULL, quad, 0, 0); -+ } - - ID3D11DeviceContext_IASetInputLayout(context->immediate_context, context->input_layout); - ID3D11DeviceContext_IASetPrimitiveTopology(context->immediate_context, D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP); -@@ -1331,6 +1338,7 @@ static void draw_quad_(unsigned int line, struct d3d11_test_context *context) - offset = 0; - ID3D11DeviceContext_IASetVertexBuffers(context->immediate_context, 0, 1, &context->vb, &stride, &offset); - ID3D11DeviceContext_VSSetShader(context->immediate_context, context->vs, NULL, 0); -+ context->last_depth = depth; - - ID3D11DeviceContext_Draw(context->immediate_context, 4, 0); - } -@@ -1341,8 +1349,9 @@ static void set_quad_color(struct d3d11_test_context *context, const struct vec4 +@@ -1346,8 +1346,9 @@ static void set_quad_color(struct d3d11_test_context *context, const struct vec4 (ID3D11Resource *)context->ps_cb, 0, NULL, color, 0, 0); } --#define draw_color_quad(c, color) draw_color_quad_(__LINE__, c, color) +-#define draw_color_quad(context, color) draw_color_quad_(__LINE__, context, color) -static void draw_color_quad_(unsigned int line, struct d3d11_test_context *context, const struct vec4 *color) -+#define draw_color_quad(c, color) draw_color_quad_(__LINE__, c, color, 0.0f) -+#define draw_color_quad_depth(c, color, depth) draw_color_quad_(__LINE__, c, color, depth) -+static void draw_color_quad_(unsigned int line, struct d3d11_test_context *context, const struct vec4 *color, float depth) ++#define draw_color_quad(context, color) draw_color_quad_(__LINE__, context, color, 0.0) ++#define draw_color_quad_z(context, color, z) draw_color_quad_(__LINE__, context, color, z) ++static void draw_color_quad_(unsigned int line, struct d3d11_test_context *context, const struct vec4 *color, float z) { static const DWORD ps_color_code[] = { -@@ -1384,7 +1393,7 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte +@@ -1389,7 +1390,7 @@ static void draw_color_quad_(unsigned int line, struct d3d11_test_context *conte set_quad_color(context, color); - draw_quad_(line, context); -+ draw_quad_(line, context, depth); ++ draw_quad_z_(line, context, z); } static void test_create_device(void) -@@ -14506,12 +14515,12 @@ static void test_face_culling(void) - 0x00000000, 0x3f800000, 0x00000000, 0x3f800000, 0x00004002, 0x00000000, 0x00000000, 0x3f800000, - 0x3f800000, 0x0100003e, - }; -- static const struct vec2 ccw_quad[] = -+ static const struct vec3 ccw_quad[] = - { -- {-1.0f, 1.0f}, -- {-1.0f, -1.0f}, -- { 1.0f, 1.0f}, -- { 1.0f, -1.0f}, -+ {-1.0f, 1.0f, 0.0f}, -+ {-1.0f, -1.0f, 0.0f}, -+ { 1.0f, 1.0f, 0.0f}, -+ { 1.0f, -1.0f, 0.0f}, - }; - static const struct - { -@@ -15415,12 +15424,12 @@ static void test_stencil_separate(void) - - static const float red[] = {1.0f, 0.0f, 0.0f, 1.0f}; - static const struct vec4 green = {0.0f, 1.0f, 0.0f, 1.0f}; -- static const struct vec2 ccw_quad[] = -+ static const struct vec3 ccw_quad[] = - { -- {-1.0f, -1.0f}, -- { 1.0f, -1.0f}, -- {-1.0f, 1.0f}, -- { 1.0f, 1.0f}, -+ {-1.0f, -1.0f, 0.0f}, -+ { 1.0f, -1.0f, 0.0f}, -+ {-1.0f, 1.0f, 0.0f}, -+ { 1.0f, 1.0f, 0.0f}, - }; - - if (!init_test_context(&test_context, NULL)) -@@ -15507,6 +15516,207 @@ static void test_stencil_separate(void) +@@ -15221,6 +15222,207 @@ static void test_stencil_separate(void) release_test_context(&test_context); } @@ -230,7 +131,7 @@ index 83ae6413f99..7c9c8395315 100644 + /* simple depth tests */ + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 0.0f); ++ draw_color_quad_z(&test_context, &green, 0.0f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -238,7 +139,7 @@ index 83ae6413f99..7c9c8395315 100644 + + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 0.7f); ++ draw_color_quad_z(&test_context, &green, 0.7f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -246,8 +147,8 @@ index 83ae6413f99..7c9c8395315 100644 + + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 0.0f); -+ draw_color_quad_depth(&test_context, &blue, 0.0f); ++ draw_color_quad_z(&test_context, &green, 0.0f); ++ draw_color_quad_z(&test_context, &blue, 0.0f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -256,7 +157,7 @@ index 83ae6413f99..7c9c8395315 100644 + /* clipped */ + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 1.1f); ++ draw_color_quad_z(&test_context, &green, 1.1f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + ok(compare_color(color, red_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -264,7 +165,7 @@ index 83ae6413f99..7c9c8395315 100644 + + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, -0.1f); ++ draw_color_quad_z(&test_context, &green, -0.1f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + ok(compare_color(color, red_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -279,7 +180,7 @@ index 83ae6413f99..7c9c8395315 100644 + + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 1.1f); ++ draw_color_quad_z(&test_context, &green, 1.1f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -287,7 +188,7 @@ index 83ae6413f99..7c9c8395315 100644 + + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, -0.1f); ++ draw_color_quad_z(&test_context, &green, -0.1f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -296,14 +197,14 @@ index 83ae6413f99..7c9c8395315 100644 + /* depth bias */ + ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); + ID3D11DeviceContext_ClearDepthStencilView(context, ds_view, D3D11_CLEAR_DEPTH, 1.0f, 0); -+ draw_color_quad_depth(&test_context, &green, 0.5f); ++ draw_color_quad_z(&test_context, &green, 0.5f); + ID3D11RasterizerState_Release(rs); + rs_desc.DepthClipEnable = TRUE; + rs_desc.DepthBias = -100000; + ID3D11Device_CreateRasterizerState(device, &rs_desc, &rs); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ID3D11DeviceContext_RSSetState(context, rs); -+ draw_color_quad_depth(&test_context, &blue, 0.5f); ++ draw_color_quad_z(&test_context, &blue, 0.5f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine ok(compare_color(color, blue_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -313,7 +214,7 @@ index 83ae6413f99..7c9c8395315 100644 + ID3D11Device_CreateRasterizerState(device, &rs_desc, &rs); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ID3D11DeviceContext_RSSetState(context, rs); -+ draw_color_quad_depth(&test_context, &white, 0.5f); ++ draw_color_quad_z(&test_context, &white, 0.5f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine ok(compare_color(color, white_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -323,7 +224,7 @@ index 83ae6413f99..7c9c8395315 100644 + ID3D11Device_CreateRasterizerState(device, &rs_desc, &rs); + ok(SUCCEEDED(hr), "Failed to create rasterizer state, hr %#x.\n", hr); + ID3D11DeviceContext_RSSetState(context, rs); -+ draw_color_quad_depth(&test_context, &green, 0.5f); ++ draw_color_quad_z(&test_context, &green, 0.5f); + get_texture_readback(test_context.backbuffer, 0, &rb); + color = get_readback_color(&rb, 320, 240); + todo_wine ok(compare_color(color, white_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -339,7 +240,7 @@ index 83ae6413f99..7c9c8395315 100644 static void test_uav_load(void) { struct shader -@@ -21083,6 +21293,7 @@ START_TEST(d3d11) +@@ -21267,6 +21469,7 @@ START_TEST(d3d11) test_shader_input_registers_limits(); test_unbind_shader_resource_view(); test_stencil_separate(); @@ -348,5 +249,5 @@ index 83ae6413f99..7c9c8395315 100644 test_cs_uav_store(); test_ps_cs_uav_binding(); -- -2.13.1 +2.14.1 diff --git a/patches/d3d11-Depth_Bias/0003-d3d11-Implement-depth-bias-and-slope.patch b/patches/d3d11-Depth_Bias/0003-d3d11-Implement-depth-bias-and-slope.patch index 01964a34..defac349 100644 --- a/patches/d3d11-Depth_Bias/0003-d3d11-Implement-depth-bias-and-slope.patch +++ b/patches/d3d11-Depth_Bias/0003-d3d11-Implement-depth-bias-and-slope.patch @@ -57,7 +57,7 @@ index 7c9c8395315..b7b35ef8b85 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -15687,7 +15687,7 @@ static void test_depth_separate(void) - draw_color_quad_depth(&test_context, &blue, 0.5f); + draw_color_quad_z(&test_context, &blue, 0.5f); get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); - todo_wine ok(compare_color(color, blue_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -66,7 +66,7 @@ index 7c9c8395315..b7b35ef8b85 100644 ID3D11RasterizerState_Release(rs); rs_desc.DepthBias = -100005; @@ -15697,7 +15697,7 @@ static void test_depth_separate(void) - draw_color_quad_depth(&test_context, &white, 0.5f); + draw_color_quad_z(&test_context, &white, 0.5f); get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); - todo_wine ok(compare_color(color, white_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -75,7 +75,7 @@ index 7c9c8395315..b7b35ef8b85 100644 ID3D11RasterizerState_Release(rs); rs_desc.DepthBias = -99995; @@ -15707,7 +15707,7 @@ static void test_depth_separate(void) - draw_color_quad_depth(&test_context, &green, 0.5f); + draw_color_quad_z(&test_context, &green, 0.5f); get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); - todo_wine ok(compare_color(color, white_d, 1), "Got unexpected color 0x%08x.\n", color); diff --git a/patches/d3d11-Depth_Bias/0004-d3d11-Add-support-for-SlopeScaledDepthBias-in-RSSetS.patch b/patches/d3d11-Depth_Bias/0004-d3d11-Add-support-for-SlopeScaledDepthBias-in-RSSetS.patch index 31b19842..3514c6f4 100644 --- a/patches/d3d11-Depth_Bias/0004-d3d11-Add-support-for-SlopeScaledDepthBias-in-RSSetS.patch +++ b/patches/d3d11-Depth_Bias/0004-d3d11-Add-support-for-SlopeScaledDepthBias-in-RSSetS.patch @@ -43,7 +43,7 @@ index b7b35ef8b85..f15d4873ab1 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c @@ -15663,7 +15663,7 @@ static void test_depth_separate(void) - draw_color_quad_depth(&test_context, &green, 1.1f); + draw_color_quad_z(&test_context, &green, 1.1f); get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); - todo_wine ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); @@ -52,7 +52,7 @@ index b7b35ef8b85..f15d4873ab1 100644 ID3D11DeviceContext_ClearRenderTargetView(context, test_context.backbuffer_rtv, red); @@ -15671,7 +15671,7 @@ static void test_depth_separate(void) - draw_color_quad_depth(&test_context, &green, -0.1f); + draw_color_quad_z(&test_context, &green, -0.1f); get_texture_readback(test_context.backbuffer, 0, &rb); color = get_readback_color(&rb, 320, 240); - todo_wine ok(compare_color(color, green_d, 1), "Got unexpected color 0x%08x.\n", color); diff --git a/patches/ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch b/patches/ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch index fb4ad591..70f949c6 100644 --- a/patches/ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch +++ b/patches/ntdll-NtQuerySection/0002-kernel32-tests-Add-tests-for-NtQuerySection.patch @@ -1,4 +1,4 @@ -From f4e45bfd295d4d8d8312502d367c648575a36f46 Mon Sep 17 00:00:00 2001 +From 21d673afd6f937a90c4bf4a578f6b3bcf4aa2940 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 16 Oct 2014 23:26:35 +0200 Subject: kernel32/tests: Add tests for NtQuerySection. (try 2) @@ -8,10 +8,10 @@ Subject: kernel32/tests: Add tests for NtQuerySection. (try 2) 1 file changed, 245 insertions(+) diff --git a/dlls/kernel32/tests/virtual.c b/dlls/kernel32/tests/virtual.c -index 9b994645bc5..5191d6ce9b0 100644 +index 46b019c5817..b0c3db0fb76 100644 --- a/dlls/kernel32/tests/virtual.c +++ b/dlls/kernel32/tests/virtual.c -@@ -56,6 +56,23 @@ static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG) +@@ -57,6 +57,23 @@ static NTSTATUS (WINAPI *pNtFreeVirtualMemory)(HANDLE, PVOID *, SIZE_T *, ULONG) /* ############################### */ @@ -35,7 +35,7 @@ index 9b994645bc5..5191d6ce9b0 100644 static HANDLE create_target_process(const char *arg) { char **argv; -@@ -4143,6 +4160,233 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access) +@@ -4204,6 +4221,233 @@ static void test_shared_memory_ro(BOOL is_child, DWORD child_access) CloseHandle(mapping); } @@ -269,10 +269,10 @@ index 9b994645bc5..5191d6ce9b0 100644 START_TEST(virtual) { int argc; -@@ -4206,6 +4450,7 @@ START_TEST(virtual) +@@ -4270,6 +4514,7 @@ START_TEST(virtual) test_shared_memory_ro(FALSE, FILE_MAP_COPY); test_shared_memory_ro(FALSE, FILE_MAP_COPY|FILE_MAP_WRITE); - test_mapping(); + test_mappings(); + test_NtQuerySection(); test_CreateFileMapping_protection(); test_VirtualAlloc_protection(); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 514b6dd5..bc867ad6 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "917e86dd7a4cca1da47262caaded2bef9e022f99" + echo "19d57982ecb4520453a1b77ace386c625312e265" } # Show version information @@ -465,7 +465,6 @@ patch_enable_all () enable_wined3d_WINED3DFMT_R32G32_UINT="$1" enable_wined3d_WINED3D_RS_COLORWRITEENABLE="$1" enable_wined3d_buffer_create="$1" - enable_wined3d_conservative_depth="$1" enable_wined3d_draw_primitive_arrays="$1" enable_wined3d_sample_c_lz="$1" enable_wined3d_wined3d_guess_gl_vendor="$1" @@ -1674,9 +1673,6 @@ patch_enable () wined3d-buffer_create) enable_wined3d_buffer_create="$2" ;; - wined3d-conservative_depth) - enable_wined3d_conservative_depth="$2" - ;; wined3d-draw_primitive_arrays) enable_wined3d_draw_primitive_arrays="$2" ;; @@ -2237,18 +2233,7 @@ if test "$enable_wined3d_Interpolation_Modifiers" -eq 1; then if test "$enable_wined3d_Dual_Source_Blending" -gt 1; then abort "Patchset wined3d-Dual_Source_Blending disabled, but wined3d-Interpolation_Modifiers depends on that." fi - if test "$enable_wined3d_conservative_depth" -gt 1; then - abort "Patchset wined3d-conservative_depth disabled, but wined3d-Interpolation_Modifiers depends on that." - fi enable_wined3d_Dual_Source_Blending=1 - enable_wined3d_conservative_depth=1 -fi - -if test "$enable_wined3d_conservative_depth" -eq 1; then - if test "$enable_wined3d_Copy_Resource_Typeless" -gt 1; then - abort "Patchset wined3d-Copy_Resource_Typeless disabled, but wined3d-conservative_depth depends on that." - fi - enable_wined3d_Copy_Resource_Typeless=1 fi if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then @@ -3859,12 +3844,10 @@ fi # | dlls/wined3d/stateblock.c, dlls/wined3d/utils.c, dlls/wined3d/wined3d_gl.h, include/wine/wined3d.h # | if test "$enable_d3d11_Depth_Bias" -eq 1; then - patch_apply d3d11-Depth_Bias/0001-d3d11-tests-Don-t-use-draw_quad-in-test_cb_relative_.patch patch_apply d3d11-Depth_Bias/0002-d3d11-tests-Add-some-basic-depth-tests.patch patch_apply d3d11-Depth_Bias/0003-d3d11-Implement-depth-bias-and-slope.patch patch_apply d3d11-Depth_Bias/0004-d3d11-Add-support-for-SlopeScaledDepthBias-in-RSSetS.patch ( - printf '%s\n' '+ { "Michael Müller", "d3d11/tests: Don'\''t use draw_quad in test_cb_relative_addressing.", 1 },'; printf '%s\n' '+ { "Michael Müller", "d3d11/tests: Add some basic depth tests.", 1 },'; printf '%s\n' '+ { "Michael Müller", "d3d11: Implement depth bias and slope.", 1 },'; printf '%s\n' '+ { "Michael Müller", "d3d11: Add support for SlopeScaledDepthBias in RSSetState.", 1 },'; @@ -9163,7 +9146,6 @@ fi if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then patch_apply windowscodecs-GIF_Encoder/0001-windowscodecs-Implement-IWICBitmapEncoder-GetEncoder.patch patch_apply windowscodecs-GIF_Encoder/0002-windowscodecs-Implement-IWICBitmapEncoderInfo-GetFil.patch - patch_apply windowscodecs-GIF_Encoder/0003-windowscodecs-Implement-IWICBitmapFrameEncode-SetPal.patch patch_apply windowscodecs-GIF_Encoder/0004-windowscodecs-Implement-IWICBitmapEncoder-GetEncoder.patch patch_apply windowscodecs-GIF_Encoder/0005-windowscodecs-Avoid-crashing-if-no-IPropertyBag2-was.patch patch_apply windowscodecs-GIF_Encoder/0006-windowscodecs-Implement-IWICBitmapEncoder-GetEncoder.patch @@ -9191,7 +9173,6 @@ if test "$enable_windowscodecs_GIF_Encoder" -eq 1; then ( printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in BMP encoder.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoderInfo::GetFileExtensions.", 1 },'; - printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapFrameEncode::SetPalette in JPEG encoder,.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in JPEG encoder.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Avoid crashing if no IPropertyBag2 was passed to IWICBitmapEncoder::CreateNewFrame in JPEG encoder.", 1 },'; printf '%s\n' '+ { "Dmitry Timoshkov", "windowscodecs: Implement IWICBitmapEncoder::GetEncoderInfo in TIFF encoder.", 1 },'; @@ -9858,29 +9839,10 @@ if test "$enable_wined3d_Indexed_Vertex_Blending" -eq 1; then ) >> "$patchlist" fi -# Patchset wined3d-conservative_depth -# | -# | This patchset has the following (direct or indirect) dependencies: -# | * d3d11-Depth_Bias, wined3d-1DTextures, wined3d-Copy_Resource_Typeless -# | -# | Modified files: -# | * dlls/wined3d/arb_program_shader.c, dlls/wined3d/directx.c, dlls/wined3d/glsl_shader.c, dlls/wined3d/shader.c, -# | dlls/wined3d/shader_sm4.c, dlls/wined3d/wined3d_gl.h, dlls/wined3d/wined3d_private.h -# | -if test "$enable_wined3d_conservative_depth" -eq 1; then - patch_apply wined3d-conservative_depth/0001-wined3d-Recognize-conservative-depth-output-register.patch - patch_apply wined3d-conservative_depth/0002-wined3d-Add-conservative-depth-access-information-to.patch - ( - printf '%s\n' '+ { "Michael Müller", "wined3d: Recognize conservative depth output registers in sm4.", 1 },'; - printf '%s\n' '+ { "Michael Müller", "wined3d: Add conservative depth access information to glsl pixel shaders.", 1 },'; - ) >> "$patchlist" -fi - # Patchset wined3d-Interpolation_Modifiers # | # | This patchset has the following (direct or indirect) dependencies: -# | * d3d11-Depth_Bias, wined3d-Core_Context, wined3d-Viewports, wined3d-Dual_Source_Blending, wined3d-1DTextures, wined3d- -# | Copy_Resource_Typeless, wined3d-conservative_depth +# | * d3d11-Depth_Bias, wined3d-Core_Context, wined3d-Viewports, wined3d-Dual_Source_Blending # | # | This patchset fixes the following Wine bugs: # | * [#43239] Implement support for interpolation modifiers in sm4/sm5 pixel shaders diff --git a/patches/windowscodecs-GIF_Encoder/0003-windowscodecs-Implement-IWICBitmapFrameEncode-SetPal.patch b/patches/windowscodecs-GIF_Encoder/0003-windowscodecs-Implement-IWICBitmapFrameEncode-SetPal.patch deleted file mode 100644 index 8cd551db..00000000 --- a/patches/windowscodecs-GIF_Encoder/0003-windowscodecs-Implement-IWICBitmapFrameEncode-SetPal.patch +++ /dev/null @@ -1,62 +0,0 @@ -From 69942a5f16dff9ea123fd9e8819cde00c7fbf3ae Mon Sep 17 00:00:00 2001 -From: Dmitry Timoshkov -Date: Sun, 16 Oct 2016 17:32:48 +0800 -Subject: windowscodecs: Implement IWICBitmapFrameEncode::SetPalette in JPEG - encoder, - ---- - dlls/windowscodecs/jpegformat.c | 23 ++++++++++++++++++++--- - 1 file changed, 20 insertions(+), 3 deletions(-) - -diff --git a/dlls/windowscodecs/jpegformat.c b/dlls/windowscodecs/jpegformat.c -index b7998be..9ec64e7 100644 ---- a/dlls/windowscodecs/jpegformat.c -+++ b/dlls/windowscodecs/jpegformat.c -@@ -861,6 +861,8 @@ typedef struct JpegEncoder { - double xres, yres; - const jpeg_compress_format *format; - IStream *stream; -+ WICColor palette[256]; -+ UINT colors; - CRITICAL_SECTION lock; - BYTE dest_buffer[1024]; - } JpegEncoder; -@@ -1063,10 +1065,24 @@ static HRESULT WINAPI JpegEncoder_Frame_SetColorContexts(IWICBitmapFrameEncode * - } - - static HRESULT WINAPI JpegEncoder_Frame_SetPalette(IWICBitmapFrameEncode *iface, -- IWICPalette *pIPalette) -+ IWICPalette *palette) - { -- FIXME("(%p,%p): stub\n", iface, pIPalette); -- return WINCODEC_ERR_UNSUPPORTEDOPERATION; -+ JpegEncoder *This = impl_from_IWICBitmapFrameEncode(iface); -+ HRESULT hr; -+ -+ TRACE("(%p,%p)\n", iface, palette); -+ -+ if (!palette) return E_INVALIDARG; -+ -+ EnterCriticalSection(&This->lock); -+ -+ if (This->frame_initialized) -+ hr = IWICPalette_GetColors(palette, 256, This->palette, &This->colors); -+ else -+ hr = WINCODEC_ERR_NOTINITIALIZED; -+ -+ LeaveCriticalSection(&This->lock); -+ return hr; - } - - static HRESULT WINAPI JpegEncoder_Frame_SetThumbnail(IWICBitmapFrameEncode *iface, -@@ -1516,6 +1532,7 @@ HRESULT JpegEncoder_CreateInstance(REFIID iid, void** ppv) - This->xres = This->yres = 0.0; - This->format = NULL; - This->stream = NULL; -+ This->colors = 0; - InitializeCriticalSection(&This->lock); - This->lock.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": JpegEncoder.lock"); - --- -2.9.0 - diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index 510108fa..845c3b7b 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -47,7 +47,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c }; struct wined3d_cs_add_dirty_texture_region -@@ -2243,6 +2246,53 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r +@@ -2245,6 +2248,53 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r unsigned int slice_pitch) { struct wined3d_cs_update_sub_resource *op; @@ -101,7 +101,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c op = cs->ops->require_space(cs, sizeof(*op), WINED3D_CS_QUEUE_MAP); op->opcode = WINED3D_CS_OP_UPDATE_SUB_RESOURCE; -@@ -2256,8 +2306,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r +@@ -2258,8 +2308,10 @@ void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_r wined3d_resource_acquire(resource); cs->ops->submit(cs, WINED3D_CS_QUEUE_MAP); @@ -112,7 +112,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c cs->ops->finish(cs, WINED3D_CS_QUEUE_MAP); } -@@ -2559,6 +2611,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2561,6 +2613,13 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_COPY_SUB_RESOURCE */ wined3d_cs_exec_copy_sub_resource, }; @@ -126,7 +126,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (size > (cs->data_size - cs->end)) -@@ -2612,6 +2671,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2614,6 +2673,9 @@ static void wined3d_cs_st_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_st_ops = { @@ -136,7 +136,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c wined3d_cs_st_require_space, wined3d_cs_st_submit, wined3d_cs_st_finish, -@@ -2645,6 +2707,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2647,6 +2709,21 @@ static void wined3d_cs_mt_submit(struct wined3d_cs *cs, enum wined3d_cs_queue_id wined3d_cs_queue_submit(&cs->queue[queue_id], cs); } @@ -158,7 +158,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size_t size, struct wined3d_cs *cs) { size_t queue_size = ARRAY_SIZE(queue->data); -@@ -2706,6 +2783,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size +@@ -2708,6 +2785,16 @@ static void *wined3d_cs_queue_require_space(struct wined3d_cs_queue *queue, size return packet->data; } @@ -175,7 +175,7 @@ diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c static void *wined3d_cs_mt_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) { if (cs->thread_id == GetCurrentThreadId()) -@@ -2725,6 +2812,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id +@@ -2727,6 +2814,9 @@ static void wined3d_cs_mt_finish(struct wined3d_cs *cs, enum wined3d_cs_queue_id static const struct wined3d_cs_ops wined3d_cs_mt_ops = { diff --git a/patches/wined3d-Copy_Resource_Typeless/0003-wined3d-Implement-copying-sub-resources-between-comp.patch b/patches/wined3d-Copy_Resource_Typeless/0003-wined3d-Implement-copying-sub-resources-between-comp.patch index 82e72d79..1954476d 100644 --- a/patches/wined3d-Copy_Resource_Typeless/0003-wined3d-Implement-copying-sub-resources-between-comp.patch +++ b/patches/wined3d-Copy_Resource_Typeless/0003-wined3d-Implement-copying-sub-resources-between-comp.patch @@ -1,4 +1,4 @@ -From 9ee4e66d81e578d6b0366c5713f77d9ec7a0676e Mon Sep 17 00:00:00 2001 +From 04388e5a4fdba61b784a338346f122c97b073ca3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 9 Jul 2017 01:04:33 +0200 Subject: wined3d: Implement copying sub resources between compatible formats. @@ -13,10 +13,10 @@ Subject: wined3d: Implement copying sub resources between compatible formats. 6 files changed, 170 insertions(+), 4 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 0ad5a701e00..50f8696619a 100644 +index 5fa4d3f9def..df22abb3337 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -10094,7 +10094,7 @@ static void test_copy_subresource_region(void) +@@ -10133,7 +10133,7 @@ static void test_copy_subresource_region(void) for (j = 0; j < min(level_src_height, level_dst_height); j++) { c_result = (DWORD*)((char*)map_desc.pData + j * map_desc.RowPitch); @@ -26,7 +26,7 @@ index 0ad5a701e00..50f8696619a 100644 c_result[i], i, j, c_expected[j * level_src_width + i], k); } diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c -index a76598ff4ca..55bab7b464b 100644 +index b3b6588ff9b..3666d9f3f7e 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -71,6 +71,7 @@ enum wined3d_cs_op @@ -37,7 +37,7 @@ index a76598ff4ca..55bab7b464b 100644 WINED3D_CS_OP_STOP, }; -@@ -428,6 +429,17 @@ struct wined3d_cs_copy_uav_counter +@@ -426,6 +427,17 @@ struct wined3d_cs_copy_uav_counter struct wined3d_unordered_access_view *view; }; @@ -55,7 +55,7 @@ index a76598ff4ca..55bab7b464b 100644 struct wined3d_cs_stop { enum wined3d_cs_op opcode; -@@ -2270,6 +2282,148 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff +@@ -2296,6 +2308,148 @@ void wined3d_cs_emit_copy_uav_counter(struct wined3d_cs *cs, struct wined3d_buff cs->ops->submit(cs, WINED3D_CS_QUEUE_DEFAULT); } @@ -204,7 +204,7 @@ index a76598ff4ca..55bab7b464b 100644 static void wined3d_cs_emit_stop(struct wined3d_cs *cs) { struct wined3d_cs_stop *op; -@@ -2328,6 +2482,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void +@@ -2354,6 +2508,7 @@ static void (* const wined3d_cs_op_handlers[])(struct wined3d_cs *cs, const void /* WINED3D_CS_OP_ADD_DIRTY_TEXTURE_REGION */ wined3d_cs_exec_add_dirty_texture_region, /* WINED3D_CS_OP_CLEAR_UNORDERED_ACCESS_VIEW */ wined3d_cs_exec_clear_unordered_access_view, /* WINED3D_CS_OP_COPY_UAV_COUNTER */ wined3d_cs_exec_copy_uav_counter, @@ -213,10 +213,10 @@ index a76598ff4ca..55bab7b464b 100644 static void *wined3d_cs_st_require_space(struct wined3d_cs *cs, size_t size, enum wined3d_cs_queue_id queue_id) diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c -index 0233a7e9865..abab8d2d819 100644 +index 9f7c6e946a5..9cb12422691 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c -@@ -4098,7 +4098,10 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev +@@ -4106,7 +4106,10 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev return WINED3DERR_INVALIDCALL; } @@ -228,7 +228,7 @@ index 0233a7e9865..abab8d2d819 100644 { WARN("Resource formats (%s / %s) don't match.\n", debug_d3dformat(dst_resource->format->id), -@@ -4200,8 +4203,8 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev +@@ -4208,8 +4211,8 @@ HRESULT CDECL wined3d_device_copy_sub_resource_region(struct wined3d_device *dev return WINED3DERR_INVALIDCALL; } @@ -240,18 +240,18 @@ index 0233a7e9865..abab8d2d819 100644 return WINED3D_OK; } diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c -index 3e3a0b42360..843b5efead0 100644 +index 27d2e13353d..49cb4efa86f 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c -@@ -116,6 +116,7 @@ static const struct wined3d_extension_map gl_extension_map[] = - {"GL_ARB_color_buffer_float", ARB_COLOR_BUFFER_FLOAT }, +@@ -117,6 +117,7 @@ static const struct wined3d_extension_map gl_extension_map[] = {"GL_ARB_compute_shader", ARB_COMPUTE_SHADER }, + {"GL_ARB_conservative_depth", ARB_CONSERVATIVE_DEPTH }, {"GL_ARB_copy_buffer", ARB_COPY_BUFFER }, + {"GL_ARB_copy_image", ARB_COPY_IMAGE }, {"GL_ARB_debug_output", ARB_DEBUG_OUTPUT }, {"GL_ARB_depth_buffer_float", ARB_DEPTH_BUFFER_FLOAT }, {"GL_ARB_depth_clamp", ARB_DEPTH_CLAMP }, -@@ -2700,6 +2701,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) +@@ -2703,6 +2704,8 @@ static void load_gl_funcs(struct wined3d_gl_info *gl_info) USE_GL_FUNC(glDispatchComputeIndirect) /* GL_ARB_copy_buffer */ USE_GL_FUNC(glCopyBufferSubData) @@ -260,7 +260,7 @@ index 3e3a0b42360..843b5efead0 100644 /* GL_ARB_debug_output */ USE_GL_FUNC(glDebugMessageCallbackARB) USE_GL_FUNC(glDebugMessageControlARB) -@@ -3884,6 +3887,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, +@@ -3888,6 +3891,7 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter, {ARB_CLEAR_BUFFER_OBJECT, MAKEDWORD_VERSION(4, 3)}, {ARB_COMPUTE_SHADER, MAKEDWORD_VERSION(4, 3)}, @@ -269,22 +269,22 @@ index 3e3a0b42360..843b5efead0 100644 {ARB_ES3_COMPATIBILITY, MAKEDWORD_VERSION(4, 3)}, {ARB_FRAGMENT_LAYER_VIEWPORT, MAKEDWORD_VERSION(4, 3)}, diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h -index 05558760850..a743ad20316 100644 +index 6ab48474817..ef9cfd8e592 100644 --- a/dlls/wined3d/wined3d_gl.h +++ b/dlls/wined3d/wined3d_gl.h -@@ -50,6 +50,7 @@ enum wined3d_gl_extension - ARB_COLOR_BUFFER_FLOAT, +@@ -51,6 +51,7 @@ enum wined3d_gl_extension ARB_COMPUTE_SHADER, + ARB_CONSERVATIVE_DEPTH, ARB_COPY_BUFFER, + ARB_COPY_IMAGE, ARB_DEBUG_OUTPUT, ARB_DEPTH_BUFFER_FLOAT, ARB_DEPTH_CLAMP, diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index b087ba33d3b..4d9c9274e9f 100644 +index 84ca09b9415..547d44e5aa5 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -3492,6 +3492,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou +@@ -3520,6 +3520,9 @@ void wined3d_cs_emit_unload_resource(struct wined3d_cs *cs, struct wined3d_resou void wined3d_cs_emit_update_sub_resource(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, const struct wined3d_box *box, const void *data, unsigned int row_pitch, unsigned int slice_pitch) DECLSPEC_HIDDEN; @@ -295,5 +295,5 @@ index b087ba33d3b..4d9c9274e9f 100644 void (*callback)(void *object), void *object) DECLSPEC_HIDDEN; HRESULT wined3d_cs_map(struct wined3d_cs *cs, struct wined3d_resource *resource, unsigned int sub_resource_idx, -- -2.13.1 +2.14.1 diff --git a/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch b/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch index b1aa297b..523d3562 100644 --- a/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch +++ b/patches/wined3d-Dual_Source_Blending/0002-d3d11-tests-Add-basic-dual-source-blend-test.patch @@ -1,4 +1,4 @@ -From ef0eb02d3a0da38521d8024fd7abb8b4b7660247 Mon Sep 17 00:00:00 2001 +From 2b67b3f5d3ccb805f102bc7d7cd63031dc985810 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 18 Aug 2017 23:22:16 +0200 Subject: d3d11/tests: Add basic dual source blend test. @@ -8,10 +8,10 @@ Subject: d3d11/tests: Add basic dual source blend test. 1 file changed, 169 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index b1bc6620c7f..0fd66957feb 100644 +index 9795a2c68ba..da4e500f94f 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -22101,6 +22101,174 @@ static void test_early_depth_stencil(void) +@@ -21441,6 +21441,174 @@ static void test_conservative_depth_output(void) release_test_context(&test_context); } @@ -186,10 +186,10 @@ index b1bc6620c7f..0fd66957feb 100644 START_TEST(d3d11) { test_create_device(); -@@ -22204,4 +22372,5 @@ START_TEST(d3d11) - test_fractional_viewports(); +@@ -21543,4 +21711,5 @@ START_TEST(d3d11) test_negative_viewports(); test_early_depth_stencil(); + test_conservative_depth_output(); + test_dual_blending(); } -- diff --git a/patches/wined3d-Interpolation_Modifiers/0001-d3d11-tests-Add-test-for-nointerpolation-modifier.patch b/patches/wined3d-Interpolation_Modifiers/0001-d3d11-tests-Add-test-for-nointerpolation-modifier.patch index 98102f95..23d8079f 100644 --- a/patches/wined3d-Interpolation_Modifiers/0001-d3d11-tests-Add-test-for-nointerpolation-modifier.patch +++ b/patches/wined3d-Interpolation_Modifiers/0001-d3d11-tests-Add-test-for-nointerpolation-modifier.patch @@ -1,4 +1,4 @@ -From 77064634e962d24ab755c78c4b0c61cd64efe7ef Mon Sep 17 00:00:00 2001 +From bf007492515532cf1b5d8a468e2363fbaad931fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Fri, 8 Sep 2017 00:06:15 +0200 Subject: d3d11/tests: Add test for nointerpolation modifier. @@ -8,10 +8,10 @@ Subject: d3d11/tests: Add test for nointerpolation modifier. 1 file changed, 195 insertions(+) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index b2516b3928a..1d0fc3960a0 100644 +index bdd542651c0..1fdf26715b0 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -22269,6 +22269,200 @@ static void test_dual_blending(void) +@@ -21609,6 +21609,200 @@ static void test_dual_blending(void) release_test_context(&test_context); } @@ -212,9 +212,9 @@ index b2516b3928a..1d0fc3960a0 100644 START_TEST(d3d11) { test_create_device(); -@@ -22373,4 +22567,5 @@ START_TEST(d3d11) - test_negative_viewports(); +@@ -21712,4 +21906,5 @@ START_TEST(d3d11) test_early_depth_stencil(); + test_conservative_depth_output(); test_dual_blending(); + test_interpolation(); } diff --git a/patches/wined3d-Interpolation_Modifiers/0003-wined3d-Add-support-for-interpolation-modifiers-in-s.patch b/patches/wined3d-Interpolation_Modifiers/0003-wined3d-Add-support-for-interpolation-modifiers-in-s.patch index 710993b9..ae67a361 100644 --- a/patches/wined3d-Interpolation_Modifiers/0003-wined3d-Add-support-for-interpolation-modifiers-in-s.patch +++ b/patches/wined3d-Interpolation_Modifiers/0003-wined3d-Add-support-for-interpolation-modifiers-in-s.patch @@ -1,4 +1,4 @@ -From 99875453e00427ccc918e237857d12cd818b8fdf Mon Sep 17 00:00:00 2001 +From dd625cdc1acbb2a9db07cbda8761903f940e31f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B3zef=20Kucia?= Date: Fri, 8 Sep 2017 01:43:04 +0200 Subject: wined3d: Add support for interpolation modifiers in sm4/sm5 pixel @@ -12,10 +12,10 @@ Subject: wined3d: Add support for interpolation modifiers in sm4/sm5 pixel 4 files changed, 74 insertions(+), 12 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 1d0fc3960a0..692d1bf8796 100644 +index 1fdf26715b0..76ee6642f3b 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -22438,21 +22438,21 @@ static void test_interpolation(void) +@@ -21778,21 +21778,21 @@ static void test_interpolation(void) color = get_texture_color(render_target, 640, 0); ok(compare_color(color, 0xffffffff, 1), "Got unexpected color 0x%08x.\n", color); color = get_texture_color(render_target, 320, 2); @@ -45,10 +45,10 @@ index 1d0fc3960a0..692d1bf8796 100644 ID3D11InputLayout_Release(input_layout); ID3D11RenderTargetView_Release(rtv[1]); diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 2c97ba8ef8d..59bba75b230 100644 +index a74f609e212..417f267fddc 100644 --- a/dlls/wined3d/glsl_shader.c +++ b/dlls/wined3d/glsl_shader.c -@@ -387,7 +387,9 @@ static const char *shader_glsl_get_prefix(enum wined3d_shader_type type) +@@ -386,7 +386,9 @@ static const char *shader_glsl_get_prefix(enum wined3d_shader_type type) static unsigned int shader_glsl_get_version(const struct wined3d_gl_info *gl_info) { @@ -59,7 +59,7 @@ index 2c97ba8ef8d..59bba75b230 100644 return 150; else if (gl_info->glsl_version >= MAKEDWORD_VERSION(1, 30)) return 130; -@@ -1848,8 +1850,51 @@ static const char *shader_glsl_shader_output_name(const struct wined3d_gl_info * +@@ -2123,8 +2125,51 @@ static const char *shader_glsl_shader_output_name(const struct wined3d_gl_info * return shader_glsl_use_interface_blocks(gl_info) ? "shader_out.reg" : "ps_link"; } @@ -112,7 +112,7 @@ index 2c97ba8ef8d..59bba75b230 100644 { if (shader_glsl_use_interface_blocks(gl_info)) { -@@ -1859,7 +1904,7 @@ static void shader_glsl_declare_shader_inputs(const struct wined3d_gl_info *gl_i +@@ -2134,7 +2179,7 @@ static void shader_glsl_declare_shader_inputs(const struct wined3d_gl_info *gl_i shader_addline(buffer, "in shader_in_out {\n"); for (i = 0; i < element_count; ++i) @@ -121,7 +121,7 @@ index 2c97ba8ef8d..59bba75b230 100644 shader_addline(buffer, "} shader_in;\n"); } else -@@ -7162,7 +7207,8 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context +@@ -7384,7 +7429,8 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context unsigned int in_count = min(vec4_varyings(version->major, gl_info), shader->limits->packed_input); if (args->vp_mode == vertexshader && reg_maps->input_registers) @@ -131,7 +131,7 @@ index 2c97ba8ef8d..59bba75b230 100644 shader_addline(buffer, "vec4 %s_in[%u];\n", prefix, in_count); } -@@ -10613,7 +10659,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB +@@ -10818,7 +10864,7 @@ static const SHADER_HANDLER shader_glsl_instruction_handler_table[WINED3DSIH_TAB /* WINED3DSIH_DCL_INPUT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_CONTROL_POINT_COUNT */ shader_glsl_nop, /* WINED3DSIH_DCL_INPUT_PRIMITIVE */ shader_glsl_nop, @@ -141,11 +141,11 @@ index 2c97ba8ef8d..59bba75b230 100644 /* WINED3DSIH_DCL_INPUT_PS_SIV */ NULL, /* WINED3DSIH_DCL_INPUT_SGV */ shader_glsl_nop, diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index ad0002b57d7..24fcdb4209a 100644 +index 06f8b0a5e74..687efbc3513 100644 --- a/dlls/wined3d/shader.c +++ b/dlls/wined3d/shader.c -@@ -1159,6 +1159,20 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st - FIXME("Invalid instruction depth declaration for shader type %#x.\n", shader_version.type); +@@ -1161,6 +1161,20 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st + ins.handler_idx, shader_version.type); } } + else if (ins.handler_idx == WINED3DSIH_DCL_INPUT_PS) @@ -166,10 +166,10 @@ index ad0002b57d7..24fcdb4209a 100644 { if (shader_version.type == WINED3D_SHADER_TYPE_HULL) diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 610b7b04160..dbb0399b12e 100644 +index 2d30d748393..0e0db07ad57 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -553,6 +553,7 @@ enum wined3d_shader_dst_modifier +@@ -550,6 +550,7 @@ enum wined3d_shader_dst_modifier enum wined3d_shader_interpolation_mode { @@ -177,10 +177,10 @@ index 610b7b04160..dbb0399b12e 100644 WINED3DSIM_CONSTANT = 1, WINED3DSIM_LINEAR = 2, WINED3DSIM_LINEAR_CENTROID = 3, -@@ -3991,6 +3992,7 @@ struct wined3d_pixel_shader +@@ -3928,6 +3929,7 @@ struct wined3d_pixel_shader BOOL force_early_depth_stencil; - DWORD depth_compare; + enum wined3d_shader_register_type depth_output; + enum wined3d_shader_interpolation_mode interpolation_mode[MAX_REG_INPUT]; }; diff --git a/patches/wined3d-Interpolation_Modifiers/definition b/patches/wined3d-Interpolation_Modifiers/definition index 8da6b720..717e122b 100644 --- a/patches/wined3d-Interpolation_Modifiers/definition +++ b/patches/wined3d-Interpolation_Modifiers/definition @@ -1,3 +1,2 @@ Fixes: [43239] Implement support for interpolation modifiers in sm4/sm5 pixel shaders Depends: wined3d-Dual_Source_Blending -Depends: wined3d-conservative_depth diff --git a/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch b/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch index c4772869..3aab82b4 100644 --- a/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch +++ b/patches/wined3d-Viewports/0001-wined3d-Allow-arbitrary-viewports-for-d3d11.patch @@ -1,4 +1,4 @@ -From 3ad3617ce54aec7da8800ea0d8bb8cb18fbc4494 Mon Sep 17 00:00:00 2001 +From cea7f4b70408dd2ceb7f571b3b2efac2b58a389f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 17 Aug 2017 19:29:30 +0200 Subject: wined3d: Allow arbitrary viewports for d3d11. @@ -13,10 +13,10 @@ Subject: wined3d: Allow arbitrary viewports for d3d11. 6 files changed, 73 insertions(+), 12 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index b3c7ef47aab..b1bc6620c7f 100644 +index 06708b5f2b4..9795a2c68ba 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -21926,6 +21926,60 @@ static void test_fractional_viewports(void) +@@ -21113,6 +21113,60 @@ static void test_fractional_viewports(void) release_test_context(&test_context); } @@ -77,12 +77,13 @@ index b3c7ef47aab..b1bc6620c7f 100644 static void test_early_depth_stencil(void) { ID3D11DepthStencilState *depth_stencil_state; -@@ -22148,5 +22202,6 @@ START_TEST(d3d11) +@@ -21486,6 +21540,7 @@ START_TEST(d3d11) test_gather(); test_gather_c(); test_fractional_viewports(); + test_negative_viewports(); test_early_depth_stencil(); + test_conservative_depth_output(); } diff --git a/dlls/d3d8/directx.c b/dlls/d3d8/directx.c index 24bd8315983..491efea31e2 100644 @@ -111,10 +112,10 @@ index fe7163fa88a..c1389529588 100644 if (!extended) flags |= WINED3D_VIDMEM_ACCOUNTING; diff --git a/dlls/ddraw/ddraw_private.h b/dlls/ddraw/ddraw_private.h -index c693135e84b..912e8b6f531 100644 +index 0ae45328709..214c1718694 100644 --- a/dlls/ddraw/ddraw_private.h +++ b/dlls/ddraw/ddraw_private.h -@@ -63,7 +63,7 @@ struct FvfToDecl +@@ -62,7 +62,7 @@ struct FvfToDecl #define DDRAW_WINED3D_FLAGS (WINED3D_LEGACY_DEPTH_BIAS | WINED3D_VIDMEM_ACCOUNTING \ | WINED3D_RESTORE_MODE_ON_ACTIVATE | WINED3D_FOCUS_MESSAGES | WINED3D_PIXEL_CENTER_INTEGER \ | WINED3D_LEGACY_UNBOUND_RESOURCE_COLOR | WINED3D_NO_PRIMITIVE_RESTART \ @@ -124,10 +125,10 @@ index c693135e84b..912e8b6f531 100644 enum ddraw_device_state { diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index a5a1a4bf90c..4424da4e850 100644 +index 8b1729de2a3..53be418a623 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c -@@ -4629,11 +4629,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine +@@ -4642,11 +4642,13 @@ static void viewport_miscpart(struct wined3d_context *context, const struct wine if (target) { @@ -146,7 +147,7 @@ index a5a1a4bf90c..4424da4e850 100644 wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); } else if (depth_stencil) -@@ -4675,10 +4677,13 @@ static void viewport_miscpart_cc(struct wined3d_context *context, +@@ -4688,10 +4690,13 @@ static void viewport_miscpart_cc(struct wined3d_context *context, if (target) { @@ -165,10 +166,10 @@ index a5a1a4bf90c..4424da4e850 100644 wined3d_rendertarget_view_get_drawable_size(target, context, &width, &height); } diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 4378ba20fcb..df587733b20 100644 +index f468e307b36..4a6b9ff7f3d 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -1325,6 +1325,7 @@ enum wined3d_shader_byte_code_format +@@ -1310,6 +1310,7 @@ enum wined3d_shader_byte_code_format #define WINED3D_LEGACY_CUBEMAP_FILTERING 0x00001000 #define WINED3D_FORWARD_DEPTH_BIAS 0x00002000 #define WINED3D_REQUEST_D3D10 0x00004000 diff --git a/patches/wined3d-conservative_depth/0001-wined3d-Recognize-conservative-depth-output-register.patch b/patches/wined3d-conservative_depth/0001-wined3d-Recognize-conservative-depth-output-register.patch deleted file mode 100644 index 2abdcfee..00000000 --- a/patches/wined3d-conservative_depth/0001-wined3d-Recognize-conservative-depth-output-register.patch +++ /dev/null @@ -1,105 +0,0 @@ -From 7789f436e67ba0cf5c4be29f06e006ad883ac3f4 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 22 Jul 2017 19:36:13 +0200 -Subject: wined3d: Recognize conservative depth output registers in sm4. - ---- - dlls/wined3d/arb_program_shader.c | 2 ++ - dlls/wined3d/glsl_shader.c | 2 ++ - dlls/wined3d/shader.c | 8 ++++++++ - dlls/wined3d/shader_sm4.c | 4 ++++ - dlls/wined3d/wined3d_private.h | 4 ++++ - 5 files changed, 20 insertions(+) - -diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c -index 612a51b62b1..fa72b4f28b7 100644 ---- a/dlls/wined3d/arb_program_shader.c -+++ b/dlls/wined3d/arb_program_shader.c -@@ -1194,6 +1194,8 @@ static void shader_arb_get_register_name(const struct wined3d_shader_instruction - sprintf(register_name, "%s", rastout_reg_names[reg->idx[0].offset]); - break; - -+ case WINED3DSPR_DEPTHOUT_GREATER_EQUAL: -+ case WINED3DSPR_DEPTHOUT_LESS_EQUAL: - case WINED3DSPR_DEPTHOUT: - strcpy(register_name, "result.depth"); - break; -diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index e9baf40f859..df27c3286e7 100644 ---- a/dlls/wined3d/glsl_shader.c -+++ b/dlls/wined3d/glsl_shader.c -@@ -2911,6 +2911,8 @@ static void shader_glsl_get_register_name(const struct wined3d_shader_register * - sprintf(register_name, "%s", hwrastout_reg_names[reg->idx[0].offset]); - break; - -+ case WINED3DSPR_DEPTHOUT_GREATER_EQUAL: -+ case WINED3DSPR_DEPTHOUT_LESS_EQUAL: - case WINED3DSPR_DEPTHOUT: - sprintf(register_name, "gl_FragDepth"); - break; -diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 8827641e368..8485a0e784a 100644 ---- a/dlls/wined3d/shader.c -+++ b/dlls/wined3d/shader.c -@@ -2108,6 +2108,14 @@ static void shader_dump_register(struct wined3d_string_buffer *buffer, - shader_addline(buffer, "oC"); - break; - -+ case WINED3DSPR_DEPTHOUT_GREATER_EQUAL: -+ shader_addline(buffer, "oDepth_greater_equal"); -+ break; -+ -+ case WINED3DSPR_DEPTHOUT_LESS_EQUAL: -+ shader_addline(buffer, "oDepth_less_equal"); -+ break; -+ - case WINED3DSPR_DEPTHOUT: - shader_addline(buffer, "oDepth"); - break; -diff --git a/dlls/wined3d/shader_sm4.c b/dlls/wined3d/shader_sm4.c -index 123ecbc78a4..88259977832 100644 ---- a/dlls/wined3d/shader_sm4.c -+++ b/dlls/wined3d/shader_sm4.c -@@ -333,6 +333,8 @@ enum wined3d_sm4_register_type - WINED3D_SM5_RT_COVERAGE = 0x23, - WINED3D_SM5_RT_LOCAL_THREAD_INDEX = 0x24, - WINED3D_SM5_RT_GS_INSTANCE_ID = 0x25, -+ WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL = 0x26, -+ WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL = 0x27, - }; - - enum wined3d_sm4_output_primitive_type -@@ -1148,6 +1150,8 @@ static const enum wined3d_shader_register_type register_type_table[] = - /* WINED3D_SM5_RT_COVERAGE */ WINED3DSPR_COVERAGE, - /* WINED3D_SM5_RT_LOCAL_THREAD_INDEX */ WINED3DSPR_LOCALTHREADINDEX, - /* WINED3D_SM5_RT_GS_INSTANCE_ID */ WINED3DSPR_GSINSTID, -+ /* WINED3D_SM5_RT_DEPTHOUT_GREATER_EQUAL */ WINED3DSPR_DEPTHOUT_GREATER_EQUAL, -+ /* WINED3D_SM5_RT_DEPTHOUT_LESS_EQUAL*/ WINED3DSPR_DEPTHOUT_LESS_EQUAL, - }; - - static const struct wined3d_sm4_opcode_info *get_opcode_info(enum wined3d_sm4_opcode opcode) -diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index eea73fa2965..040b068ad0e 100644 ---- a/dlls/wined3d/wined3d_private.h -+++ b/dlls/wined3d/wined3d_private.h -@@ -490,6 +490,8 @@ enum wined3d_shader_register_type - WINED3DSPR_COVERAGE, - WINED3DSPR_SAMPLEMASK, - WINED3DSPR_GSINSTID, -+ WINED3DSPR_DEPTHOUT_GREATER_EQUAL, -+ WINED3DSPR_DEPTHOUT_LESS_EQUAL, - }; - - enum wined3d_data_type -@@ -3987,6 +3989,8 @@ static inline BOOL shader_is_scalar(const struct wined3d_shader_register *reg) - return FALSE; - - case WINED3DSPR_DEPTHOUT: /* oDepth */ -+ case WINED3DSPR_DEPTHOUT_GREATER_EQUAL: -+ case WINED3DSPR_DEPTHOUT_LESS_EQUAL: - case WINED3DSPR_CONSTBOOL: /* b# */ - case WINED3DSPR_LOOP: /* aL */ - case WINED3DSPR_PREDICATE: /* p0 */ --- -2.13.1 - diff --git a/patches/wined3d-conservative_depth/0002-wined3d-Add-conservative-depth-access-information-to.patch b/patches/wined3d-conservative_depth/0002-wined3d-Add-conservative-depth-access-information-to.patch deleted file mode 100644 index 7990790b..00000000 --- a/patches/wined3d-conservative_depth/0002-wined3d-Add-conservative-depth-access-information-to.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 8e70f4d3c05ec6f4b31ab4e0785ea1bd9d071cd6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Michael=20M=C3=BCller?= -Date: Sat, 22 Jul 2017 19:39:40 +0200 -Subject: wined3d: Add conservative depth access information to glsl pixel - shaders. - ---- - dlls/wined3d/directx.c | 1 + - dlls/wined3d/glsl_shader.c | 10 ++++++++++ - dlls/wined3d/shader.c | 11 +++++++++++ - dlls/wined3d/wined3d_gl.h | 1 + - dlls/wined3d/wined3d_private.h | 1 + - 5 files changed, 24 insertions(+) - -diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c -index 86b7c6289bf..d508a965642 100644 ---- a/dlls/wined3d/directx.c -+++ b/dlls/wined3d/directx.c -@@ -116,6 +116,7 @@ static const struct wined3d_extension_map gl_extension_map[] = - {"GL_ARB_clip_control", ARB_CLIP_CONTROL }, - {"GL_ARB_color_buffer_float", ARB_COLOR_BUFFER_FLOAT }, - {"GL_ARB_compute_shader", ARB_COMPUTE_SHADER }, -+ {"GL_ARB_conservative_depth", ARB_CONSERVATIVE_DEPTH }, - {"GL_ARB_copy_buffer", ARB_COPY_BUFFER }, - {"GL_ARB_copy_image", ARB_COPY_IMAGE }, - {"GL_ARB_debug_output", ARB_DEBUG_OUTPUT }, -diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c -index 1fe6f86bd35..5b0cc5964fd 100644 ---- a/dlls/wined3d/glsl_shader.c -+++ b/dlls/wined3d/glsl_shader.c -@@ -7265,10 +7265,20 @@ static GLuint shader_glsl_generate_pshader(const struct wined3d_context *context - * nvidia drivers write a warning if we don't do so. */ - if (gl_info->supported[ARB_TEXTURE_RECTANGLE]) - shader_addline(buffer, "#extension GL_ARB_texture_rectangle : enable\n"); -+ if (gl_info->supported[ARB_CONSERVATIVE_DEPTH] && shader->u.ps.depth_compare) -+ shader_addline(buffer, "#extension GL_ARB_conservative_depth : enable\n"); - - /* Base Declarations */ - shader_generate_glsl_declarations(context, buffer, shader, reg_maps, &priv_ctx); - -+ if (gl_info->supported[ARB_CONSERVATIVE_DEPTH]) -+ { -+ if (shader->u.ps.depth_compare == WINED3DSPR_DEPTHOUT_GREATER_EQUAL) -+ shader_addline(buffer, "layout (depth_greater) out float gl_FragDepth;\n"); -+ else if (shader->u.ps.depth_compare == WINED3DSPR_DEPTHOUT_LESS_EQUAL) -+ shader_addline(buffer, "layout (depth_less) out float gl_FragDepth;\n"); -+ } -+ - /* Declare uniforms for NP2 texcoord fixup: - * This is NOT done inside the loop that declares the texture samplers - * since the NP2 fixup code is currently only used for the GeforceFX -diff --git a/dlls/wined3d/shader.c b/dlls/wined3d/shader.c -index 014b0a69244..a27b1566193 100644 ---- a/dlls/wined3d/shader.c -+++ b/dlls/wined3d/shader.c -@@ -1148,6 +1148,17 @@ static HRESULT shader_get_registers_used(struct wined3d_shader *shader, const st - FIXME("Invalid instruction %#x for shader type %#x.\n", - ins.handler_idx, shader_version.type); - } -+ else if (ins.handler_idx == WINED3DSIH_DCL_OUTPUT) -+ { -+ if (ins.declaration.dst.reg.type == WINED3DSPR_DEPTHOUT_GREATER_EQUAL || -+ ins.declaration.dst.reg.type == WINED3DSPR_DEPTHOUT_LESS_EQUAL) -+ { -+ if (shader_version.type == WINED3D_SHADER_TYPE_PIXEL) -+ shader->u.ps.depth_compare = ins.declaration.dst.reg.type; -+ else -+ FIXME("Invalid instruction depth declaration for shader type %#x.\n", shader_version.type); -+ } -+ } - else if (ins.handler_idx == WINED3DSIH_DCL_OUTPUT_CONTROL_POINT_COUNT) - { - if (shader_version.type == WINED3D_SHADER_TYPE_HULL) -diff --git a/dlls/wined3d/wined3d_gl.h b/dlls/wined3d/wined3d_gl.h -index cf0947b9c33..4f73478a3b4 100644 ---- a/dlls/wined3d/wined3d_gl.h -+++ b/dlls/wined3d/wined3d_gl.h -@@ -50,6 +50,7 @@ enum wined3d_gl_extension - ARB_CLIP_CONTROL, - ARB_COLOR_BUFFER_FLOAT, - ARB_COMPUTE_SHADER, -+ ARB_CONSERVATIVE_DEPTH, - ARB_COPY_BUFFER, - ARB_COPY_IMAGE, - ARB_DEBUG_OUTPUT, -diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h -index 3377d401985..01bce7fcba3 100644 ---- a/dlls/wined3d/wined3d_private.h -+++ b/dlls/wined3d/wined3d_private.h -@@ -3938,6 +3938,7 @@ struct wined3d_pixel_shader - DWORD color0_reg; - - BOOL force_early_depth_stencil; -+ DWORD depth_compare; - }; - - struct wined3d_compute_shader --- -2.13.1 - diff --git a/patches/wined3d-conservative_depth/definition b/patches/wined3d-conservative_depth/definition deleted file mode 100644 index 0ad2da8a..00000000 --- a/patches/wined3d-conservative_depth/definition +++ /dev/null @@ -1,2 +0,0 @@ -Fixes: Implement support for conservative depth access in SM4 shaders -Depends: wined3d-Copy_Resource_Typeless