[PATCH 1/5] d3d10core/tests: Multisampled render targets are zeroed on creation.

Stefan Dösinger stefandoesinger at gmail.com
Wed Nov 25 09:21:59 CST 2015


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Am 2015-11-25 um 13:44 schrieb Henri Verbeet:
> You should check if the sample count is supported with
> CheckMultisampleQualityLevels().
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

iQIcBAEBCAAGBQJWVdIXAAoJEN0/YqbEcdMwqvEQAI5Kcs6EDq0NDXI0adPLPpiF
znYazw6zAkuiFDM0FeXb4bs88/7lz7ndxyfceLYVhp9HpSDCINkYgIGllzoGGMDV
7OpLCAHC4Sb1N+lOvoBKq3UwDbbL2u9nYzOStT+VS2aPzvLR5+cyHr1bWuBe8nNw
wgNlYBeOw3aXZqkeNXNMJX8BfKE/xQzoKhlpvI/DTx24SKLzJN0/8WJUEPQITi3J
d3s9KBCV7GMt/a4gIXL17kS8F09GUubtBEaWWsmr3130T2Pv0yw+HZQ0p1p0zmib
qxqYfoPOybtxuw5GcofebDI4HQ1OF8guNcvnGI9qKxcGkM/oNdxCCaQNnXsrI30P
CLC9GZQdjUxEJFe/PHX7WMQxdFmTnNMVstzf/s3lYm+pJnJ6ovHr0P+nRBdWl6Jy
l4PcitG5CqmACSRHkiSIT4GmHp2veFhoSu8CwYg8MDzHolOrXFwuguK1s+ci6NMi
QIJTPJM5c2/w3WbVmWwM8naLdCdkkOTFaEMVGOO3iOuWmXrcfkJhK7m51477JwVt
JRVDXa6eCFo+2hOgp15W5XtvUMHTXHNpuJ+hiUExAceK03zx3Zoaj2blRUSvESBZ
hH4BM4m0f7/Sgnm9PDrZy0gSYvE5pVJHnVyX2nTgjGad4WAtAi1NpHBQCgy6hAUy
IPZ3OrhorEkpbUug1g8i
=yEWm
-----END PGP SIGNATURE-----



More information about the wine-devel mailing list