[PATCH 3/8] wined3d: Keep track of renderbuffer capabilities.

Matteo Bruni matteo.mystral at gmail.com
Tue May 26 11:06:35 CDT 2015


2015-05-26 12:54 GMT+02:00 Stefan Dösinger <stefandoesinger at gmail.com>:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 2015-05-25 um 10:50 schrieb Henri Verbeet:
>> I guess, but it doesn't really seem worth it if that means
>> duplicating much of the generic usage/format validation code.
> I tried to move the code to resource_init and the non power of 2
> handling is a big problem. resource_init doesn't care about power of 2
> and non power of 2 sizes, and I don't think it should. It would need
> to know that though to switch between 2D and RECT.
>
> Adding a flag for "this resource type supports NP2 textures" isn't
> really an option either. If we have neither TEXTURE_NP2 nor
> TEXTURE_RECTANGLE (some GL ES systems according to Matteo) we want to
> use 2D textures with padding.

Just to clarify on this point, even though it's quite tangential to
the discussion: basic GL ES 2 has pretty much the same limitations as
a D3D device with D3DPTEXTURECAPS_NONPOW2CONDITIONAL: NP2 textures are
supported as long as you use CLAMP_TO_EDGE texcoord wrapping and don't
make use of mipmapping in minification filtering.
In theory D3D applications should check the cap bit and avoid that
kind of usage, except often times they don't. The texture handling
stuff related with WINED3D_GL_NORMALIZED_TEXRECT and
WINED3D_TEXTURE_COND_NP2 mostly does the right thing here and yeah, it
would be nice if that stays around. BTW, rectangle textures are not
supported in OpenGL ES.



More information about the wine-devel mailing list