On Mon, 13 Jul 2020 at 16:31, Matteo Bruni mbruni@codeweavers.com wrote:
We don't have any way to copy the depth buffer from the DRAWABLE to the TEXTURE location, aside from FBOs.
We could if we really wanted to, but this seems the better option, yes.
@@ -1747,6 +1747,12 @@ HRESULT CDECL wined3d_check_device_format(const struct wined3d *wined3d, if (bind_flags == WINED3D_BIND_DEPTH_STENCIL && gl_type == WINED3D_GL_RES_TYPE_TEX_3D) continue;
if (!(~bind_flags & (WINED3D_BIND_DEPTH_STENCIL | WINED3D_BIND_SHADER_RESOURCE))
&& wined3d_settings.offscreen_rendering_mode != ORM_FBO)
{
TRACE("Requested depth/stencil texture with no FBO support, that's not supported.\n");
return WINED3DERR_NOTAVAILABLE;
}
wined3d_check_device_format() is the wrong place for this; if the format does not support WINED3D_BIND_SHADER_RESOURCE, WINED3DFMT_FLAG_TEXTURE should not be set. The most appropriate place seems query_internal_format(), similar to the existing ARB_DEPTH_TEXTURE check.