Commit 82f6410b authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

wined3d: Disable the depth stencil if it is smaller than the primary color buffer.

This way we get correct behavior if the application has depth and stencil related tests disabled. If we attach the depth stencil GL limits the framebuffer size to the smallest surface, making some parts of the framebuffer inaccessible.
parent 0fc6381b
......@@ -399,6 +399,16 @@ static struct fbo_entry *context_find_fbo_entry(struct wined3d_context *context,
const struct wined3d_gl_info *gl_info = context->gl_info;
struct fbo_entry *entry;
if (depth_stencil && render_targets && render_targets[0])
{
if (depth_stencil->resource.width < render_targets[0]->resource.width ||
depth_stencil->resource.height < render_targets[0]->resource.height)
{
WARN("Depth stencil is smaller than the primary color buffer, disabling\n");
depth_stencil = NULL;
}
}
LIST_FOR_EACH_ENTRY(entry, &context->fbo_list, struct fbo_entry, entry)
{
if (!memcmp(entry->render_targets,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment