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 <apinheiro@igalia.com> Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
This commit is contained in:

committed by
Jason Ekstrand

parent
52dd43c7ef
commit
f393b10b3f
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user