Mesa (main): i915g: Fix bad naming of depth texture formats.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 23 20:05:09 UTC 2021


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

Author: Emma Anholt <emma at anholt.net>
Date:   Tue Jun 22 16:11:51 2021 -0700

i915g: Fix bad naming of depth texture formats.

Now matches classic's i915_reg.h and the spec.

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

---

 src/gallium/drivers/i915/i915_reg.h           | 4 ++--
 src/gallium/drivers/i915/i915_state_sampler.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/gallium/drivers/i915/i915_reg.h b/src/gallium/drivers/i915/i915_reg.h
index b410aaa0f2f..8f50011b741 100644
--- a/src/gallium/drivers/i915/i915_reg.h
+++ b/src/gallium/drivers/i915/i915_reg.h
@@ -750,8 +750,8 @@
 #define    MT_32BIT_GR1616	           (0xB<<3)
 #define    MT_32BIT_VU1616	           (0xC<<3)
 #define    MT_32BIT_xI824	           (0xD<<3)
-#define    MT_32BIT_xA824	           (0xE<<3)
-#define    MT_32BIT_xL824	           (0xF<<3)
+#define    MT_32BIT_xL824	           (0xE<<3)
+#define    MT_32BIT_xA824	           (0xF<<3)
 #define    MT_422_YCRCB_SWAPY	           (0<<3)       /* SURFACE_422 */
 #define    MT_422_YCRCB_NORMAL	           (1<<3)
 #define    MT_422_YCRCB_SWAPUV	           (2<<3)
diff --git a/src/gallium/drivers/i915/i915_state_sampler.c b/src/gallium/drivers/i915/i915_state_sampler.c
index 09aa382a545..07bb84a3f5c 100644
--- a/src/gallium/drivers/i915/i915_state_sampler.c
+++ b/src/gallium/drivers/i915/i915_state_sampler.c
@@ -252,7 +252,7 @@ static uint translate_texture_format(enum pipe_format pipeFormat,
               view->swizzle_g == PIPE_SWIZZLE_X &&
               view->swizzle_b == PIPE_SWIZZLE_X &&
               view->swizzle_a == PIPE_SWIZZLE_1)
-            return (MAPSURF_32BIT | MT_32BIT_xA824);
+            return (MAPSURF_32BIT | MT_32BIT_xL824);
          if ( view->swizzle_r == PIPE_SWIZZLE_X &&
               view->swizzle_g == PIPE_SWIZZLE_X &&
               view->swizzle_b == PIPE_SWIZZLE_X &&
@@ -262,7 +262,7 @@ static uint translate_texture_format(enum pipe_format pipeFormat,
               view->swizzle_g == PIPE_SWIZZLE_0 &&
               view->swizzle_b == PIPE_SWIZZLE_0 &&
               view->swizzle_a == PIPE_SWIZZLE_X)
-            return (MAPSURF_32BIT | MT_32BIT_xL824);
+            return (MAPSURF_32BIT | MT_32BIT_xA824);
          debug_printf("i915: unsupported depth swizzle %d %d %d %d\n",
                       view->swizzle_r,
                       view->swizzle_g,



More information about the mesa-commit mailing list