mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-16 05:26:43 +00:00
wined3d: Handle depth textures in texture2d_read_from_framebuffer().
This commit is contained in:
parent
7d5f9e42d3
commit
0b5bd25415
|
@ -374,8 +374,12 @@ void texture2d_read_from_framebuffer(struct wined3d_texture *texture, unsigned i
|
|||
|
||||
if (wined3d_settings.offscreen_rendering_mode == ORM_FBO)
|
||||
{
|
||||
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER,
|
||||
resource, sub_resource_idx, NULL, 0, src_location);
|
||||
if (resource->format->depth_size || resource->format->stencil_size)
|
||||
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER,
|
||||
NULL, 0, resource, sub_resource_idx, src_location);
|
||||
else
|
||||
wined3d_context_gl_apply_fbo_state_explicit(context_gl, GL_READ_FRAMEBUFFER,
|
||||
resource, sub_resource_idx, NULL, 0, src_location);
|
||||
}
|
||||
|
||||
/* Select the correct read buffer, and give some debug output.
|
||||
|
|
|
@ -3006,8 +3006,7 @@ static BOOL wined3d_texture_gl_load_sysmem(struct wined3d_texture_gl *texture_gl
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
if (!(texture_gl->t.resource.bind_flags & WINED3D_BIND_DEPTH_STENCIL)
|
||||
&& (sub_resource->locations & WINED3D_LOCATION_DRAWABLE))
|
||||
if (sub_resource->locations & WINED3D_LOCATION_DRAWABLE)
|
||||
{
|
||||
texture2d_read_from_framebuffer(&texture_gl->t, sub_resource_idx, &context_gl->c,
|
||||
texture_gl->t.resource.draw_binding, dst_location);
|
||||
|
|
Loading…
Reference in a new issue