mesa: Mark buffer objects that are used as atomic counter buffers
authorChris Forbes <chrisf@ijw.co.nz>
Sat, 11 Oct 2014 23:27:31 +0000 (12:27 +1300)
committerChris Forbes <chrisf@ijw.co.nz>
Thu, 16 Oct 2014 09:31:44 +0000 (22:31 +1300)
Signed-off-by: Chris Forbes <chrisf@ijw.co.nz>
Reviewed-by: Francisco Jerez <currojerez@riseup.net>
src/mesa/main/bufferobj.c
src/mesa/main/mtypes.h

index c92056aa352d4758b432e2a1cb13a0f34f0cd86c..d6483080c6ee14fa01e70ce27e44689aab0142b3 100644 (file)
@@ -2770,6 +2770,7 @@ set_atomic_buffer_binding(struct gl_context *ctx,
    } else {
       binding->Offset = offset;
       binding->Size = size;
+      bufObj->UsageHistory |= USAGE_ATOMIC_COUNTER_BUFFER;
    }
 }
 
index 2a01508ed6b6e442559de8deb3c4cab3ecf81d98..9f44edac63b700f17a2a1998096f177c27d1cd47 100644 (file)
@@ -1470,6 +1470,7 @@ struct gl_buffer_mapping {
 typedef enum {
    USAGE_UNIFORM_BUFFER = 0x1,
    USAGE_TEXTURE_BUFFER = 0x2,
+   USAGE_ATOMIC_COUNTER_BUFFER = 0x4,
 } gl_buffer_usage;