From: Kenneth Graunke Date: Fri, 5 Oct 2018 02:34:34 +0000 (-0700) Subject: iris: fix Z32_S8 depth sampling X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9b229d266df169a58199fd86ac15bf709984dbe5;p=mesa.git iris: fix Z32_S8 depth sampling 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 --- diff --git a/src/gallium/drivers/iris/iris_formats.c b/src/gallium/drivers/iris/iris_formats.c index 2b1950eaf7e..fa77b5bcf67 100644 --- a/src/gallium/drivers/iris/iris_formats.c +++ b/src/gallium/drivers/iris/iris_formats.c @@ -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,