freedreno: fix HW_ATOMIC_COUNTERS cap
authorRob Clark <robdclark@gmail.com>
Fri, 22 Jun 2018 20:09:25 +0000 (16:09 -0400)
committerRob Clark <robdclark@gmail.com>
Sat, 23 Jun 2018 22:23:11 +0000 (18:23 -0400)
This was mistakenly exposed, even though we want atomic counters to be
lowered to atomic ops on an SSBO like nearly every other GPU.  Which
somehow recently started getting segfaults due to calling a null
pipe->set_hw_atomic_buffers().

Fixes a crash in stk, and probably other things.

Signed-off-by: Rob Clark <robdclark@gmail.com>
src/gallium/drivers/freedreno/freedreno_screen.c

index 042e0384f1a692f9c97cb479a7da1072f5815489..1baebd71789e467b4b930f090a2f503826c0137b 100644 (file)
@@ -566,6 +566,7 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen,
        case PIPE_SHADER_CAP_TGSI_LDEXP_SUPPORTED:
        case PIPE_SHADER_CAP_TGSI_FMA_SUPPORTED:
        case PIPE_SHADER_CAP_TGSI_ANY_INOUT_DECL_RANGE:
+       case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
                return 0;
        case PIPE_SHADER_CAP_TGSI_SQRT_SUPPORTED:
                return 1;
@@ -595,7 +596,6 @@ fd_screen_get_shader_param(struct pipe_screen *pscreen,
                return 32;
        case PIPE_SHADER_CAP_LOWER_IF_THRESHOLD:
        case PIPE_SHADER_CAP_TGSI_SKIP_MERGE_REGISTERS:
-       case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTERS:
        case PIPE_SHADER_CAP_MAX_HW_ATOMIC_COUNTER_BUFFERS:
        case PIPE_SHADER_CAP_SCALAR_ISA:
                return 1;