From 7cff8d85c0617d8bafa69d7f23ae124dcaa0969b Mon Sep 17 00:00:00 2001 From: Timothy Arceri Date: Wed, 5 Apr 2023 12:09:19 +1000 Subject: [PATCH] nir/glsl: add nir_var_declared_implicitly enum MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will be used in the following patch. Reviewed-by: Emma Anholt Reviewed-by: Marek Olšák Part-of: --- src/compiler/glsl/glsl_to_nir.cpp | 3 +++ src/compiler/nir/nir.h | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/src/compiler/glsl/glsl_to_nir.cpp b/src/compiler/glsl/glsl_to_nir.cpp index 50c02e34e77..8c96e914387 100644 --- a/src/compiler/glsl/glsl_to_nir.cpp +++ b/src/compiler/glsl/glsl_to_nir.cpp @@ -486,6 +486,9 @@ get_nir_how_declared(unsigned how_declared) if (how_declared == ir_var_hidden) return nir_var_hidden; + if (how_declared == ir_var_declared_implicitly) + return nir_var_declared_implicitly; + return nir_var_declared_normally; } diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 3e5188611de..a96e9b78567 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -430,6 +430,12 @@ typedef enum { */ nir_var_declared_normally = 0, + /** + * Variable is an implicitly declared built-in that has not been explicitly + * re-declared by the shader. + */ + nir_var_declared_implicitly, + /** * Variable is implicitly generated by the compiler and should not be * visible via the API.