wined3d: Ignore WINED3DFMT_NULL rendertarget in D/S size checks.

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 2020-11-25 18:11:26 +01:00 committed by Alexandre Julliard
parent c06cacff11
commit 7b23056c0b
1 changed files with 2 additions and 1 deletions

View File

@ -627,7 +627,8 @@ static struct fbo_entry *wined3d_context_gl_find_fbo_entry(struct wined3d_contex
struct fbo_entry *entry; struct fbo_entry *entry;
if (depth_stencil->resource && depth_stencil->resource->type != WINED3D_RTYPE_BUFFER if (depth_stencil->resource && depth_stencil->resource->type != WINED3D_RTYPE_BUFFER
&& render_targets[0].resource && render_targets[0].resource->type != WINED3D_RTYPE_BUFFER) && render_targets[0].resource && render_targets[0].resource->type != WINED3D_RTYPE_BUFFER
&& render_targets[0].resource->format->id != WINED3DFMT_NULL)
{ {
rt_texture = wined3d_texture_from_resource(render_targets[0].resource); rt_texture = wined3d_texture_from_resource(render_targets[0].resource);
rt_level = render_targets[0].sub_resource_idx % rt_texture->level_count; rt_level = render_targets[0].sub_resource_idx % rt_texture->level_count;