st/nine: Refuse depth buffers as rendertargets

If we allow them, some apps try to use them
as rendertargets.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10160>
This commit is contained in:
Axel Davy
2021-03-20 13:50:45 +01:00
committed by Marge Bot
parent a849923aea
commit 9e9644666e
+5 -1
View File
@@ -328,7 +328,11 @@ NineAdapter9_CheckDeviceFormat( struct NineAdapter9 *This,
}
bind = 0;
if (Usage & D3DUSAGE_RENDERTARGET) bind |= PIPE_BIND_RENDER_TARGET;
if (Usage & D3DUSAGE_RENDERTARGET) {
if (depth_stencil_format(CheckFormat))
return D3DERR_NOTAVAILABLE;
bind |= PIPE_BIND_RENDER_TARGET;
}
if (Usage & D3DUSAGE_DEPTHSTENCIL) {
if (!depth_stencil_format(CheckFormat))
return D3DERR_NOTAVAILABLE;