iris: Stop quantizing the depth clear value

Graphics / Mesa 3D Graphics Library / Mesa - Nanley Chery [] - 18 November 2020 23:20 UTC

This function has a number of problems:

1. It performs 24-bit quantization on a format which shouldn't be quantized at all (PIPE_FORMAT_Z32_FLOAT_S8X24_UINT). 2. The algorithm seems to create a different pixel than HW would in the absence of this SW conversion. This can cause issues with depth testing.

Instead of adding more code to deal with these issues, delete the quantization code.

This code originated from i965 (0ae9ce0f29ea1973b850a4e6c6cae8606973036e) and helped to avoid a regression in Lightsmark 2008. This change continues to avoid that regression because any new clear value is now casted from double to float before checking if the resource's clear value has changed.


0d3b61dd7e8 iris: Stop quantizing the depth clear value
src/gallium/drivers/iris/iris_clear.c | 21 ++-------------------
1 file changed, 2 insertions(+), 19 deletions(-)


  • Share