diff options
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r-- | src/glsl/nir/nir.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h index bf5d41d43a9..0c06d675a4d 100644 --- a/src/glsl/nir/nir.h +++ b/src/glsl/nir/nir.h @@ -1454,6 +1454,37 @@ typedef struct nir_shader_compiler_options { bool native_integers; } nir_shader_compiler_options; +typedef struct nir_shader_info { + const char *name; + + /* Number of textures used by this shader */ + unsigned num_textures; + /* Number of uniform buffers used by this shader */ + unsigned num_ubos; + /* Number of atomic buffers used by this shader */ + unsigned num_abos; + /* Number of shader storage buffers used by this shader */ + unsigned num_ssbos; + /* Number of images used by this shader */ + unsigned num_images; + + /* Which inputs are actually read */ + uint64_t inputs_read; + /* Which outputs are actually written */ + uint64_t outputs_written; + /* Which system values are actually read */ + uint64_t system_values_read; + + /* Whether or not this shader ever uses textureGather() */ + bool uses_texture_gather; + + /* Whether or not this shader uses the gl_ClipDistance output */ + bool uses_clip_distance_out; + + /* Whether or not separate shader objects were used */ + bool separate_shader; +} nir_shader_info; + typedef struct nir_shader { /** list of uniforms (nir_variable) */ struct exec_list uniforms; @@ -1471,6 +1502,9 @@ typedef struct nir_shader { */ const struct nir_shader_compiler_options *options; + /** Various bits of compile-time information about a given shader */ + struct nir_shader_info info; + /** list of global variables in the shader (nir_variable) */ struct exec_list globals; |