radeonsi/compute: Add missing PIPE_COMPUTE caps
authorTom Stellard <thomas.stellard@amd.com>
Tue, 14 May 2013 02:14:50 +0000 (22:14 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 3 Jun 2013 14:24:54 +0000 (10:24 -0400)
src/gallium/drivers/radeonsi/radeonsi_pipe.c

index 30254a8e1aafdf3c2e8fe064591704b6bc373072..382311f39bdb04adf29366ccd3d9e96066542406 100644 (file)
@@ -579,6 +579,22 @@ static int r600_get_compute_param(struct pipe_screen *screen,
                }
                return sizeof(uint64_t);
 
+       case PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE:
+               if (ret) {
+                       uint64_t *max_global_size = ret;
+                       /* XXX: Not sure what to put here. */
+                       *max_global_size = 2000000000;
+               }
+               return sizeof(uint64_t);
+
+       case PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE:
+               if (ret) {
+                       uint64_t max_global_size;
+                       uint64_t *max_mem_alloc_size = ret;
+                       r600_get_compute_param(screen, PIPE_COMPUTE_CAP_MAX_GLOBAL_SIZE, &max_global_size);
+                       *max_mem_alloc_size = max_global_size / 4;
+               }
+               return sizeof(uint64_t);
        default:
                fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param);
                return 0;