Commit 97316d37 authored by Eric Anholt's avatar Eric Anholt

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

v2: Rebase on the other atomic cleanups that have happened since posting.
v3: Commit message tweak by Marek.
Signed-off-by: Eric Anholt's avatarEric Anholt <>
Reviewed-by: default avatarMarek Olšák <>
parent 2812ef2a
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment