iris: fix Z32_S8 depth sampling
authorKenneth Graunke <kenneth@whitecape.org>
Fri, 5 Oct 2018 02:34:34 +0000 (19:34 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 21 Feb 2019 18:26:09 +0000 (10:26 -0800)
We were accidentally using the ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS
format, which is NOT what we use.  We just store R32_FLOAT depth.

fixes Piglit's texwrap GL_ARB_depth_buffer_float

src/gallium/drivers/iris/iris_formats.c

index 2b1950eaf7e1368c19983b06e7fe79b3a821267b..fa77b5bcf670e7fff47870e2453b9da35da1c316 100644 (file)
@@ -55,15 +55,18 @@ iris_isl_format_for_pipe_format(enum pipe_format pf)
       //[PIPE_FORMAT_L16_UNORM]               = ISL_FORMAT_L16_UNORM,
       //[PIPE_FORMAT_UYVY]                    = ISL_FORMAT_UYVY,
       //[PIPE_FORMAT_YUYV]                    = ISL_FORMAT_YUYV,
+
       [PIPE_FORMAT_Z16_UNORM]               = ISL_FORMAT_R16_UNORM,
       [PIPE_FORMAT_Z32_UNORM]               = ISL_FORMAT_R32_UNORM,
       [PIPE_FORMAT_Z32_FLOAT]               = ISL_FORMAT_R32_FLOAT,
-      /* XXX: separate stencil */
+
+      /* We translate the combined depth/stencil formats to depth only here */
       [PIPE_FORMAT_Z24_UNORM_S8_UINT]       = ISL_FORMAT_R24_UNORM_X8_TYPELESS,
-      //[PIPE_FORMAT_S8_UINT_Z24_UNORM]       = ISL_FORMAT_S8_UINT_Z24_UNORM,
       [PIPE_FORMAT_Z24X8_UNORM]             = ISL_FORMAT_R24_UNORM_X8_TYPELESS,
-      //[PIPE_FORMAT_X8Z24_UNORM]             = ISL_FORMAT_R24_UNORM_X8_TYPELESS,
+      [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT]    = ISL_FORMAT_R32_FLOAT,
+
       [PIPE_FORMAT_S8_UINT]                 = ISL_FORMAT_R8_UINT,
+
       [PIPE_FORMAT_R64_FLOAT]               = ISL_FORMAT_R64_FLOAT,
       [PIPE_FORMAT_R64G64_FLOAT]            = ISL_FORMAT_R64G64_FLOAT,
       [PIPE_FORMAT_R64G64B64_FLOAT]         = ISL_FORMAT_R64G64B64_FLOAT,
@@ -167,7 +170,6 @@ iris_isl_format_for_pipe_format(enum pipe_format pf)
       [PIPE_FORMAT_R10G10B10A2_USCALED]     = ISL_FORMAT_R10G10B10A2_USCALED,
       [PIPE_FORMAT_R11G11B10_FLOAT]         = ISL_FORMAT_R11G11B10_FLOAT,
       [PIPE_FORMAT_R9G9B9E5_FLOAT]          = ISL_FORMAT_R9G9B9E5_SHAREDEXP,
-      [PIPE_FORMAT_Z32_FLOAT_S8X24_UINT]    = ISL_FORMAT_R32_FLOAT_X8X24_TYPELESS,
       [PIPE_FORMAT_R1_UNORM]                = ISL_FORMAT_R1_UNORM,
       [PIPE_FORMAT_R10G10B10X2_USCALED]     = ISL_FORMAT_R10G10B10X2_USCALED,
       //[PIPE_FORMAT_R10G10B10X2_SNORM]       = ISL_FORMAT_R10G10B10X2_SNORM,