r600/sfn: VS inputs are effectively SSA

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18619>
This commit is contained in:
Gert Wollny 2022-09-09 14:00:48 +02:00 committed by Marge Bot
parent f3415cb26a
commit 668167aac1
2 changed files with 3 additions and 2 deletions

View file

@ -162,8 +162,8 @@ void PeepholeVisitor::visit(IfInstr *instr)
if (src1.as_inline_const() &&
src1.as_inline_const()->sel() == ALU_SRC_0) {
auto src0 = pred->src(0).as_register();
if (src0 && src0->is_ssa()) {
assert(!src0->parents().empty());
if (src0 && src0->is_ssa() && !src0->parents().empty()) {
assert(src0->parents().size() == 1);
auto parent = *src0->parents().begin();
ReplaceIfPredicate visitor(pred);

View file

@ -485,6 +485,7 @@ bool VertexShader::load_input(nir_intrinsic_instr *intr)
for (unsigned i = 0; i < nir_dest_num_components(intr->dest); ++i) {
auto src = vf.allocate_pinned_register(driver_location + 1, i);
src->pin_live_range(true);
src->set_is_ssa(true);
if (intr->dest.is_ssa)
vf.inject_value(intr->dest, i, src);
else {