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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user