[Mesa-dev] [PATCH 3/4] mesa: Mark buffer objects that are used as atomic counter buffers

Chris Forbes chrisf at ijw.co.nz
Sat Oct 11 17:20:46 PDT 2014


Signed-off-by: Chris Forbes <chrisf at ijw.co.nz>
---
 src/mesa/main/bufferobj.c | 1 +
 src/mesa/main/mtypes.h    | 1 +
 2 files changed, 2 insertions(+)

diff --git a/src/mesa/main/bufferobj.c b/src/mesa/main/bufferobj.c
index c92056a..d648308 100644
--- a/src/mesa/main/bufferobj.c
+++ b/src/mesa/main/bufferobj.c
@@ -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;
    }
 }
 
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 2a01508..9f44eda 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
 
 
-- 
2.1.2



More information about the mesa-dev mailing list