diff options
author | Bas Nieuwenhuizen <[email protected]> | 2016-04-20 15:31:22 +0200 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2016-04-21 00:27:01 +0200 |
commit | 43ed1f73f8bb351b6eaec66875c51f2bad9db4eb (patch) | |
tree | 2f13870d86603f53913c077f6745b4a41930e4a3 /src/mesa | |
parent | 60a17d071825da4a06303cb699e4417edaaa6386 (diff) |
st/mesa: Use correct size for compute CAPs.
Some CAPs are stored as 64-bit value while Mesa stores
the related constant as 32-bit value.
Signed-off-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_extensions.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c index 939f15d5e9f..3f769b62dd4 100644 --- a/src/mesa/state_tracker/st_extensions.c +++ b/src/mesa/state_tracker/st_extensions.c @@ -1152,6 +1152,7 @@ void st_init_extensions(struct pipe_screen *screen, PIPE_SHADER_CAP_SUPPORTED_IRS); if (compute_supported_irs & (1 << PIPE_SHADER_IR_TGSI)) { uint64_t grid_size[3], block_size[3]; + uint64_t max_local_size, max_threads_per_block; screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI, PIPE_COMPUTE_CAP_MAX_GRID_SIZE, grid_size); @@ -1159,10 +1160,13 @@ void st_init_extensions(struct pipe_screen *screen, PIPE_COMPUTE_CAP_MAX_BLOCK_SIZE, block_size); screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI, PIPE_COMPUTE_CAP_MAX_THREADS_PER_BLOCK, - &consts->MaxComputeWorkGroupInvocations); + &max_threads_per_block); screen->get_compute_param(screen, PIPE_SHADER_IR_TGSI, PIPE_COMPUTE_CAP_MAX_LOCAL_SIZE, - &consts->MaxComputeSharedMemorySize); + &max_local_size); + + consts->MaxComputeWorkGroupInvocations = max_threads_per_block; + consts->MaxComputeSharedMemorySize = max_local_size; for (i = 0; i < 3; i++) { consts->MaxComputeWorkGroupCount[i] = grid_size[i]; |