From 533a09541d52376d933a8f6c17eaa21f0ab4bcd9 Mon Sep 17 00:00:00 2001 From: Neha Bhende Date: Wed, 15 Dec 2021 17:01:56 -0800 Subject: [PATCH] tgsi: Add hw_atomic_declared in tgsi_info This patch also adds hw_atomic_declared info in tgsi_info. Reviewed-by: Charmaine Lee Part-of: --- src/gallium/auxiliary/tgsi/tgsi_scan.c | 4 ++++ src/gallium/auxiliary/tgsi/tgsi_scan.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.c b/src/gallium/auxiliary/tgsi/tgsi_scan.c index ecb3706edda..5fab72eb626 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.c +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.c @@ -663,6 +663,10 @@ scan_declaration(struct tgsi_shader_info *info, info->shader_buffers_declared |= 1u << reg; break; + case TGSI_FILE_HW_ATOMIC: + info->hw_atomic_declared |= 1u << reg; + break; + case TGSI_FILE_INPUT: info->input_semantic_name[reg] = (ubyte) semName; info->input_semantic_index[reg] = (ubyte) semIndex; diff --git a/src/gallium/auxiliary/tgsi/tgsi_scan.h b/src/gallium/auxiliary/tgsi/tgsi_scan.h index ace5b08872d..076c138e4a0 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_scan.h +++ b/src/gallium/auxiliary/tgsi/tgsi_scan.h @@ -164,6 +164,7 @@ struct tgsi_shader_info bool uses_bindless_image_store; bool uses_bindless_image_atomic; + unsigned hw_atomic_declared; /**< bitmask of declared atomic_counter */ /** * Bitmask indicating which register files are accessed with * indirect addressing. The bits are (1 << TGSI_FILE_x), etc.