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

Author: Rob Clark <[email protected]>
Date:   Fri Aug 10 12:23:47 2018 -0400

freedreno/ir3: use r63.x for unused inputs

This way, unused sysval inputs, like frag_vcoord, get the correct regid
value to disable the input.

Signed-off-by: Rob Clark <[email protected]>

---

 src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c 
b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
index 0559ce2ceb..44ee5b2c4a 100644
--- a/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
+++ b/src/gallium/drivers/freedreno/ir3/ir3_compiler_nir.c
@@ -3725,14 +3725,14 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler,
        actual_in = 0;
        inloc = 0;
        for (i = 0; i < so->inputs_count; i++) {
-               unsigned j, regid = ~0, compmask = 0, maxcomp = 0;
+               unsigned j, reg = regid(63,0), compmask = 0, maxcomp = 0;
                so->inputs[i].ncomp = 0;
                so->inputs[i].inloc = inloc;
                for (j = 0; j < 4; j++) {
                        struct ir3_instruction *in = inputs[(i*4) + j];
                        if (in && !(in->flags & IR3_INSTR_UNUSED)) {
                                compmask |= (1 << j);
-                               regid = in->regs[0]->num - j;
+                               reg = in->regs[0]->num - j;
                                actual_in++;
                                so->inputs[i].ncomp++;
                                if ((so->type == SHADER_FRAGMENT) && 
so->inputs[i].bary) {
@@ -3750,7 +3750,7 @@ ir3_compile_shader_nir(struct ir3_compiler *compiler,
                } else if (!so->inputs[i].sysval) {
                        so->inputs[i].compmask = compmask;
                }
-               so->inputs[i].regid = regid;
+               so->inputs[i].regid = reg;
        }
 
        if (ctx->astc_srgb)

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to