summaryrefslogtreecommitdiffstats
path: root/src/glsl/nir/nir.h
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-11-07 22:35:33 -0800
committerKenneth Graunke <[email protected]>2015-11-13 15:15:46 -0800
commit26f9469a46585f64b24fb1037aaae7c757a5e6e1 (patch)
tree962a004e13f5d893097e6a2c905620189ea6e5b7 /src/glsl/nir/nir.h
parentd12bde0944d1d69401ef1d854aa0ab92b5a6af54 (diff)
nir: Add helpers for getting input/output intrinsic sources.
With the many variants of IO intrinsics, particular sources are often in different locations. It's convenient to say "give me the indirect offset" or "give me the vertex index" and have it just work, without having to think about exactly which kind of intrinsic you have. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/glsl/nir/nir.h')
-rw-r--r--src/glsl/nir/nir.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/glsl/nir/nir.h b/src/glsl/nir/nir.h
index 4ed2cbd2b67..beabcafef4e 100644
--- a/src/glsl/nir/nir.h
+++ b/src/glsl/nir/nir.h
@@ -1933,6 +1933,9 @@ void nir_assign_var_locations(struct exec_list *var_list,
void nir_lower_io(nir_shader *shader,
nir_variable_mode mode,
int (*type_size)(const struct glsl_type *));
+nir_src *nir_get_io_indirect_src(nir_intrinsic_instr *instr);
+nir_src *nir_get_io_vertex_index_src(nir_intrinsic_instr *instr);
+
void nir_lower_vars_to_ssa(nir_shader *shader);
bool nir_remove_dead_variables(nir_shader *shader);