mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 13:50:11 +01:00
nir: Handle cooperative matrix in various passes
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23825>
This commit is contained in:
parent
3105d516d0
commit
af3eb80afa
4 changed files with 10 additions and 1 deletions
|
|
@ -215,6 +215,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
|
|||
case nir_intrinsic_load_poly_line_smooth_enabled:
|
||||
case nir_intrinsic_load_rasterization_primitive_amd:
|
||||
case nir_intrinsic_load_global_constant_uniform_block_intel:
|
||||
case nir_intrinsic_cmat_length:
|
||||
is_divergent = false;
|
||||
break;
|
||||
|
||||
|
|
@ -608,6 +609,7 @@ visit_intrinsic(nir_shader *shader, nir_intrinsic_instr *instr)
|
|||
case nir_intrinsic_rq_proceed:
|
||||
case nir_intrinsic_rq_load:
|
||||
case nir_intrinsic_load_ray_triangle_vertex_positions:
|
||||
case nir_intrinsic_cmat_extract:
|
||||
is_divergent = true;
|
||||
break;
|
||||
|
||||
|
|
|
|||
|
|
@ -152,6 +152,9 @@ lower_indirect_derefs_block(nir_block *block, nir_builder *b,
|
|||
if (!has_indirect || !base || indirect_array_len > max_lower_array_len)
|
||||
continue;
|
||||
|
||||
if (glsl_type_is_cmat(base->type))
|
||||
continue;
|
||||
|
||||
/* Only lower variables whose mode is in the mask, or compact
|
||||
* array variables. (We can't handle indirects on tightly packed
|
||||
* scalar arrays, so we need to lower them regardless.)
|
||||
|
|
|
|||
|
|
@ -2454,7 +2454,8 @@ lower_vars_to_explicit(nir_shader *shader,
|
|||
glsl_type_is_struct_or_ifc(explicit_type) &&
|
||||
glsl_get_length(explicit_type) == 0;
|
||||
|
||||
assert(util_is_power_of_two_nonzero(align) || is_empty_struct);
|
||||
assert(util_is_power_of_two_nonzero(align) || is_empty_struct ||
|
||||
glsl_type_is_cmat(glsl_without_array(explicit_type)));
|
||||
var->data.driver_location = ALIGN_POT(offset, align);
|
||||
offset = var->data.driver_location + size;
|
||||
progress = true;
|
||||
|
|
|
|||
|
|
@ -222,6 +222,9 @@ get_deref_node(nir_deref_instr *deref, struct lower_variables_state *state)
|
|||
if (!nir_deref_mode_must_be(deref, nir_var_function_temp))
|
||||
return NULL;
|
||||
|
||||
if (glsl_type_is_cmat(deref->type))
|
||||
return NULL;
|
||||
|
||||
struct deref_node *node = get_deref_node_recur(deref, state);
|
||||
if (!node)
|
||||
return NULL;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue