diff options
author | Tom Stellard <[email protected]> | 2012-09-21 20:19:14 +0000 |
---|---|---|
committer | Tom Stellard <[email protected]> | 2012-09-25 14:36:50 +0000 |
commit | 0e3c30cd6f90db72044bb2d3311aa13a245cbcaf (patch) | |
tree | dc7a490153903325fcdfa8485976d543a31e8995 /src/gallium/drivers/r600/r600_pipe.c | |
parent | b57eba365496307c35373f5c303996731b994f25 (diff) |
gallium: Add PIPE_COMPUTE_CAP_MAX_MEM_ALLOC_SIZE v2
v2:
- Add comment in screen.rst
- Report OpenCL required minimum for r600g
Diffstat (limited to 'src/gallium/drivers/r600/r600_pipe.c')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index 77912326d0a..0a7b0ac2012 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -667,6 +667,22 @@ static int r600_get_compute_param(struct pipe_screen *screen, } 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); + /* OpenCL requres this value be at least + * max(MAX_GLOBAL_SIZE / 4, 128 * 1024 *1024) + * I'm really not sure what value to report here, but + * MAX_GLOBAL_SIZE / 4 seems resonable. + */ + *max_mem_alloc_size = max_global_size / 4; + } + return sizeof(uint64_t); + default: fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param); return 0; |