On 9 December 2016 at 11:30, Józef Kucia jkucia@codeweavers.com wrote:
Signed-off-by: Józef Kucia jkucia@codeweavers.com
The test was slightly changed. If it still fails the failures should be more clear now after "d3d11/tests: Print expected result in case of failures in check_texture_sub_resource_*() functions."
Still fails:
d3d11.c:6532: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6537: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6542: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6563: Test failed: Got 6.00000024e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6568: Test failed: Got 1.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:6594: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d11.c:6599: Test failed: Got 1.00000000e+002, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d11.c:6608: Test failed: Got 2.55199997e+002, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d11.c:6613: Test failed: Got 3.29999995e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6618: Test failed: Got 4.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6532: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6537: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6542: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6563: Test failed: Got 6.00000024e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6568: Test failed: Got 1.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:6532: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6537: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6542: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6563: Test failed: Got 6.00000024e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6568: Test failed: Got 1.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0. d3d11.c:6594: Test failed: Got 0.00000000e+000, expected 1.00000000e+002 at (0, 0), sub-resource 0. d3d11.c:6599: Test failed: Got 1.00000000e+002, expected 2.55000000e+002 at (0, 0), sub-resource 0. d3d11.c:6608: Test failed: Got 2.55199997e+002, expected 3.29999995e+000 at (0, 0), sub-resource 0. d3d11.c:6613: Test failed: Got 3.29999995e+000, expected 4.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6618: Test failed: Got 4.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6532: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6537: Test failed: Got 0.00000000e+000, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6542: Test failed: Got 1.00000000e+000, expected 0.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6563: Test failed: Got 6.00000024e-001, expected 1.00000000e+000 at (0, 0), sub-resource 0. d3d11.c:6568: Test failed: Got 1.00000000e+000, expected 2.00000003e-001 at (0, 0), sub-resource 0.
So I investigated this a little, and the issue seems to be that as soon as D3D11_BIND_SHADER_RESOURCE is in the bind flags, reads from the depth texture return stale values. E.g., the failure at line 6563 is from the 0.6f written by the clear at line 6544. This can also be reproduced by calling check_texture_float() directly on the depth texture, and is not specific to typeless formats. I'd guess at a driver bug related to e.g. compressed depth or fast clear handling. Regardless, I'd expect that using separate resources for the clear and the shader reads would fix the failures, although it would perhaps weaken the test a little.
On Mon, Dec 12, 2016 at 9:25 AM, Henri Verbeet hverbeet@gmail.com wrote:
So I investigated this a little, and the issue seems to be that as soon as D3D11_BIND_SHADER_RESOURCE is in the bind flags, reads from the depth texture return stale values. E.g., the failure at line 6563 is from the 0.6f written by the clear at line 6544. This can also be reproduced by calling check_texture_float() directly on the depth texture, and is not specific to typeless formats. I'd guess at a driver bug related to e.g. compressed depth or fast clear handling. Regardless, I'd expect that using separate resources for the clear and the shader reads would fix the failures, although it would perhaps weaken the test a little.
Thanks. I'll prepare a new version.
On Mon, Dec 12, 2016 at 9:39 AM, Józef Kucia joseph.kucia@gmail.com wrote:
On Mon, Dec 12, 2016 at 9:25 AM, Henri Verbeet hverbeet@gmail.com wrote:
So I investigated this a little, and the issue seems to be that as soon as D3D11_BIND_SHADER_RESOURCE is in the bind flags, reads from the depth texture return stale values. E.g., the failure at line 6563 is from the 0.6f written by the clear at line 6544. This can also be reproduced by calling check_texture_float() directly on the depth texture, and is not specific to typeless formats. I'd guess at a driver bug related to e.g. compressed depth or fast clear handling. Regardless, I'd expect that using separate resources for the clear and the shader reads would fix the failures, although it would perhaps weaken the test a little.
Thanks. I'll prepare a new version.
I expect that the attached patch fixes the test failures. Unfortunately it breaks the test on Wine, because blit doesn't work between depth/stencil R32_TYPELESS and non-detph/stencil R32_TYPELESS.
On 13 December 2016 at 13:21, Józef Kucia joseph.kucia@gmail.com wrote:
I expect that the attached patch fixes the test failures. Unfortunately it breaks the test on Wine, because blit doesn't work between depth/stencil R32_TYPELESS and non-detph/stencil R32_TYPELESS.
That does fix it, yeah, and fails on Wine as expected.
The failure on Wine is unfortunate, but perhaps also an interesting case by itself.
2016-12-14 9:49 GMT+01:00 Henri Verbeet hverbeet@gmail.com:
On 13 December 2016 at 13:21, Józef Kucia joseph.kucia@gmail.com wrote:
I expect that the attached patch fixes the test failures. Unfortunately it breaks the test on Wine, because blit doesn't work between depth/stencil R32_TYPELESS and non-detph/stencil R32_TYPELESS.
That does fix it, yeah, and fails on Wine as expected.
The failure on Wine is unfortunate, but perhaps also an interesting case by itself.
Yeah, I don't know that is something actual applications are likely to use but it's probably a valuable test.