mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-18 08:00:34 +01:00
radv: Remove radv_remove_varyings.
Not needed anymore, since we are now doing this on lowered I/O. Signed-off-by: Timur Kristóf <timur.kristof@gmail.com> Reviewed-by: Georg Lehmann <dadschoorse@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33928>
This commit is contained in:
parent
473ef0b6fb
commit
72ac874ba6
1 changed files with 0 additions and 41 deletions
|
|
@ -1504,37 +1504,6 @@ radv_pipeline_needs_noop_fs(struct radv_graphics_pipeline *pipeline, const struc
|
|||
return false;
|
||||
}
|
||||
|
||||
static void
|
||||
radv_remove_varyings(nir_shader *nir)
|
||||
{
|
||||
/* We can't demote mesh outputs to nir_var_shader_temp yet, because
|
||||
* they don't support array derefs of vectors.
|
||||
*/
|
||||
if (nir->info.stage == MESA_SHADER_MESH)
|
||||
return;
|
||||
|
||||
bool fixup_derefs = false;
|
||||
|
||||
nir_foreach_shader_out_variable (var, nir) {
|
||||
if (var->data.always_active_io)
|
||||
continue;
|
||||
|
||||
if (var->data.location < VARYING_SLOT_VAR0)
|
||||
continue;
|
||||
|
||||
nir->info.outputs_written &= ~BITFIELD64_BIT(var->data.location);
|
||||
var->data.location = 0;
|
||||
var->data.mode = nir_var_shader_temp;
|
||||
fixup_derefs = true;
|
||||
}
|
||||
|
||||
if (fixup_derefs) {
|
||||
NIR_PASS(_, nir, nir_fixup_deref_modes);
|
||||
NIR_PASS(_, nir, nir_remove_dead_variables, nir_var_shader_temp, NULL);
|
||||
NIR_PASS(_, nir, nir_opt_dce);
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
radv_graphics_shaders_link(const struct radv_device *device, const struct radv_graphics_state_key *gfx_state,
|
||||
struct radv_shader_stage *stages)
|
||||
|
|
@ -2853,16 +2822,6 @@ radv_graphics_shaders_compile(struct radv_device *device, struct vk_pipeline_cac
|
|||
NIR_PASS(_, stages[MESA_SHADER_GEOMETRY].nir, nir_lower_vars_to_ssa);
|
||||
}
|
||||
|
||||
/* Remove all varyings when the fragment shader is a noop. */
|
||||
if (noop_fs) {
|
||||
radv_foreach_stage (i, active_nir_stages) {
|
||||
if (radv_is_last_vgt_stage(&stages[i])) {
|
||||
radv_remove_varyings(stages[i].nir);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
radv_graphics_shaders_link(device, gfx_state, stages);
|
||||
|
||||
if (stages[MESA_SHADER_FRAGMENT].nir) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue