r600g/llvm: Use gprcount from llvm
authorVincent Lejeune <vljn@ovi.com>
Sat, 13 Apr 2013 14:36:02 +0000 (16:36 +0200)
committerVincent Lejeune <vljn@ovi.com>
Wed, 17 Apr 2013 15:24:29 +0000 (17:24 +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 e605e6bec4c60f7bb85550dd47fc7bd0fc3b0a1f..35d6c9015d7659cbfbaf06c5617374e1b20dd115 100644 (file)
@@ -555,6 +555,7 @@ unsigned r600_llvm_compile(
        unsigned char ** inst_bytes,
        unsigned * inst_byte_count,
        enum radeon_family family,
+       unsigned *ngpr,
        unsigned dump)
 {
        unsigned r;
@@ -563,6 +564,7 @@ unsigned r600_llvm_compile(
        r = radeon_llvm_compile(mod, &binary, gpu_family, dump);
        *inst_bytes = binary.code;
        *inst_byte_count = binary.code_size;
+       *ngpr = util_le32_to_cpu(*(uint32_t*)binary.config);
        return r;
 }
 
index b5e2af2afed3bf1c47baa9cc3315e7c5bb7bc7d6..afc6881d67e55659f00bfebc62b96db847771d79 100644 (file)
@@ -20,6 +20,7 @@ unsigned r600_llvm_compile(
        unsigned char ** inst_bytes,
        unsigned * inst_byte_count,
        enum radeon_family family,
+       unsigned *ngpr,
        unsigned dump);
 
 #endif /* defined R600_USE_LLVM || defined HAVE_OPENCL */
index 5ac8c095183f2fede50706054a8357750ba9917f..465186d8a494d7c35eed8dc8614a3994f32e1aa6 100644 (file)
@@ -1461,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, dump)) {
+                                     rscreen->family, &ctx.bc->ngpr, dump)) {
                        FREE(inst_bytes);
                        radeon_llvm_dispose(&radeon_llvm_ctx);
                        use_llvm = 0;
index 3ff06020b4f7741e97c1c55ee6e53c1074d6a2ba..b633ea63610bc20c5888787ea501b11d2175caa8 100644 (file)
@@ -1 +1 @@
-@179546
+@179684