wined3d: Don't consider texture rectangles for buffers.

Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Matteo Bruni 2021-08-11 19:18:53 +02:00 committed by Alexandre Julliard
parent a056663efb
commit aaf4ef6e62

View file

@ -121,26 +121,26 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
if (base_type == WINED3D_GL_RES_TYPE_COUNT) if (base_type == WINED3D_GL_RES_TYPE_COUNT)
base_type = gl_type; base_type = gl_type;
if (type != WINED3D_RTYPE_BUFFER) if (type == WINED3D_RTYPE_BUFFER)
break;
if ((bind_flags & WINED3D_BIND_RENDER_TARGET)
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_RENDERTARGET))
{ {
if ((bind_flags & WINED3D_BIND_RENDER_TARGET) WARN("Format %s cannot be used for render targets.\n", debug_d3dformat(format->id));
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_RENDERTARGET)) continue;
{ }
WARN("Format %s cannot be used for render targets.\n", debug_d3dformat(format->id)); if ((bind_flags & WINED3D_BIND_DEPTH_STENCIL)
continue; && !(format->flags[gl_type] & WINED3DFMT_FLAG_DEPTH_STENCIL))
} {
if ((bind_flags & WINED3D_BIND_DEPTH_STENCIL) WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id));
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_DEPTH_STENCIL)) continue;
{ }
WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id)); if ((bind_flags & WINED3D_BIND_SHADER_RESOURCE)
continue; && !(format->flags[gl_type] & WINED3DFMT_FLAG_TEXTURE))
} {
if ((bind_flags & WINED3D_BIND_SHADER_RESOURCE) WARN("Format %s cannot be used for texturing.\n", debug_d3dformat(format->id));
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_TEXTURE)) continue;
{
WARN("Format %s cannot be used for texturing.\n", debug_d3dformat(format->id));
continue;
}
} }
if (((width & (width - 1)) || (height & (height - 1))) if (((width & (width - 1)) || (height & (height - 1)))
&& !d3d_info->texture_npot && !d3d_info->texture_npot