On Wed, 15 Jun 2022 at 23:56, Zebediah Figura wine@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.