Mesa (master): vc4: Fix a typo in the validation for miplevels.

Eric Anholt anholt at kemper.freedesktop.org
Fri Aug 22 17:19:14 UTC 2014


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

Author: Eric Anholt <eric at anholt.net>
Date:   Wed Aug 20 10:59:38 2014 -0700

vc4: Fix a typo in the validation for miplevels.

It meant that LUMALPHA was being marked as *many* miplevels, and
unsurprisingly wouldn't validate.  On the other hand, some miplevel counts
wouldn't get the small mips validated at all.

---

 src/gallium/drivers/vc4/vc4_simulator_validate.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/vc4/vc4_simulator_validate.c b/src/gallium/drivers/vc4/vc4_simulator_validate.c
index ac5be89..c062d8a 100644
--- a/src/gallium/drivers/vc4/vc4_simulator_validate.c
+++ b/src/gallium/drivers/vc4/vc4_simulator_validate.c
@@ -703,7 +703,7 @@ reloc_tex(struct exec_info *exec,
 	uint32_t p1 = *(uint32_t *)(uniform_data_u + sample->p_offset[1]);
 	uint32_t *validated_p0 = exec->uniforms_v + sample->p_offset[0];
 	uint32_t offset = p0 & ~0xfff;
-	uint32_t miplevels = (p0 & 0x15);
+	uint32_t miplevels = (p0 & 15);
 	uint32_t width = (p1 >> 8) & 2047;
 	uint32_t height = (p1 >> 20) & 2047;
 	uint32_t cpp, tiling_format;




More information about the mesa-commit mailing list