summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2018-11-27 21:31:42 -0600
committerJason Ekstrand <[email protected]>2019-01-08 00:38:30 +0000
commitf393b10b3f8713d658240bc889b7dbb455ef2d42 (patch)
tree0e8870240b2d98dfe793d3975263b76e20da0434 /src/compiler/nir/nir.h
parent52dd43c7ef39ab2432449a557660260e054f262a (diff)
nir/lower_io: Add "explicit" IO lowering
This new pass is for lowering explicitly laid out memory coming in from SPIR-V or a similar source. It's quite a bit more complicated than the normal lower_io because we have to be able to handle matrices. The way the stride information is stored for matrices is awkward and dealing with row-major matrices is especially painful. Reviewed-by: Alejandro PiƱeiro <[email protected]> Reviewed-by: Caio Marcelo de Oliveira Filho <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 29b4da22330..553410b92d1 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2896,6 +2896,18 @@ bool nir_lower_io(nir_shader *shader,
nir_variable_mode modes,
int (*type_size)(const struct glsl_type *),
nir_lower_io_options);
+
+typedef enum {
+ /**
+ * An address format which is comprised of a vec2 where the first
+ * component is a vulkan descriptor index and the second is an offset.
+ */
+ nir_address_format_vk_index_offset,
+} nir_address_format;
+bool nir_lower_explicit_io(nir_shader *shader,
+ nir_variable_mode modes,
+ nir_address_format);
+
nir_src *nir_get_io_offset_src(nir_intrinsic_instr *instr);
nir_src *nir_get_io_vertex_index_src(nir_intrinsic_instr *instr);