r600/llvm: Read stacksize from config header
authorVincent Lejeune <vljn@ovi.com>
Fri, 19 Apr 2013 18:10:44 +0000 (20:10 +0200)
committerVincent Lejeune <vljn@ovi.com>
Tue, 23 Apr 2013 17:52:29 +0000 (19:52 +0200)
src/gallium/drivers/r600/r600_llvm.c
src/gallium/drivers/r600/r600_llvm.h
src/gallium/drivers/r600/r600_shader.c
src/gallium/drivers/radeon/LLVM_REVISION.txt

index 35d6c9015d7659cbfbaf06c5617374e1b20dd115..8344fb0250931b5eebf3f7bc6ae2f710f357366e 100644 (file)
@@ -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;
 }
 
index afc6881d67e55659f00bfebc62b96db847771d79..b08343abd1d24aea2958e46a00b9d77c20951daf 100644 (file)
@@ -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 */
index 9e83ce6f5437da00730e30da23253300f5c2a338..606dbeaf987f34bc7246cb74b1b9b48ab198615e 100644 (file)
@@ -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;
index f7e8f7dca2a3327a355737a0b0fa7c864cdf71fd..f003aab3152c46b61ebb5542d0a30f053d23b005 100644 (file)
@@ -1 +1 @@
-@180123
+@180124