st/mesa: simplify MaxAtomicBufferSize-logic
authorErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 29 Aug 2018 13:48:29 +0000 (15:48 +0200)
committerErik Faye-Lund <erik.faye-lund@collabora.com>
Wed, 5 Sep 2018 04:46:33 +0000 (05:46 +0100)
MaxAtomicCounters has already been assigned in the loop above in the
ssbo_atomic = true case, so this will calculate the same value as the
default.

While we're at it, fixup indentation on the MaxAtomicBufferBindings
assign.

Signed-off-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
src/mesa/state_tracker/st_extensions.c

index 83fc09f52b810bedc2ee28faa402d9c52a55be0a..9ecdd26eddaa6b119e3e0f43fd959d7fba20a822 100644 (file)
@@ -441,12 +441,11 @@ void st_init_limits(struct pipe_screen *screen,
       c->NumProgramBinaryFormats = 1;
 
    c->MaxAtomicBufferBindings =
-          c->Program[MESA_SHADER_FRAGMENT].MaxAtomicBuffers;
+      c->Program[MESA_SHADER_FRAGMENT].MaxAtomicBuffers;
+   c->MaxAtomicBufferSize =
+      c->Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters * ATOMIC_COUNTER_SIZE;
 
    if (!ssbo_atomic) {
-      /* for separate atomic buffers - there atomic buffer size will be
-         limited */
-      c->MaxAtomicBufferSize = c->Program[MESA_SHADER_FRAGMENT].MaxAtomicCounters * ATOMIC_COUNTER_SIZE;
       /* on all HW with separate atomic (evergreen) the following
          lines are true. not sure it's worth adding CAPs for this at this
          stage. */