freedreno/ir3: fixup register footprint fixup
authorRob Clark <robdclark@chromium.org>
Mon, 21 Oct 2019 23:33:50 +0000 (16:33 -0700)
committerRob Clark <robdclark@gmail.com>
Tue, 22 Oct 2019 17:46:19 +0000 (17:46 +0000)
Small typo resulted in not converting footprint to vec4, meaning that we
could potentially ask for quite a few more registers than required

Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Kristian H. Kristensen <hoegsberg@google.com>
src/freedreno/ir3/ir3_shader.c

index 4e1b1081764791a4db8708955b9621ad79c8c4b5..7a0c28fd1a3776c339270cf7fc0869d754dc99de 100644 (file)
@@ -118,7 +118,7 @@ fixup_regfootprint(struct ir3_shader_variant *v, uint32_t gpu_id)
                                v->info.max_reg = MAX2(v->info.max_reg, regid >> 3);
                        }
                } else {
-                       v->info.max_reg = MAX2(v->info.max_reg, regid);
+                       v->info.max_reg = MAX2(v->info.max_reg, regid >> 2);
                }
        }
 }