Mesa (master): freedreno/a6xx: don't emit a bogus size for empty cb slots

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jul 29 20:36:21 UTC 2020


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

Author: Rob Clark <robdclark at chromium.org>
Date:   Wed Jul 29 09:09:19 2020 -0700

freedreno/a6xx: don't emit a bogus size for empty cb slots

Noticed that asphalt9 had no uniforms bound, so cb[0] is null.  In
theory shouldn't cause a problem, since nothing is doing `ldc` against
cb[0], but to be safe we should use SIZE=0.

Signed-off-by: Rob Clark <robdclark at chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6117>

---

 src/gallium/drivers/freedreno/a6xx/fd6_const.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/freedreno/a6xx/fd6_const.c b/src/gallium/drivers/freedreno/a6xx/fd6_const.c
index e2c982d8226..bfe2fec9683 100644
--- a/src/gallium/drivers/freedreno/a6xx/fd6_const.c
+++ b/src/gallium/drivers/freedreno/a6xx/fd6_const.c
@@ -273,7 +273,7 @@ fd6_emit_ubos(struct fd_context *ctx, const struct ir3_shader_variant *v,
 					0);
 		} else {
 			OUT_RING(ring, 0xbad00000 | (i << 16));
-			OUT_RING(ring, 0xbad00000 | (i << 16));
+			OUT_RING(ring, A6XX_UBO_1_SIZE(0));
 		}
 	}
 }



More information about the mesa-commit mailing list