From 1e4c6e059e3060eed7ee4f925029d2fb1669ba2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Sch=C3=BCrmann?= Date: Tue, 2 Nov 2021 14:29:47 +0100 Subject: [PATCH] nir/fold_16bit_sampler_conversions: skip sparse residency tex instructions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The residency return value mismatches between NIR and Radeon. Reviewed-by: Marek Olšák Reviewed-by: Rhys Perry Part-of: --- src/compiler/nir/nir_lower_mediump.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/compiler/nir/nir_lower_mediump.c b/src/compiler/nir/nir_lower_mediump.c index 4df1cce2472..49319dd24b5 100644 --- a/src/compiler/nir/nir_lower_mediump.c +++ b/src/compiler/nir/nir_lower_mediump.c @@ -437,6 +437,10 @@ nir_fold_16bit_sampler_conversions(nir_shader *nir, nir_instr *src; nir_alu_instr *src_alu; + /* Skip sparse residency */ + if (tex->is_sparse) + continue; + /* Skip because AMD doesn't support 16-bit types with these. */ if ((tex->op == nir_texop_txs || tex->op == nir_texop_query_levels) ||