mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 17:30:12 +01:00
st/nine: Do not allow depth buffer render targets
Without the proposed check, some apps will decide to use depth buffers as render targets. Bug found investigating: https://github.com/iXit/wine-nine-standalone/issues/82 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/9177>
This commit is contained in:
parent
3dbc542f97
commit
f85f025a05
1 changed files with 4 additions and 0 deletions
|
|
@ -301,6 +301,10 @@ d3d9_to_pipe_format_checked(struct pipe_screen *screen,
|
|||
{
|
||||
enum pipe_format result;
|
||||
|
||||
/* We cannot render to depth textures as a render target */
|
||||
if (depth_stencil_format(format) && (bindings & PIPE_BIND_RENDER_TARGET))
|
||||
return PIPE_FORMAT_NONE;
|
||||
|
||||
result = d3d9_to_pipe_format_internal(format);
|
||||
if (result == PIPE_FORMAT_NONE)
|
||||
return PIPE_FORMAT_NONE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue