Mesa (master): r600/sfn: use new temp register allocation when loading single value temporaries

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Apr 21 15:20:09 UTC 2020


Module: Mesa
Branch: master
Commit: cc239207463916e992367e9f53351883bf82ea06
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cc239207463916e992367e9f53351883bf82ea06

Author: Gert Wollny <gert.wollny at collabora.com>
Date:   Sun Apr 12 16:54:03 2020 +0200

r600/sfn: use new temp register allocation when loading single value temporaries

Signed-off-by: Gert Wollny <gert.wollny at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4609>

---

 src/gallium/drivers/r600/sfn/sfn_shader_base.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp b/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp
index e0aeb887083..a1336fb242e 100644
--- a/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_shader_base.cpp
@@ -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;



More information about the mesa-commit mailing list