[PATCH 4/5] wined3d: Retrieve caps from both WINED3D_GL_RES_TYPE_TEX_2D and WINED3D_GL_RES_TYPE_RB for 2D textures in wined3d_check_device_format().

Zebediah Figura zfigura at codeweavers.com
Thu Jun 16 14:05:57 CDT 2022

On 6/16/22 04:48, Henri Verbeet wrote:
> On Wed, 15 Jun 2022 at 23:56, Zebediah Figura <wine at gitlab.winehq.org> wrote:
>> WINED3D_GL_RES_TYPE_RB is not used by the Vulkan backend.
>> We could alternatively solve this by filling WINED3D_GL_RES_TYPE_RB for the
>> Vulkan backend, but this makes less sense. Checking both formats is more in line
>> with what is done elsewhere, e.g. wined3d_check_surface_format().
> The issue with that is that the RB flags may be a superset of the
> TEX_2D flags. For example, some GPUs from a certain era support
> depth/stencil renderbuffer attachments, but not depth/shadow textures.
> Doing this the other way around probably makes more sense; i.e., "if
> (gl_type == WINED3D_GL_RES_TYPE_RB) caps |=
> format->caps[WINED3D_GL_RES_TYPE_TEX_2D];".

missing, which should I think be identical. I'll modify accordingly.

> It's of course a little ugly that GL resource types bleed through into
> the common code in the first place. We may want to try to fix that at
> some point, but it's probably not quite trivial.

I guess the architecturally nice thing to do would be to report 
capability flags based on the bind flags, but that does feel somewhat 
awkward in its own ways...

More information about the wine-devel mailing list