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.