diff options
author | Nicolai Hähnle <[email protected]> | 2016-09-09 10:08:11 +0200 |
---|---|---|
committer | Nicolai Hähnle <[email protected]> | 2016-10-10 10:36:42 +0200 |
commit | 77c81164bc1cd9ec98b32c40753f590791450434 (patch) | |
tree | 10f8468ceb6de6cbf56cba29a457a7098085a1e9 /src/gallium/drivers/radeon | |
parent | 014bd4acb8b130fb31ec00f6125b8a91881bebdf (diff) |
radeonsi: support ARB_compute_variable_group_size
Not sure if it's possible to avoid programming the block size twice (once for
the userdata and once for the dispatch).
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeon')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 10 | ||||
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 44863eeca65..3dbcbc67247 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -1037,7 +1037,15 @@ static int r600_get_compute_param(struct pipe_screen *screen, } return sizeof(uint32_t); case PIPE_COMPUTE_CAP_MAX_VARIABLE_THREADS_PER_BLOCK: - return 0; + if (ret) { + uint64_t *max_variable_threads_per_block = ret; + if (rscreen->chip_class >= SI && HAVE_LLVM >= 0x309 && + ir_type == PIPE_SHADER_IR_TGSI) + *max_variable_threads_per_block = SI_MAX_VARIABLE_THREADS_PER_BLOCK; + else + *max_variable_threads_per_block = 0; + } + return sizeof(uint64_t); } fprintf(stderr, "unknown PIPE_COMPUTE_CAP %d\n", param); diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 54991e87f4c..290b228b73f 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -106,6 +106,8 @@ #define R600_MAP_BUFFER_ALIGNMENT 64 #define R600_MAX_VIEWPORTS 16 +#define SI_MAX_VARIABLE_THREADS_PER_BLOCK 1024 + enum r600_coherency { R600_COHERENCY_NONE, /* no cache flushes needed */ R600_COHERENCY_SHADER, |