From 1dff4dcb0b6469d32582739dbab3d59d46cdaf3d Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Wed, 20 Aug 2025 13:41:22 -0400 Subject: [PATCH] ir3: Use common shading rate lookup table This should be identical to the old one. Part-of: --- src/freedreno/ir3/ir3_nir_lower_shading_rate.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/freedreno/ir3/ir3_nir_lower_shading_rate.c b/src/freedreno/ir3/ir3_nir_lower_shading_rate.c index 0b1e52ea733..fad81e433a0 100644 --- a/src/freedreno/ir3/ir3_nir_lower_shading_rate.c +++ b/src/freedreno/ir3/ir3_nir_lower_shading_rate.c @@ -5,18 +5,7 @@ #include "compiler/nir/nir_builder.h" #include "ir3_nir.h" - -/* Values written in VS/GS to gl_PrimitiveShadingRateEXT have to - * be translated into HW internal representation. - */ -static const uint32_t vk_to_hw_shading_rate_lut[] = { - 0, 4, 8, 11, 1, 5, 9, 11, 2, 6, 10, 11, 11, 11, 11, 11}; - -/* Values read from gl_ShadingRateEXT in FS have to be translated from - * HW representation. - */ -static const uint32_t hw_to_vk_shading_rate_lut[] = { - 0, 4, 8, 11, 1, 5, 9, 11, 2, 6, 10, 11, 11, 11, 11, 11}; +#include "common/freedreno_vrs.h" static nir_deref_instr * create_lut(nir_builder *b, const uint32_t *lut, uint32_t lut_size,