mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nir/gather_info: check copy_deref instrs for writing outputs
this is a valid way to write an output even though it usually gets rewritten to some other instruction later on Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15228>
This commit is contained in:
parent
fdee7240ff
commit
0d80aed363
1 changed files with 6 additions and 1 deletions
|
|
@ -196,6 +196,10 @@ get_io_offset(nir_deref_instr *deref, nir_variable *var, bool is_arrayed,
|
|||
bool skip_non_arrayed)
|
||||
{
|
||||
if (var->data.compact) {
|
||||
if (deref->deref_type == nir_deref_type_var) {
|
||||
assert(glsl_type_is_array(var->type));
|
||||
return 0;
|
||||
}
|
||||
assert(deref->deref_type == nir_deref_type_array);
|
||||
return nir_src_is_const(deref->arr.index) ?
|
||||
(nir_src_as_uint(deref->arr.index) + var->data.location_frac) / 4u :
|
||||
|
|
@ -491,7 +495,8 @@ gather_intrinsic_info(nir_intrinsic_instr *instr, nir_shader *shader,
|
|||
case nir_intrinsic_interp_deref_at_offset:
|
||||
case nir_intrinsic_interp_deref_at_vertex:
|
||||
case nir_intrinsic_load_deref:
|
||||
case nir_intrinsic_store_deref:{
|
||||
case nir_intrinsic_store_deref:
|
||||
case nir_intrinsic_copy_deref:{
|
||||
nir_deref_instr *deref = nir_src_as_deref(instr->src[0]);
|
||||
if (nir_deref_mode_is_one_of(deref, nir_var_shader_in |
|
||||
nir_var_shader_out)) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue