radeonsi/compute: Bump number of user sgprs for LLVM 3.5
authorTom Stellard <thomas.stellard@amd.com>
Fri, 18 Jul 2014 18:40:50 +0000 (14:40 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:00:09 +0000 (10:00 -0400)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/drivers/radeonsi/si_compute.c

index 3a9f00fd41d59caeb2af55eb4794d2ed0b83bfe5..a7d61e7f7b8f2ed60335d91d50bf9d117e2c0a10 100644 (file)
 #include "radeon_llvm_util.h"
 
 #define MAX_GLOBAL_BUFFERS 20
+#if HAVE_LLVM < 0x0305
+#define NUM_USER_SGPRS 2
+#else
+#define NUM_USER_SGPRS 4
+#endif
 
 struct si_pipe_compute {
        struct si_context *ctx;
@@ -132,7 +137,7 @@ static void si_launch_grid(
        uint32_t *kernel_args;
        uint64_t kernel_args_va;
        uint64_t shader_va;
-       unsigned arg_user_sgpr_count = 2;
+       unsigned arg_user_sgpr_count = NUM_USER_SGPRS;
        unsigned i;
        struct si_pipe_shader *shader = &program->kernels[pc];
        unsigned lds_blocks;