[PATCH 2/5] d3d9: Check for support before creating textures
stefan at codeweavers.com
Tue Sep 3 10:45:57 CDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Am 2013-09-03 17:33, schrieb Henri Verbeet:
> On 3 September 2013 14:07, Stefan Dösinger <stefan at codeweavers.com>
>> I'm checking this in d3d9/d3d8/ddraw because we create textures
>> for everything nowadays, even stand-alone surfaces.
> For ddraw that's not true yet, but I think my preferred way to
> handle this would be to introduce a WINED3DUSAGE_TEXTURE usage
> flag, and then handle the format restrictions in resource_init() in
I have a patch for ddraw that changes that, it's one of the changes
necessary to make the ddraw version of this test pass.
My main issue with a WINED3DUSAGE_TEXTURE flag is that
create_texture(USAGE_TEXTURE) seems a bit weird - we might as well
call it create_texture(USAGE_I_REALLY_MEAN_IT).
The other aspect is that the capability check is the main difference
between SCRATCH and SYSMEM resources. Having the check in the client
libraries makes it easier to handle SCRATCH resources in d3d8/9.
Admittedly it is not enough to just handle the format this way. The
POW2 restriction and maximum size checks would have to be moved as well.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/
-----END PGP SIGNATURE-----
More information about the wine-devel