Mesa (master): nvc0: make sure that the local memory allocation is aligned to 0x10

Ilia Mirkin imirkin at kemper.freedesktop.org
Thu Jul 24 12:31:40 UTC 2014


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

Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Thu Jul 17 22:11:56 2014 -0400

nvc0: make sure that the local memory allocation is aligned to 0x10

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: <mesa-stable at lists.freedesktop.org>

---

 src/gallium/drivers/nouveau/nvc0/nvc0_program.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index 7e49b06..dbb7c55 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -629,7 +629,7 @@ nvc0_program_translate(struct nvc0_program *prog, uint16_t chipset)
    if (info->bin.tlsSpace) {
       assert(info->bin.tlsSpace < (1 << 24));
       prog->hdr[0] |= 1 << 26;
-      prog->hdr[1] |= info->bin.tlsSpace; /* l[] size */
+      prog->hdr[1] |= align(info->bin.tlsSpace, 0x10); /* l[] size */
       prog->need_tls = TRUE;
    }
    /* TODO: factor 2 only needed where joinat/precont is used,




More information about the mesa-commit mailing list