forked from Mirrors/wine-wine
wined3d: Clear WINED3DFMT_FLAG_DEPTH_STENCIL if the format is not supported as FBO attachment.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>feature/deterministic
parent
9b8847ed7b
commit
c6f94cc87b
|
@ -135,13 +135,6 @@ HRESULT resource_init(struct wined3d_resource *resource, struct wined3d_device *
|
||||||
WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id));
|
WARN("Format %s cannot be used for depth/stencil buffers.\n", debug_d3dformat(format->id));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO
|
|
||||||
&& bind_flags & (WINED3D_BIND_RENDER_TARGET | WINED3D_BIND_DEPTH_STENCIL)
|
|
||||||
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_FBO_ATTACHABLE))
|
|
||||||
{
|
|
||||||
WARN("Render target or depth stencil is not FBO attachable.\n");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if ((bind_flags & WINED3D_BIND_SHADER_RESOURCE)
|
if ((bind_flags & WINED3D_BIND_SHADER_RESOURCE)
|
||||||
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_TEXTURE))
|
&& !(format->flags[gl_type] & WINED3DFMT_FLAG_TEXTURE))
|
||||||
{
|
{
|
||||||
|
|
|
@ -2515,11 +2515,11 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for
|
||||||
{
|
{
|
||||||
if (!rt_internal)
|
if (!rt_internal)
|
||||||
{
|
{
|
||||||
if (format->f.flags[type] & WINED3DFMT_FLAG_RENDERTARGET)
|
if (format->f.flags[type] & (WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_DEPTH_STENCIL))
|
||||||
{
|
{
|
||||||
WARN("Format %s with rendertarget flag is not supported as FBO color attachment (type %u),"
|
WARN("Format %s with rendertarget flag is not supported as FBO color attachment (type %u),"
|
||||||
" and no fallback specified.\n", debug_d3dformat(format->f.id), type);
|
" and no fallback specified.\n", debug_d3dformat(format->f.id), type);
|
||||||
format->f.flags[type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
|
format->f.flags[type] &= ~(WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_DEPTH_STENCIL);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -2552,7 +2552,7 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for
|
||||||
{
|
{
|
||||||
WARN("Format %s rtInternal format is not supported as FBO %s attachment, type %u.\n",
|
WARN("Format %s rtInternal format is not supported as FBO %s attachment, type %u.\n",
|
||||||
debug_d3dformat(format->f.id), type_string, type);
|
debug_d3dformat(format->f.id), type_string, type);
|
||||||
format->f.flags[type] &= ~WINED3DFMT_FLAG_RENDERTARGET;
|
format->f.flags[type] &= ~(WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_DEPTH_STENCIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2725,8 +2725,9 @@ static void check_fbo_compat(struct wined3d_caps_gl_ctx *ctx, struct wined3d_for
|
||||||
{
|
{
|
||||||
FIXME("Format %s needs different render target formats for different resource types.\n",
|
FIXME("Format %s needs different render target formats for different resource types.\n",
|
||||||
debug_d3dformat(format->f.id));
|
debug_d3dformat(format->f.id));
|
||||||
format_clear_flag(&format->f, WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_FBO_ATTACHABLE
|
format_clear_flag(&format->f, WINED3DFMT_FLAG_RENDERTARGET | WINED3DFMT_FLAG_DEPTH_STENCIL
|
||||||
| WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB | WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING);
|
| WINED3DFMT_FLAG_FBO_ATTACHABLE | WINED3DFMT_FLAG_FBO_ATTACHABLE_SRGB
|
||||||
|
| WINED3DFMT_FLAG_POSTPIXELSHADER_BLENDING);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue