Mesa (main): crocus/gen8: add back z16 support for gen8
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 30 01:04:52 UTC 2021
Module: Mesa
Branch: main
Commit: 783dcd0634a6144cbdb5a904fc81c865c1f76a3c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=783dcd0634a6144cbdb5a904fc81c865c1f76a3c
Author: Dave Airlie <airlied at gmail.com>
Date: Wed Jun 30 10:42:43 2021 +1000
crocus/gen8: add back z16 support for gen8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11646>
---
src/gallium/drivers/crocus/crocus_formats.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/gallium/drivers/crocus/crocus_formats.c b/src/gallium/drivers/crocus/crocus_formats.c
index e724c4c6d86..61d1b49d222 100644
--- a/src/gallium/drivers/crocus/crocus_formats.c
+++ b/src/gallium/drivers/crocus/crocus_formats.c
@@ -467,11 +467,15 @@ crocus_is_format_supported(struct pipe_screen *pscreen,
supported &= isl_format_supports_multisampling(devinfo, format);
if (usage & PIPE_BIND_DEPTH_STENCIL) {
- supported &= format == ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS ||
- format == ISL_FORMAT_R32_FLOAT ||
- format == ISL_FORMAT_R24_UNORM_X8_TYPELESS ||
- format == ISL_FORMAT_R8_UINT;
+ bool depth_fmts = format == ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS ||
+ format == ISL_FORMAT_R32_FLOAT ||
+ format == ISL_FORMAT_R24_UNORM_X8_TYPELESS ||
+ format == ISL_FORMAT_R8_UINT;
+
/* Z16 is disabled here as on pre-GEN8 it's slower. */
+ if (devinfo->ver == 8)
+ depth_fmts |= format == ISL_FORMAT_R16_UNORM;
+ supported &= depth_fmts;
}
if (usage & PIPE_BIND_RENDER_TARGET) {
More information about the mesa-commit
mailing list