[Mesa-dev] [PATCH 5/6] mesa/es31: AtomicBufferBindings should be initialized to zero.
Marta Lofstedt
marta.lofstedt at linux.intel.com
Tue Jun 23 05:23:15 PDT 2015
From: Marta Lofstedt <marta.lofstedt at intel.com>
Accoring to GLES 3.1 CTS:
GLES 3.1 CTS: ES31-CTS.shader_atomic_counters.
basic-buffer-bind.
AtomicBufferBindings size and start should be initialized
to zero.
Signed-off-by: Marta Lofstedt <marta.lofstedt at intel.com>
---
src/mesa/main/bufferobj.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index 66dee68..94629b3 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -849,9 +849,14 @@ _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;
- }
+ if (_mesa_is_gles31(ctx)) {
+ ctx->AtomicBufferBindings[i].Offset = 0;
+ ctx->AtomicBufferBindings[i].Size = 0;
+ }
+ else {
+ ctx->AtomicBufferBindings[i].Offset = -1;
+ ctx->AtomicBufferBindings[i].Size = -1;
+ }
}
--
1.9.1
More information about the mesa-dev
mailing list