mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 01:00:10 +01:00
Revert "nir: Preserve offsets in lower_io_to_scalar_early"
This reverts commit96fa23bca5. The correct fix to the problem wasa1bc152340, making this change obsolete as the pass skips any vars marked with always_active_io. There was no real advantage to allowing these vars to be split because they can't be removed anyway. Also there is no way to split varying arrays gracefully here due to the xfb layout rules, and this change didn't handle arrays at all. Removing this obsolete code also fixes an assert in the new CTS test KHR-Single-GL45.enhanced_layouts.xfb_all_stages. The test was legally adding xfb offsets to all vertex stages but since we only mark the varyings in the final vertex stage with the always_active_io flag the other stages were correctly lowering to scalars but when an array with an offset hit this code it asserted since it couldn't handle it. Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Fixes:a1bc152340("spirv: mark variables decorated with XfbBuffer as always active") Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/6928 Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17878> (cherry picked from commit8bffd601ed)
This commit is contained in:
parent
515faea62b
commit
fe2f7c06ae
2 changed files with 1 additions and 9 deletions
|
|
@ -409,7 +409,7 @@
|
|||
"description": "Revert \"nir: Preserve offsets in lower_io_to_scalar_early\"",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": "a1bc1523408a305b14a8c297ea93a28bb12cee5d"
|
||||
},
|
||||
|
|
|
|||
|
|
@ -341,10 +341,6 @@ lower_load_to_scalar_early(nir_builder *b, nir_intrinsic_instr *intr,
|
|||
chan_var = nir_variable_clone(var, b->shader);
|
||||
chan_var->data.location_frac = var->data.location_frac + i;
|
||||
chan_var->type = glsl_channel_type(chan_var->type);
|
||||
if (var->data.explicit_offset) {
|
||||
unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
|
||||
chan_var->data.offset = var->data.offset + i * comp_size;
|
||||
}
|
||||
|
||||
chan_vars[var->data.location_frac + i] = chan_var;
|
||||
|
||||
|
|
@ -399,10 +395,6 @@ lower_store_output_to_scalar_early(nir_builder *b, nir_intrinsic_instr *intr,
|
|||
chan_var = nir_variable_clone(var, b->shader);
|
||||
chan_var->data.location_frac = var->data.location_frac + i;
|
||||
chan_var->type = glsl_channel_type(chan_var->type);
|
||||
if (var->data.explicit_offset) {
|
||||
unsigned comp_size = glsl_get_bit_size(chan_var->type) / 8;
|
||||
chan_var->data.offset = var->data.offset + i * comp_size;
|
||||
}
|
||||
|
||||
chan_vars[var->data.location_frac + i] = chan_var;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue