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

Author: Vincent Lejeune <[email protected]>
Date:   Fri Apr 19 20:10:44 2013 +0200

r600/llvm: Read stacksize from config header

---

 src/gallium/drivers/r600/r600_llvm.c         |    2 ++
 src/gallium/drivers/r600/r600_llvm.h         |    1 +
 src/gallium/drivers/r600/r600_shader.c       |    3 +--
 src/gallium/drivers/radeon/LLVM_REVISION.txt |    2 +-
 4 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/r600_llvm.c 
b/src/gallium/drivers/r600/r600_llvm.c
index 35d6c90..8344fb0 100644
--- a/src/gallium/drivers/r600/r600_llvm.c
+++ b/src/gallium/drivers/r600/r600_llvm.c
@@ -556,6 +556,7 @@ unsigned r600_llvm_compile(
        unsigned * inst_byte_count,
        enum radeon_family family,
        unsigned *ngpr,
+       unsigned *stack_size,
        unsigned dump)
 {
        unsigned r;
@@ -565,6 +566,7 @@ unsigned r600_llvm_compile(
        *inst_bytes = binary.code;
        *inst_byte_count = binary.code_size;
        *ngpr = util_le32_to_cpu(*(uint32_t*)binary.config);
+       *stack_size = util_le32_to_cpu(*(uint32_t*)binary.config + 4);
        return r;
 }
 
diff --git a/src/gallium/drivers/r600/r600_llvm.h 
b/src/gallium/drivers/r600/r600_llvm.h
index afc6881..b08343a 100644
--- a/src/gallium/drivers/r600/r600_llvm.h
+++ b/src/gallium/drivers/r600/r600_llvm.h
@@ -21,6 +21,7 @@ unsigned r600_llvm_compile(
        unsigned * inst_byte_count,
        enum radeon_family family,
        unsigned *ngpr,
+       unsigned *stack_size,
        unsigned dump);
 
 #endif /* defined R600_USE_LLVM || defined HAVE_OPENCL */
diff --git a/src/gallium/drivers/r600/r600_shader.c 
b/src/gallium/drivers/r600/r600_shader.c
index 9e83ce6..606dbea 100644
--- a/src/gallium/drivers/r600/r600_shader.c
+++ b/src/gallium/drivers/r600/r600_shader.c
@@ -591,7 +591,6 @@ static void r600_bytecode_from_byte_stream(struct 
r600_shader_ctx *ctx,
                                unsigned char * bytes,  unsigned num_bytes)
 {
        unsigned bytes_read = 0;
-       ctx->bc->nstack = bytes[bytes_read++];
        unsigned i, byte;
        while (bytes_read < num_bytes) {
                char inst_type = bytes[bytes_read++];
@@ -1462,7 +1461,7 @@ static int r600_shader_from_tgsi(struct r600_screen 
*rscreen,
                mod = r600_tgsi_llvm(&radeon_llvm_ctx, tokens);
 
                if (r600_llvm_compile(mod, &inst_bytes, &inst_byte_count,
-                                     rscreen->family, &ctx.bc->ngpr, dump)) {
+                                     rscreen->family, &ctx.bc->ngpr, 
&ctx.bc->nstack, dump)) {
                        FREE(inst_bytes);
                        radeon_llvm_dispose(&radeon_llvm_ctx);
                        use_llvm = 0;
diff --git a/src/gallium/drivers/radeon/LLVM_REVISION.txt 
b/src/gallium/drivers/radeon/LLVM_REVISION.txt
index f7e8f7d..f003aab 100644
--- a/src/gallium/drivers/radeon/LLVM_REVISION.txt
+++ b/src/gallium/drivers/radeon/LLVM_REVISION.txt
@@ -1 +1 @@
-@180123
+@180124

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

Reply via email to