From 606db8cc400a2233f9e634ea7dbffc421e9eb2b8 Mon Sep 17 00:00:00 2001 From: "Thomas H.P. Andersen" Date: Tue, 11 Jul 2023 18:22:32 +0200 Subject: [PATCH] tgsi: remove unused tgsi_shader_info.uses_bindless_image_atomic Reviewed-by: Charmaine Lee Reviewed-by: Christian Gmeiner Part-of: --- src/gallium/auxiliary/nir/nir_to_tgsi_info.c | 3 --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 18 ------------------ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 - 3 files changed, 22 deletions(-) diff --git a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c index 6197a9d..03b19bb 100644 --- a/src/gallium/auxiliary/nir/nir_to_tgsi_info.c +++ b/src/gallium/auxiliary/nir/nir_to_tgsi_info.c @@ -211,9 +211,6 @@ static void scan_instruction(const struct nir_shader *nir, break; case nir_intrinsic_bindless_image_atomic: case nir_intrinsic_bindless_image_atomic_swap: - if (nir_intrinsic_image_dim(intr) != GLSL_SAMPLER_DIM_BUF) - info->uses_bindless_image_atomic = true; - info->writes_memory = true; break; case nir_intrinsic_image_deref_atomic: diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index 98ea3c9..a9e239e 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -252,24 +252,6 @@ scan_instruction(struct tgsi_shader_info *info, case TGSI_OPCODE_ENDLOOP: (*current_depth)--; break; - case TGSI_OPCODE_ATOMUADD: - case TGSI_OPCODE_ATOMXCHG: - case TGSI_OPCODE_ATOMCAS: - case TGSI_OPCODE_ATOMAND: - case TGSI_OPCODE_ATOMOR: - case TGSI_OPCODE_ATOMXOR: - case TGSI_OPCODE_ATOMUMIN: - case TGSI_OPCODE_ATOMUMAX: - case TGSI_OPCODE_ATOMIMIN: - case TGSI_OPCODE_ATOMIMAX: - case TGSI_OPCODE_ATOMFADD: - case TGSI_OPCODE_ATOMINC_WRAP: - case TGSI_OPCODE_ATOMDEC_WRAP: - if (tgsi_is_bindless_image_file(fullinst->Src[0].Register.File)) { - if (fullinst->Memory.Texture != TGSI_TEXTURE_BUFFER) - info->uses_bindless_image_atomic = true; - } - break; case TGSI_OPCODE_FBFETCH: info->uses_fbfetch = true; break; diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index 43b8a6e..260fac8 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -119,7 +119,6 @@ struct tgsi_shader_info unsigned shader_buffers_load; /**< bitmask of shader buffers using loads */ unsigned shader_buffers_store; /**< bitmask of shader buffers using stores */ unsigned shader_buffers_atomic; /**< bitmask of shader buffers using atomics */ - bool uses_bindless_image_atomic; unsigned hw_atomic_declared; /**< bitmask of declared atomic_counter */ /** -- 2.7.4