Mesa (main): croucs: limit stencil swizzle change to older generations

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Jun 22 20:38:14 UTC 2021


Module: Mesa
Branch: main
Commit: 45c12da2119a4808afde9f9b1c7bbd40ca58cefa
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=45c12da2119a4808afde9f9b1c7bbd40ca58cefa

Author: Dave Airlie <airlied at redhat.com>
Date:   Tue Jun 22 11:05:29 2021 +1000

croucs: limit stencil swizzle change to older generations

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11538>

---

 src/gallium/drivers/crocus/crocus_state.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gallium/drivers/crocus/crocus_state.c b/src/gallium/drivers/crocus/crocus_state.c
index 93faf88978c..33527fca9a6 100644
--- a/src/gallium/drivers/crocus/crocus_state.c
+++ b/src/gallium/drivers/crocus/crocus_state.c
@@ -2694,8 +2694,9 @@ crocus_create_sampler_view(struct pipe_context *ctx,
    crocus_combine_swizzle(isv->swizzle, fmt.swizzles, vswz);
 
    /* hardcode stencil swizzles - hw returns 0G01, we want GGGG */
-   if (tmpl->format == PIPE_FORMAT_X32_S8X24_UINT ||
-       tmpl->format == PIPE_FORMAT_X24S8_UINT) {
+   if (devinfo->ver < 6 &&
+       (tmpl->format == PIPE_FORMAT_X32_S8X24_UINT ||
+        tmpl->format == PIPE_FORMAT_X24S8_UINT)) {
       isv->swizzle[0] = tmpl->swizzle_g;
       isv->swizzle[1] = tmpl->swizzle_g;
       isv->swizzle[2] = tmpl->swizzle_g;



More information about the mesa-commit mailing list