[PATCH 2/5] d3d9: Check for support before creating textures
stefan at codeweavers.com
Tue Sep 3 15:47:08 CDT 2013
-----BEGIN PGP SIGNED MESSAGE-----
Am 2013-09-03 17:54, schrieb Henri Verbeet:
> If that's the main issue, I could tell you that it will most
> likely end up being renamed WINED3D_BIND_SHADER_RESOURCE at some
> point, equivalent to the d3d10+ bind flags.
That works for the name. The other d3d10 flags should take care for
most d3d9 flag combinations. One open issue I can think of so far is
how to represent D3DPOOL_SYSTEMMEM. There's no exact match, since it
supports CPU->GPU and GPU->CPU transfers. MSDN isn't quite clear on
what STAGING usage means.
Lockable render targets (and dynamic rendertarget / depth stencil
textures) are tricky too because MSDN says CPU_WRITE resources can't
be bound to pipeline outputs. I guess that will need tests, and we may
want to ignore it inside wined3d.
The rest seems pretty straightforward:
*) Textures and plain surfaces are handled by setting / not setting
*) D3DUSAGE_RENDERTARGET and D3DUSAGE_DEPTHSTENCIL are handled with
their equivalent bind flags.
*) D3DPOOL managed and dynamic default pool have CPU_READ | CPU_WRITE set.
*) D3DPOOL_SCRATCH doesn't have any BIND flags set. It does have
CPU_READ | CPU_WRITE. Usage could be STAGING or a private usage flag,
*) Non-dynamic default resources don't allow CPU access and have
Either way I think a D3DUSAGE_TEXTURE flag should work for now.
-----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