aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-08-01 16:07:45 -0700
committerEric Anholt <[email protected]>2019-04-24 17:24:11 -0700
commit97316d378379d6d440f285fdccd81e9d08b3397c (patch)
tree82fa6ddd5381da9614af804495d7e5d929060bf0 /src/mesa/state_tracker
parent2812ef2a26f4ab87d068092b1a6fa7c0dcc58202 (diff)
st/mesa: Don't set atomic counter size != 0 if MAX_SHADER_BUFFERS == 0.
This is just asking for tests to get confused about the HW supporting atomics in this shader stage or not, such as dEQP-GLES31.functional.shaders.opaque_type_indexing.atomic_counter.const_expression_vertex. v2: Rebase on the other atomic cleanups that have happened since posting. v3: Commit message tweak by Marek. Signed-off-by: Eric Anholt <[email protected]> Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker')
-rw-r--r--src/mesa/state_tracker/st_extensions.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_extensions.c b/src/mesa/state_tracker/st_extensions.c
index b23bd7c044d..cebc35a76a7 100644
--- a/src/mesa/state_tracker/st_extensions.c
+++ b/src/mesa/state_tracker/st_extensions.c
@@ -259,7 +259,7 @@ void st_init_limits(struct pipe_screen *screen,
*/
pc->MaxAtomicCounters = temp;
pc->MaxAtomicBuffers = screen->get_shader_param(screen, sh, PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS);
- } else {
+ } else if (pc->MaxShaderStorageBlocks) {
pc->MaxAtomicCounters = MAX_ATOMIC_COUNTERS;
/*
* without separate atomic counters, reserve half of the available