[PATCH 1/5] d3d10core/tests: Multisampled render targets are zeroed on creation.
stefandoesinger at gmail.com
Wed Nov 25 09:21:59 CST 2015
-----BEGIN PGP SIGNED MESSAGE-----
Am 2015-11-25 um 13:44 schrieb Henri Verbeet:
> You should check if the sample count is supported with
My impression was that d3d10 mandates at least 4x MSAA support, though MSDN talks about FEATURE_LEVEL_10_1 devices. I guess it's a good idea to check anyway.
>> + /* CopyResource from a multisampled to a sysmem texture works, but leaks memory on Windows
>> + * (Nvidia, not checked on AMD). Use a single sampled buffer to work around. */
> Direct3D 10+ doesn't have sysmem textures. You can make resources
> accessible to the CPU, but you can't prevent the GPU from reading from
> them. How did you verify that the CopyResource() works?
An early version of this test called get_texture_color 640x480 times and died with E_OUTOFMEMORY on Windows. Adding the extra CopyResource step made the out of memory error go away.
> At least according to the documentation, CopyResource() doesn't work
> at all with multi-sampled resources, and this should use
> ResolveSubresource() instead. It's possible the documentation is wrong
> about that, but that would need a more convincing test. Right now it
> looks like the test only tests that the initial contents of "single"
> are zeroes.
Good point. I think I tested the code by clearing the multisampled texture and checking if I get a non-zero readback, but I'm not sure any more if I did this in the d3d10 version as well or only in the d3d9 version.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
-----END PGP SIGNATURE-----
More information about the wine-devel