From 07ef39ddc61f94afa03b3cfb4e32903425949e87 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Thu, 31 Aug 2023 12:07:33 +1000 Subject: [PATCH] nir/gather: add support for fbfetch and bindless image loads. If a driver calls gather after lowering the uses_fbfetch_output needs to be set properly if we have bindless image loads. Fixes a regression seen calling gather info later in some llvmpipe work. Reviewed-by: Mike Blumenkrantz Part-of: --- src/compiler/nir/nir_gather_info.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/compiler/nir/nir_gather_info.c b/src/compiler/nir/nir_gather_info.c index 848887e1436..836e58be647 100644 --- a/src/compiler/nir/nir_gather_info.c +++ b/src/compiler/nir/nir_gather_info.c @@ -488,6 +488,15 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader, break; } + case nir_intrinsic_bindless_image_load: { + enum glsl_sampler_dim dim = nir_intrinsic_image_dim(instr); + if (dim != GLSL_SAMPLER_DIM_SUBPASS && + dim != GLSL_SAMPLER_DIM_SUBPASS_MS) + break; + shader->info.fs.uses_fbfetch_output = true; + break; + } + case nir_intrinsic_load_input: case nir_intrinsic_load_per_vertex_input: case nir_intrinsic_load_input_vertex: