Skip to content

Commit

Permalink
st/nine: Refuse depth buffers as rendertargets
Browse files Browse the repository at this point in the history
If we allow them, some apps try to use them
as rendertargets.

Signed-off-by: Axel Davy <davyaxel0@gmail.com>
  • Loading branch information
axeldavy committed Apr 11, 2021
1 parent 49824a6 commit 31803a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/gallium/frontends/nine/adapter9.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 31803a0

Please sign in to comment.