mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 08:40:11 +01:00
i965/nir/vec4: Lower "vecN" instructions and mark them unreachable
This enables NIR pass "lower_vec_to_movs" on shaders that work on vec4. Reviewed-by: Jason Ekstrand <jason.ekstrand@intel.com>
This commit is contained in:
parent
79154d99d6
commit
e4f02f47e7
2 changed files with 10 additions and 0 deletions
|
|
@ -175,6 +175,11 @@ brw_create_nir(struct brw_context *brw,
|
|||
nir_convert_from_ssa(nir, is_scalar);
|
||||
nir_validate_shader(nir);
|
||||
|
||||
if (!is_scalar) {
|
||||
nir_lower_vec_to_movs(nir);
|
||||
nir_validate_shader(nir);
|
||||
}
|
||||
|
||||
/* This is the last pass we run before we start emitting stuff. It
|
||||
* determines when we need to insert boolean resolves on Gen <= 5. We
|
||||
* run it last because it stashes data in instr->pass_flags and we don't
|
||||
|
|
|
|||
|
|
@ -677,6 +677,11 @@ vec4_visitor::nir_emit_alu(nir_alu_instr *instr)
|
|||
inst->saturate = instr->dest.saturate;
|
||||
break;
|
||||
|
||||
case nir_op_vec2:
|
||||
case nir_op_vec3:
|
||||
case nir_op_vec4:
|
||||
unreachable("not reached: should be handled by lower_vec_to_movs()");
|
||||
|
||||
default:
|
||||
unreachable("Unimplemented ALU operation");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue