mesa: AtomicBufferBindings should be initialized to zero.
authorMarta Lofstedt <marta.lofstedt@intel.com>
Thu, 13 Aug 2015 10:59:40 +0000 (12:59 +0200)
committerTapani Pälli <tapani.palli@intel.com>
Mon, 17 Aug 2015 07:24:26 +0000 (10:24 +0300)
According to OpenGL specification version 4.5 table 23.46
and OpenGL ES specification version 3.1 table 20.31:
ATOMIC_COUNTER_BUFFER_START and ATOMIC_COUNTER_BUFFER_SIZE
should have the initial value of zero.

Signed-off-by: Marta Lofstedt <marta.lofstedt@intel.com>
Reviewed-by: Erik Faye-Lund <kusmabite@gmail.com>
src/mesa/main/bufferobj.c

index 1cdea937f9164dfc80f5ce4925176bd3f71f4378..e17b41ce55cea64bfc9e91cd5682b0eb5b9e16fe 100644 (file)
@@ -866,8 +866,8 @@ _mesa_init_buffer_objects( struct gl_context *ctx )
       _mesa_reference_buffer_object(ctx,
                                    &ctx->AtomicBufferBindings[i].BufferObject,
                                    ctx->Shared->NullBufferObj);
-      ctx->AtomicBufferBindings[i].Offset = -1;
-      ctx->AtomicBufferBindings[i].Size = -1;
+      ctx->AtomicBufferBindings[i].Offset = 0;
+      ctx->AtomicBufferBindings[i].Size = 0;
    }
 }