mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 09:30:11 +01:00
asahi: Validate depth/stencil formats
Don't go advertising formats we don't actually support. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16512>
This commit is contained in:
parent
e6c809d767
commit
a0fc622be5
1 changed files with 18 additions and 0 deletions
|
|
@ -1045,6 +1045,24 @@ agx_is_format_supported(struct pipe_screen* pscreen,
|
|||
}
|
||||
}
|
||||
|
||||
if (usage & PIPE_BIND_DEPTH_STENCIL) {
|
||||
switch (format) {
|
||||
/* natively supported
|
||||
* TODO: we could also support Z16_UNORM */
|
||||
case PIPE_FORMAT_Z32_FLOAT:
|
||||
case PIPE_FORMAT_S8_UINT:
|
||||
|
||||
/* lowered by u_transfer_helper to one of the above */
|
||||
case PIPE_FORMAT_Z24X8_UNORM:
|
||||
case PIPE_FORMAT_Z24_UNORM_S8_UINT:
|
||||
case PIPE_FORMAT_Z32_FLOAT_S8X24_UINT:
|
||||
return true;
|
||||
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/* TODO */
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue