r600/sfn: use new temp register allocation when loading single value temporaries
authorGert Wollny <gert.wollny@collabora.com>
Sun, 12 Apr 2020 14:54:03 +0000 (16:54 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Apr 2020 15:10:43 +0000 (15:10 +0000)
Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>

src/gallium/drivers/r600/sfn/sfn_shader_base.cpp

index e0aeb887083c749a64cebb973e38e9e9cf533000..a1336fb242ec0abff9dd9b82dd3f768ec54a1fa1 100644 (file)
@@ -788,8 +788,7 @@ PValue ShaderFromNirProcessor::from_nir_with_fetch_constant(const nir_src& src,
    if (value->type() != Value::gpr &&
        value->type() != Value::gpr_vector &&
        value->type() != Value::gpr_array_value) {
-      unsigned temp = allocate_temp_register();
-      PValue retval(new GPRValue(temp, component));
+      PValue retval = get_temp_register();
       emit_instruction(new AluInstruction(op1_mov, retval, value,
                                           EmitInstruction::last_write));
       value = retval;