nir: add type information to load uniform/input and store output intrinsics
This type information will be used by gather_ssa_types to get usable results Signed-off-by: Jonathan Marek <jonathan@marek.ca> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
This commit is contained in:
@@ -775,6 +775,7 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
|
||||
[NIR_INTRINSIC_ALIGN_MUL] = "align_mul",
|
||||
[NIR_INTRINSIC_ALIGN_OFFSET] = "align_offset",
|
||||
[NIR_INTRINSIC_DESC_TYPE] = "desc_type",
|
||||
[NIR_INTRINSIC_TYPE] = "type",
|
||||
};
|
||||
for (unsigned idx = 1; idx < NIR_INTRINSIC_NUM_INDEX_FLAGS; idx++) {
|
||||
if (!info->index_map[idx])
|
||||
@@ -811,6 +812,21 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
|
||||
} else if (idx == NIR_INTRINSIC_DESC_TYPE) {
|
||||
VkDescriptorType desc_type = nir_intrinsic_desc_type(instr);
|
||||
fprintf(fp, " desc_type=%s", vulkan_descriptor_type_name(desc_type));
|
||||
} else if (idx == NIR_INTRINSIC_TYPE) {
|
||||
nir_alu_type type = nir_intrinsic_type(instr);
|
||||
unsigned size = nir_alu_type_get_type_size(type);
|
||||
const char *name;
|
||||
switch (nir_alu_type_get_base_type(type)) {
|
||||
case nir_type_int: name = "int"; break;
|
||||
case nir_type_uint: name = "uint"; break;
|
||||
case nir_type_bool: name = "bool"; break;
|
||||
case nir_type_float: name = "float"; break;
|
||||
default: name = "invalid";
|
||||
}
|
||||
if (size)
|
||||
fprintf(fp, " type=%s%u", name, size);
|
||||
else
|
||||
fprintf(fp, " type=%s", name);
|
||||
} else {
|
||||
unsigned off = info->index_map[idx] - 1;
|
||||
assert(index_name[idx]); /* forgot to update index_name table? */
|
||||
|
Reference in New Issue
Block a user