[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().

Henri Verbeet hverbeet at gmail.com
Thu Jun 16 04:48:13 CDT 2022


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];".

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.



More information about the wine-devel mailing list