wined3d: Use "depth_size"/"stencil_size" to check for depth/stencil formats in the FBO cache.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
f570c9b655
commit
831701d3f4
|
@ -566,9 +566,9 @@ static struct fbo_entry *wined3d_context_gl_create_fbo_entry(const struct wined3
|
|||
entry->flags = 0;
|
||||
if (depth_stencil->resource)
|
||||
{
|
||||
if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_DEPTH)
|
||||
if (depth_stencil->resource->format->depth_size)
|
||||
entry->flags |= WINED3D_FBO_ENTRY_FLAG_DEPTH;
|
||||
if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_STENCIL)
|
||||
if (depth_stencil->resource->format->stencil_size)
|
||||
entry->flags |= WINED3D_FBO_ENTRY_FLAG_STENCIL;
|
||||
}
|
||||
entry->rt_mask = context_generate_rt_mask(GL_COLOR_ATTACHMENT0);
|
||||
|
@ -594,9 +594,9 @@ static void wined3d_context_gl_reuse_fbo_entry(struct wined3d_context_gl *contex
|
|||
entry->flags = 0;
|
||||
if (depth_stencil->resource)
|
||||
{
|
||||
if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_DEPTH)
|
||||
if (depth_stencil->resource->format->depth_size)
|
||||
entry->flags |= WINED3D_FBO_ENTRY_FLAG_DEPTH;
|
||||
if (depth_stencil->resource->format_flags & WINED3DFMT_FLAG_STENCIL)
|
||||
if (depth_stencil->resource->format->stencil_size)
|
||||
entry->flags |= WINED3D_FBO_ENTRY_FLAG_STENCIL;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue