From 857e9c1cd4111d177def0d222bc6b6faeedbff52 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Fri, 26 May 2017 04:26:33 +0200 Subject: [PATCH] Rebase against 799230c78ab102fa0034cb4477ce1be78c456a87. --- ...are-test_texture-for-non-2d-textures.patch | 38 +++++----- ...3dx9_36-tests-Fix-some-test-failures.patch | 14 ++-- patches/patchinstall.sh | 7 +- .../wined3d-CSMT_Main/9999-IfDefined.patch | 36 +++++----- ...s-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch | 69 +++++-------------- ...support-for-D3D11_QUERY_PIPELINE_STA.patch | 26 +++---- ...noisy-fixme-Unrecognized-stencil-op-.patch | 29 -------- 7 files changed, 79 insertions(+), 140 deletions(-) delete mode 100644 patches/wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch diff --git a/patches/d3d11-ID3D11Texture1D/0019-d3d11-tests-Prepare-test_texture-for-non-2d-textures.patch b/patches/d3d11-ID3D11Texture1D/0019-d3d11-tests-Prepare-test_texture-for-non-2d-textures.patch index 09f63c33..a88c0297 100644 --- a/patches/d3d11-ID3D11Texture1D/0019-d3d11-tests-Prepare-test_texture-for-non-2d-textures.patch +++ b/patches/d3d11-ID3D11Texture1D/0019-d3d11-tests-Prepare-test_texture-for-non-2d-textures.patch @@ -1,17 +1,17 @@ -From a30b83149208635d5e114f553c98ea8af569cbeb Mon Sep 17 00:00:00 2001 +From 40d6f33a858061a8449c6b90a795efe926a119bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 25 Aug 2016 20:06:28 +0200 Subject: d3d11/tests: Prepare test_texture for non 2d textures. --- - dlls/d3d11/tests/d3d11.c | 137 +++++++++++++++++++++++++++++------------------ - 1 file changed, 85 insertions(+), 52 deletions(-) + dlls/d3d11/tests/d3d11.c | 140 +++++++++++++++++++++++++++++------------------ + 1 file changed, 87 insertions(+), 53 deletions(-) diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 21c5627b862..1a3adee346f 100644 +index 6013ae94323..d5d41721bce 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -5955,6 +5955,7 @@ static void test_texture(void) +@@ -6213,6 +6213,7 @@ static void test_texture(void) }; struct texture { @@ -19,7 +19,7 @@ index 21c5627b862..1a3adee346f 100644 UINT width; UINT height; UINT miplevel_count; -@@ -5966,7 +5967,7 @@ static void test_texture(void) +@@ -6224,7 +6225,7 @@ static void test_texture(void) D3D11_SHADER_RESOURCE_VIEW_DESC srv_desc; struct d3d11_test_context test_context; const struct texture *current_texture; @@ -28,7 +28,7 @@ index 21c5627b862..1a3adee346f 100644 D3D11_SAMPLER_DESC sampler_desc; const struct shader *current_ps; D3D_FEATURE_LEVEL feature_level; -@@ -5974,7 +5975,7 @@ static void test_texture(void) +@@ -6232,7 +6233,7 @@ static void test_texture(void) ID3D11DeviceContext *context; ID3D11SamplerState *sampler; struct resource_readback rb; @@ -37,7 +37,7 @@ index 21c5627b862..1a3adee346f 100644 struct vec4 ps_constant; ID3D11PixelShader *ps; ID3D11Device *device; -@@ -6328,6 +6329,7 @@ static void test_texture(void) +@@ -6593,6 +6594,7 @@ static void test_texture(void) }; static const struct texture rgba_texture = { @@ -45,7 +45,7 @@ index 21c5627b862..1a3adee346f 100644 4, 4, 3, 1, DXGI_FORMAT_R8G8B8A8_UNORM, { {rgba_level_0, 4 * sizeof(*rgba_level_0), 0}, -@@ -6335,33 +6337,51 @@ static void test_texture(void) +@@ -6600,33 +6602,51 @@ static void test_texture(void) {rgba_level_2, sizeof(*rgba_level_2), 0}, } }; @@ -120,7 +120,7 @@ index 21c5627b862..1a3adee346f 100644 4, 4, 1, 3, DXGI_FORMAT_R8G8B8A8_UNORM, { {red_data, 6 * sizeof(*red_data)}, -@@ -6369,9 +6389,11 @@ static void test_texture(void) +@@ -6634,11 +6654,14 @@ static void test_texture(void) {blue_data, 5 * sizeof(*blue_data)}, } }; @@ -132,9 +132,13 @@ index 21c5627b862..1a3adee346f 100644 + static const struct texture r32u_typeless = {D3D11_RESOURCE_DIMENSION_TEXTURE2D, + 4, 4, 1, 1, DXGI_FORMAT_R32_TYPELESS, {{r32_uint, 4 * sizeof(*r32_uint)}}}; +- static const struct texture r9g9b9e5_texture = {4, 4, 1, 1, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, ++ static const struct texture r9g9b9e5_texture = {D3D11_RESOURCE_DIMENSION_TEXTURE2D, ++ 4, 4, 1, 1, DXGI_FORMAT_R9G9B9E5_SHAREDEXP, + {{r9g9b9e5_data, 4 * sizeof(*r9g9b9e5_data)}}}; static const DWORD red_colors[] = { -@@ -6660,12 +6682,12 @@ static void test_texture(void) +@@ -6936,12 +6959,12 @@ static void test_texture(void) ID3D11DeviceContext_PSSetConstantBuffers(context, 0, 1, &cb); @@ -153,7 +157,7 @@ index 21c5627b862..1a3adee346f 100644 sampler_desc.Filter = D3D11_FILTER_MIN_MAG_MIP_POINT; sampler_desc.AddressU = D3D11_TEXTURE_ADDRESS_CLAMP; -@@ -6723,7 +6745,7 @@ static void test_texture(void) +@@ -6999,7 +7022,7 @@ static void test_texture(void) if (current_texture != test->texture) { if (texture) @@ -162,7 +166,7 @@ index 21c5627b862..1a3adee346f 100644 if (srv) ID3D11ShaderResourceView_Release(srv); -@@ -6731,16 +6753,23 @@ static void test_texture(void) +@@ -7007,16 +7030,23 @@ static void test_texture(void) if (current_texture) { @@ -194,7 +198,7 @@ index 21c5627b862..1a3adee346f 100644 ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); } else -@@ -6794,7 +6823,7 @@ static void test_texture(void) +@@ -7070,7 +7100,7 @@ static void test_texture(void) ID3D11ShaderResourceView_Release(srv); ID3D11SamplerState_Release(sampler); if (texture) @@ -203,7 +207,7 @@ index 21c5627b862..1a3adee346f 100644 ID3D11PixelShader_Release(ps); if (is_warp_device(device) && feature_level < D3D_FEATURE_LEVEL_10_1) -@@ -6839,26 +6868,30 @@ static void test_texture(void) +@@ -7115,26 +7145,30 @@ static void test_texture(void) if (current_texture != test->texture) { @@ -242,7 +246,7 @@ index 21c5627b862..1a3adee346f 100644 ok(SUCCEEDED(hr), "Test %u: Failed to create shader resource view, hr %#x.\n", i, hr); ID3D11DeviceContext_PSSetShaderResources(context, 0, 1, &srv); -@@ -6883,7 +6916,7 @@ static void test_texture(void) +@@ -7159,7 +7193,7 @@ static void test_texture(void) release_resource_readback(&rb); } ID3D11PixelShader_Release(ps); @@ -252,5 +256,5 @@ index 21c5627b862..1a3adee346f 100644 ID3D11SamplerState_Release(sampler); -- -2.11.0 +2.12.2 diff --git a/patches/d3dx9_36-Tests/0001-d3dx9_36-tests-Fix-some-test-failures.patch b/patches/d3dx9_36-Tests/0001-d3dx9_36-tests-Fix-some-test-failures.patch index bb12a64d..14d914fa 100644 --- a/patches/d3dx9_36-Tests/0001-d3dx9_36-tests-Fix-some-test-failures.patch +++ b/patches/d3dx9_36-Tests/0001-d3dx9_36-tests-Fix-some-test-failures.patch @@ -1,4 +1,4 @@ -From 53da53661a5058d691c15d85328148f37b753769 Mon Sep 17 00:00:00 2001 +From 69c020763f71d57ada7d5670883b36add6444039 Mon Sep 17 00:00:00 2001 From: Sebastian Lackner Date: Sat, 6 May 2017 01:32:51 +0200 Subject: d3dx9_36/tests: Fix some test failures. @@ -8,10 +8,10 @@ Subject: d3dx9_36/tests: Fix some test failures. 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dlls/d3dx9_36/tests/math.c b/dlls/d3dx9_36/tests/math.c -index 5bbfb4980b..5fe65ac484 100644 +index 3843abea9be..d21a229bbbe 100644 --- a/dlls/d3dx9_36/tests/math.c +++ b/dlls/d3dx9_36/tests/math.c -@@ -236,7 +236,7 @@ static void D3DXColorTest(void) +@@ -232,7 +232,7 @@ static void D3DXColorTest(void) /*_______________D3DXColorLerp________________*/ expected.r = 0.32f; expected.g = 0.69f; expected.b = 0.356f; expected.a = 0.897f; D3DXColorLerp(&got,&color,&color1,scale); @@ -20,7 +20,7 @@ index 5bbfb4980b..5fe65ac484 100644 /* Test the NULL case */ funcpointer = D3DXColorLerp(&got,NULL,&color1,scale); ok(funcpointer == NULL, "Expected: %p, Got: %p\n", NULL, funcpointer); -@@ -306,7 +306,7 @@ static void D3DXFresnelTest(void) +@@ -302,7 +302,7 @@ static void D3DXFresnelTest(void) BOOL equal; fresnel = D3DXFresnelTerm(0.5f, 1.5f); @@ -29,7 +29,7 @@ index 5bbfb4980b..5fe65ac484 100644 ok(equal, "Got unexpected Fresnel term %.8e.\n", fresnel); } -@@ -2955,7 +2955,7 @@ static void test_D3DXSHEvalDirectionalLight(void) +@@ -2947,7 +2947,7 @@ static void test_D3DXSHEvalDirectionalLight(void) expected = j + test[l].boffset; else expected = test[l].blue_out[startindex + j]; @@ -38,9 +38,9 @@ index 5bbfb4980b..5fe65ac484 100644 ok(equal, "Blue: case %u, order %u: expected[%u] = %.8e, received %.8e.\n", l, order, j, expected, blue_out[j]); } -@@ -3287,7 +3287,7 @@ static void test_D3DXSHMultiply3(void) +@@ -3292,7 +3292,7 @@ static void test_D3DXSHMultiply3(void) D3DXSHMultiply3(c, c, b); - for (i = 0; i < 20; i++) + for (i = 0; i < ARRAY_SIZE(expected_aliased); ++i) { - equal = compare_float(c[i], expected_aliased[i], 32); + equal = compare_float(c[i], expected_aliased[i], 64); diff --git a/patches/patchinstall.sh b/patches/patchinstall.sh index 4e5af45f..90876b09 100755 --- a/patches/patchinstall.sh +++ b/patches/patchinstall.sh @@ -52,7 +52,7 @@ usage() # Get the upstream commit sha upstream_commit() { - echo "8967e87c8a890aed7a81051c2d372f065e825bb2" + echo "799230c78ab102fa0034cb4477ce1be78c456a87" } # Show version information @@ -8729,8 +8729,7 @@ fi # | * [#20776] Add stubs for QUERY_TYPE_SO_STATISTICS and QUERY_TYPE_SO_OVERFLOW # | # | Modified files: -# | * dlls/d3d10core/tests/device.c, dlls/d3d11/tests/d3d11.c, dlls/d3d9/device.c, dlls/wined3d/query.c, -# | include/wine/wined3d.h +# | * dlls/d3d10core/tests/device.c, dlls/d3d11/tests/d3d11.c, dlls/wined3d/query.c, include/wine/wined3d.h # | if test "$enable_wined3d_QUERY_Stubs" -eq 1; then patch_apply wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch @@ -8767,14 +8766,12 @@ if test "$enable_wined3d_Silence_FIXMEs" -eq 1; then 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/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch ( 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: Silence noisy fixme Unrecognized stencil op 0.", 1 },'; ) >> "$patchlist" fi diff --git a/patches/wined3d-CSMT_Main/9999-IfDefined.patch b/patches/wined3d-CSMT_Main/9999-IfDefined.patch index c5037122..81c1bc7d 100644 --- a/patches/wined3d-CSMT_Main/9999-IfDefined.patch +++ b/patches/wined3d-CSMT_Main/9999-IfDefined.patch @@ -332,7 +332,7 @@ diff --git a/dlls/wined3d/swapchain.c b/dlls/wined3d/swapchain.c diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c --- a/dlls/wined3d/texture.c +++ b/dlls/wined3d/texture.c -@@ -292,7 +292,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su +@@ -294,7 +294,11 @@ void wined3d_texture_get_memory(struct wined3d_texture *texture, unsigned int su if (locations & WINED3D_LOCATION_BUFFER) { data->addr = NULL; @@ -344,7 +344,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return; } if (locations & WINED3D_LOCATION_USER_MEMORY) -@@ -393,6 +397,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc +@@ -395,6 +399,7 @@ static HRESULT wined3d_texture_init(struct wined3d_texture *texture, const struc /* Context activation is done by the caller. */ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture, @@ -352,7 +352,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c unsigned int sub_resource_idx, const struct wined3d_gl_info *gl_info) { GLuint *buffer_object = &texture->sub_resources[sub_resource_idx].buffer_object; -@@ -405,6 +410,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture +@@ -407,6 +412,19 @@ static void wined3d_texture_remove_buffer_object(struct wined3d_texture *texture wined3d_texture_invalidate_location(texture, sub_resource_idx, WINED3D_LOCATION_BUFFER); *buffer_object = 0; @@ -372,7 +372,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) -@@ -424,7 +442,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) +@@ -426,7 +444,11 @@ static void wined3d_texture_update_map_binding(struct wined3d_texture *texture) && !wined3d_texture_load_location(texture, i, context, map_binding)) ERR("Failed to load location %s.\n", wined3d_debug_location(map_binding)); if (texture->resource.map_binding == WINED3D_LOCATION_BUFFER) @@ -384,7 +384,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } if (context) -@@ -581,28 +603,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture) +@@ -583,28 +605,46 @@ static void wined3d_texture_cleanup(struct wined3d_texture *texture) unsigned int sub_count = texture->level_count * texture->layer_count; struct wined3d_device *device = texture->resource.device; struct wined3d_context *context = NULL; @@ -431,7 +431,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } if (context) context_release(context); -@@ -1409,11 +1449,16 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT +@@ -1411,11 +1451,16 @@ HRESULT CDECL wined3d_texture_update_desc(struct wined3d_texture *texture, UINT /* Context activation is done by the caller. */ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *texture, @@ -448,7 +448,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (sub_resource->buffer_object) return; -@@ -1425,6 +1470,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur +@@ -1427,6 +1472,16 @@ static void wined3d_texture_prepare_buffer_object(struct wined3d_texture *textur TRACE("Created buffer object %u for texture %p, sub-resource %u.\n", sub_resource->buffer_object, texture, sub_resource_idx); @@ -465,7 +465,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c } static void wined3d_texture_force_reload(struct wined3d_texture *texture) -@@ -1550,7 +1605,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned +@@ -1552,7 +1607,11 @@ BOOL wined3d_texture_prepare_location(struct wined3d_texture *texture, unsigned return TRUE; case WINED3D_LOCATION_BUFFER: @@ -477,7 +477,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c return TRUE; case WINED3D_LOCATION_TEXTURE_RGB: -@@ -1851,7 +1910,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1853,7 +1912,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { @@ -489,7 +489,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); texture1d_upload_data(texture, sub_resource_idx, context, NULL, &data, row_pitch, slice_pitch); -@@ -1896,7 +1959,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in +@@ -1898,7 +1961,11 @@ static BOOL texture1d_load_location(struct wined3d_texture *texture, unsigned in case WINED3D_LOCATION_BUFFER: if (sub_resource->locations & (WINED3D_LOCATION_TEXTURE_RGB | WINED3D_LOCATION_TEXTURE_SRGB)) { @@ -501,7 +501,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); -@@ -2190,8 +2257,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) +@@ -2192,8 +2259,13 @@ static void wined3d_texture_unload(struct wined3d_resource *resource) wined3d_texture_invalidate_location(texture, i, ~WINED3D_LOCATION_DISCARDED); } @@ -515,7 +515,7 @@ diff --git a/dlls/wined3d/texture.c b/dlls/wined3d/texture.c if (resource->type == WINED3D_RTYPE_TEXTURE_2D) { -@@ -2967,7 +3039,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -2969,7 +3041,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in } else if (sub_resource->locations & WINED3D_LOCATION_BUFFER) { @@ -527,7 +527,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); -@@ -3013,7 +3089,11 @@ static BOOL texture3d_load_location(struct wined3d_texture *texture, unsigned in +@@ -3015,7 +3091,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)) { @@ -539,7 +539,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); -@@ -3231,8 +3311,19 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned +@@ -3233,8 +3313,19 @@ HRESULT CDECL wined3d_texture_blt(struct wined3d_texture *dst_texture, unsigned if (dst_texture->sub_resources[dst_sub_resource_idx].map_count || src_texture->sub_resources[src_sub_resource_idx].map_count) { @@ -622,7 +622,7 @@ diff --git a/dlls/wined3d/wined3d_main.c b/dlls/wined3d/wined3d_main.c diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h -@@ -2695,6 +2695,16 @@ struct wined3d_state +@@ -2727,6 +2727,16 @@ struct wined3d_state struct wined3d_rasterizer_state *rasterizer_state; }; @@ -639,7 +639,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 -@@ -2806,6 +2816,12 @@ LRESULT device_process_message(struct wined3d_device *device, HWND window, BOOL +@@ -2838,6 +2848,12 @@ 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; @@ -652,7 +652,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) { -@@ -2992,7 +3008,11 @@ struct wined3d_texture +@@ -3025,7 +3041,11 @@ struct wined3d_texture unsigned int map_count; DWORD locations; @@ -664,7 +664,7 @@ diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h } sub_resources[1]; }; -@@ -3307,6 +3327,9 @@ struct wined3d_cs_queue +@@ -3340,6 +3360,9 @@ struct wined3d_cs_queue struct wined3d_cs_ops { diff --git a/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch b/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch index 19e2d954..d68c39d2 100644 --- a/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch +++ b/patches/wined3d-QUERY_Stubs/0001-wined3d-Add-stubs-for-QUERY_TYPE_SO_STATISTICS-and-Q.patch @@ -1,4 +1,4 @@ -From 9083e580904536e28ba4cfb3adb65bd24a94ed9d Mon Sep 17 00:00:00 2001 +From 3354f6b38cd1b3a18a4c81ec430d0557f3503290 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sat, 16 Apr 2016 18:18:54 +0200 Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and @@ -7,16 +7,14 @@ Subject: wined3d: Add stubs for QUERY_TYPE_SO_STATISTICS and --- dlls/d3d10core/tests/device.c | 4 +- dlls/d3d11/tests/d3d11.c | 4 +- - dlls/d3d9/device.c | 3 ++ dlls/wined3d/query.c | 96 +++++++++++++++++++++++++++++++++++++++++++ - include/wine/wined3d.h | 6 +++ - 5 files changed, 109 insertions(+), 4 deletions(-) + 3 files changed, 100 insertions(+), 4 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c -index 6abc79a7a44..a68baa6d0ff 100644 +index 364a2abfe7f..c08004723cc 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c -@@ -3808,8 +3808,8 @@ static void test_create_query(void) +@@ -3826,8 +3826,8 @@ static void test_create_query(void) {D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE}, {D3D10_QUERY_PIPELINE_STATISTICS, FALSE, TRUE}, {D3D10_QUERY_OCCLUSION_PREDICATE, TRUE, FALSE}, @@ -28,10 +26,10 @@ index 6abc79a7a44..a68baa6d0ff 100644 ULONG refcount, expected_refcount; diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index 91d5927acb1..d409c8beeaa 100644 +index 431db44e1cc..18d2a2fd4d1 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -4583,8 +4583,8 @@ static void test_create_query(void) +@@ -4600,8 +4600,8 @@ static void test_create_query(void) {D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_PIPELINE_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, TRUE}, {D3D11_QUERY_OCCLUSION_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, @@ -39,30 +37,16 @@ index 91d5927acb1..d409c8beeaa 100644 - {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, TRUE}, + {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, + {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, - {D3D11_QUERY_SO_STATISTICS_STREAM0, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE}, + {D3D11_QUERY_SO_STATISTICS_STREAM0, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_SO_OVERFLOW_PREDICATE_STREAM0, D3D_FEATURE_LEVEL_11_0, TRUE, FALSE, TRUE}, - {D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, TRUE}, -diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c -index b4cb25316c7..74273926ae6 100644 ---- a/dlls/d3d9/device.c -+++ b/dlls/d3d9/device.c -@@ -3445,6 +3445,9 @@ static HRESULT WINAPI d3d9_device_CreateQuery(IDirect3DDevice9Ex *iface, D3DQUER - - TRACE("iface %p, type %#x, query %p.\n", iface, type, query); - -+ if (type < D3DQUERYTYPE_VCACHE || type > D3DQUERYTYPE_MEMORYPRESSURE) -+ return D3DERR_NOTAVAILABLE; -+ - object = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*object)); - if (!object) - return E_OUTOFMEMORY; + {D3D11_QUERY_SO_STATISTICS_STREAM1, D3D_FEATURE_LEVEL_11_0, FALSE, FALSE, FALSE}, diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c -index 3cfbd8431ac..2bca60e7d4c 100644 +index 28db6be239b..53745f959e6 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c -@@ -294,6 +294,14 @@ static void wined3d_query_destroy_object(void *object) - { - HeapFree(GetProcessHeap(), 0, query); +@@ -309,6 +309,14 @@ static void wined3d_query_destroy_object(void *object) + context_free_so_statistics_query(pq); + HeapFree(GetProcessHeap(), 0, pq); } + else if (query->type == WINED3D_QUERY_TYPE_SO_STATISTICS) + { @@ -75,8 +59,8 @@ index 3cfbd8431ac..2bca60e7d4c 100644 else { ERR("Query %p has invalid type %#x.\n", query, query->type); -@@ -637,6 +645,34 @@ static BOOL wined3d_timestamp_disjoint_query_ops_issue(struct wined3d_query *que - return FALSE; +@@ -773,6 +781,34 @@ static BOOL wined3d_so_statistics_query_ops_issue(struct wined3d_query *query, D + return poll; } +static BOOL wined3d_statistics_query_ops_poll(struct wined3d_query *query, DWORD flags) @@ -110,7 +94,7 @@ index 3cfbd8431ac..2bca60e7d4c 100644 static const struct wined3d_query_ops event_query_ops = { wined3d_event_query_ops_poll, -@@ -785,6 +821,60 @@ static HRESULT wined3d_timestamp_disjoint_query_create(struct wined3d_device *de +@@ -979,6 +1015,60 @@ static HRESULT wined3d_so_statistics_query_create(struct wined3d_device *device, return WINED3D_OK; } @@ -171,9 +155,9 @@ index 3cfbd8431ac..2bca60e7d4c 100644 HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query) { -@@ -806,6 +896,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q - case WINED3D_QUERY_TYPE_TIMESTAMP_FREQ: - return wined3d_timestamp_disjoint_query_create(device, type, parent, parent_ops, query); +@@ -1006,6 +1096,12 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q + case WINED3D_QUERY_TYPE_SO_STATISTICS_STREAM3: + return wined3d_so_statistics_query_create(device, type, parent, parent_ops, query); + case WINED3D_QUERY_TYPE_SO_STATISTICS: + return wined3d_statistics_query_create(device, type, parent, parent_ops, query); @@ -184,23 +168,6 @@ index 3cfbd8431ac..2bca60e7d4c 100644 default: FIXME("Unhandled query type %#x.\n", type); return WINED3DERR_NOTAVAILABLE; -diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 97947e44d9c..fc1a5fea56d 100644 ---- a/include/wine/wined3d.h -+++ b/include/wine/wined3d.h -@@ -710,6 +710,12 @@ struct wined3d_query_data_timestamp_disjoint - BOOL disjoint; - }; - -+struct wined3d_query_data_so_statistics -+{ -+ UINT64 written; -+ UINT64 needed; -+}; -+ - #define WINED3DISSUE_BEGIN (1u << 1) - #define WINED3DISSUE_END (1u << 0) - #define WINED3DGETDATA_FLUSH (1u << 0) -- 2.12.2 diff --git a/patches/wined3d-QUERY_Stubs/0002-d3d11-Add-dummy-support-for-D3D11_QUERY_PIPELINE_STA.patch b/patches/wined3d-QUERY_Stubs/0002-d3d11-Add-dummy-support-for-D3D11_QUERY_PIPELINE_STA.patch index a9d7a47e..4c3ef77b 100644 --- a/patches/wined3d-QUERY_Stubs/0002-d3d11-Add-dummy-support-for-D3D11_QUERY_PIPELINE_STA.patch +++ b/patches/wined3d-QUERY_Stubs/0002-d3d11-Add-dummy-support-for-D3D11_QUERY_PIPELINE_STA.patch @@ -1,4 +1,4 @@ -From 74ddf016c63387ed5bf4e94ee96ac82803747f4c Mon Sep 17 00:00:00 2001 +From 47db3c24a1b6504146154b31fc285a54578dc3ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Sun, 22 Jan 2017 01:51:51 +0100 Subject: d3d11: Add dummy support for D3D11_QUERY_PIPELINE_STATISTICS query. @@ -11,10 +11,10 @@ Subject: d3d11: Add dummy support for D3D11_QUERY_PIPELINE_STATISTICS query. 4 files changed, 65 insertions(+), 2 deletions(-) diff --git a/dlls/d3d10core/tests/device.c b/dlls/d3d10core/tests/device.c -index c1b74718b5..957d7b5422 100644 +index c08004723cc..9958feb1c25 100644 --- a/dlls/d3d10core/tests/device.c +++ b/dlls/d3d10core/tests/device.c -@@ -3867,7 +3867,7 @@ static void test_create_query(void) +@@ -3824,7 +3824,7 @@ static void test_create_query(void) {D3D10_QUERY_OCCLUSION, FALSE, FALSE}, {D3D10_QUERY_TIMESTAMP, FALSE, FALSE}, {D3D10_QUERY_TIMESTAMP_DISJOINT, FALSE, FALSE}, @@ -24,10 +24,10 @@ index c1b74718b5..957d7b5422 100644 {D3D10_QUERY_SO_STATISTICS, FALSE, FALSE}, {D3D10_QUERY_SO_OVERFLOW_PREDICATE, TRUE, FALSE}, diff --git a/dlls/d3d11/tests/d3d11.c b/dlls/d3d11/tests/d3d11.c -index ee38b26e00..23bd1eba00 100644 +index 18d2a2fd4d1..91620723f46 100644 --- a/dlls/d3d11/tests/d3d11.c +++ b/dlls/d3d11/tests/d3d11.c -@@ -4586,7 +4586,7 @@ static void test_create_query(void) +@@ -4598,7 +4598,7 @@ static void test_create_query(void) {D3D11_QUERY_OCCLUSION, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_TIMESTAMP, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_TIMESTAMP_DISJOINT, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, @@ -37,10 +37,10 @@ index ee38b26e00..23bd1eba00 100644 {D3D11_QUERY_SO_STATISTICS, D3D_FEATURE_LEVEL_10_0, FALSE, FALSE, FALSE}, {D3D11_QUERY_SO_OVERFLOW_PREDICATE, D3D_FEATURE_LEVEL_10_0, TRUE, TRUE, FALSE}, diff --git a/dlls/wined3d/query.c b/dlls/wined3d/query.c -index 2bca60e7d4..3f9191b486 100644 +index 53745f959e6..db747362ab5 100644 --- a/dlls/wined3d/query.c +++ b/dlls/wined3d/query.c -@@ -302,6 +302,10 @@ static void wined3d_query_destroy_object(void *object) +@@ -317,6 +317,10 @@ static void wined3d_query_destroy_object(void *object) { HeapFree(GetProcessHeap(), 0, query); } @@ -51,7 +51,7 @@ index 2bca60e7d4..3f9191b486 100644 else { ERR("Query %p has invalid type %#x.\n", query, query->type); -@@ -673,6 +677,20 @@ static BOOL wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD +@@ -809,6 +813,20 @@ static BOOL wined3d_overflow_query_ops_issue(struct wined3d_query *query, DWORD return FALSE; } @@ -72,7 +72,7 @@ index 2bca60e7d4..3f9191b486 100644 static const struct wined3d_query_ops event_query_ops = { wined3d_event_query_ops_poll, -@@ -875,6 +893,33 @@ static HRESULT wined3d_overflow_query_create(struct wined3d_device *device, +@@ -1069,6 +1087,33 @@ static HRESULT wined3d_overflow_query_create(struct wined3d_device *device, return WINED3D_OK; } @@ -106,7 +106,7 @@ index 2bca60e7d4..3f9191b486 100644 HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_query_type type, void *parent, const struct wined3d_parent_ops *parent_ops, struct wined3d_query **query) { -@@ -902,6 +947,9 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q +@@ -1102,6 +1147,9 @@ HRESULT CDECL wined3d_query_create(struct wined3d_device *device, enum wined3d_q case WINED3D_QUERY_TYPE_SO_OVERFLOW: return wined3d_overflow_query_create(device, type, parent, parent_ops, query); @@ -117,11 +117,11 @@ index 2bca60e7d4..3f9191b486 100644 FIXME("Unhandled query type %#x.\n", type); return WINED3DERR_NOTAVAILABLE; diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h -index 993797d877..b314ed9427 100644 +index 8697fbfa935..b81bc437efe 100644 --- a/include/wine/wined3d.h +++ b/include/wine/wined3d.h -@@ -715,6 +715,21 @@ struct wined3d_query_data_so_statistics - UINT64 needed; +@@ -725,6 +725,21 @@ struct wined3d_query_data_so_statistics + UINT64 primitives_generated; }; +struct wined3d_query_data_pipeline_statistics diff --git a/patches/wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch b/patches/wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch deleted file mode 100644 index 56053eb4..00000000 --- a/patches/wined3d-Silence_FIXMEs/0008-wined3d-Silence-noisy-fixme-Unrecognized-stencil-op-.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 7a7067db1ba6ab620bb7979ee081fb846d95016f Mon Sep 17 00:00:00 2001 -From: Christian Costa -Date: Sun, 8 Jan 2017 00:35:27 +0100 -Subject: wined3d: Silence noisy fixme Unrecognized stencil op 0. - ---- - dlls/wined3d/state.c | 5 ++++- - 1 file changed, 4 insertions(+), 1 deletion(-) - -diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c -index f7e36676a83..b990b31acb5 100644 ---- a/dlls/wined3d/state.c -+++ b/dlls/wined3d/state.c -@@ -848,8 +848,11 @@ static GLenum gl_stencil_op(enum wined3d_stencil_op op) - case WINED3D_STENCIL_OP_DECR: - return GL_DECR_WRAP; - default: -- FIXME("Unrecognized stencil op %#x.\n", op); -+ { -+ static int once; -+ if (op || !once++) FIXME("Unrecognized stencil op %#x.\n", op); - return GL_KEEP; -+ } - } - } - --- -2.11.0 -