[Mesa-dev] [PATCH 4/5] mesa: add ARB_texture_barrier support

Ilia Mirkin imirkin at alum.mit.edu
Mon Aug 11 12:07:08 PDT 2014


The extension is identical to NV_texture_barrier except for the function
name.

Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---

I know these are normally split up a bit more, but here the implementation is
*trivial*.

 src/mapi/glapi/gen/ARB_texture_barrier.xml | 13 +++++++++++++
 src/mapi/glapi/gen/Makefile.am             |  1 +
 src/mapi/glapi/gen/gl_API.xml              |  4 ++++
 src/mesa/main/tests/dispatch_sanity.cpp    |  3 +++
 src/mesa/main/texturebarrier.c             |  8 ++++++++
 src/mesa/main/texturebarrier.h             |  3 +++
 6 files changed, 32 insertions(+)
 create mode 100644 src/mapi/glapi/gen/ARB_texture_barrier.xml

diff --git a/src/mapi/glapi/gen/ARB_texture_barrier.xml b/src/mapi/glapi/gen/ARB_texture_barrier.xml
new file mode 100644
index 0000000..7ad9da0
--- /dev/null
+++ b/src/mapi/glapi/gen/ARB_texture_barrier.xml
@@ -0,0 +1,13 @@
+<?xml version="1.0"?>
+<!DOCTYPE OpenGLAPI SYSTEM "gl_API.dtd">
+
+<!-- Note: no GLX protocol info yet. -->
+
+
+<OpenGLAPI>
+
+<category name="GL_ARB_texture_barrier" number="167">
+    <function name="TextureBarrier" offset="assign" />
+</category>
+
+</OpenGLAPI>
diff --git a/src/mapi/glapi/gen/Makefile.am b/src/mapi/glapi/gen/Makefile.am
index 212731f..2cc2752 100644
--- a/src/mapi/glapi/gen/Makefile.am
+++ b/src/mapi/glapi/gen/Makefile.am
@@ -144,6 +144,7 @@ API_XML = \
 	ARB_shader_atomic_counters.xml \
 	ARB_shader_image_load_store.xml \
 	ARB_sync.xml \
+	ARB_texture_barrier.xml \
 	ARB_texture_buffer_object.xml \
 	ARB_texture_buffer_range.xml \
 	ARB_texture_compression_rgtc.xml \
diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml
index e011509..ccf3b9a 100644
--- a/src/mapi/glapi/gen/gl_API.xml
+++ b/src/mapi/glapi/gen/gl_API.xml
@@ -8364,6 +8364,10 @@
 
 <xi:include href="ARB_multi_bind.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
 
+<!-- ARB extensions 148 - 166 -->
+
+<xi:include href="ARB_texture_barrier.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
+
 <!-- Non-ARB extensions sorted by extension number. -->
 
 <category name="GL_EXT_blend_color" number="2">
diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp
index 5e751f4..5f2b9ac 100644
--- a/src/mesa/main/tests/dispatch_sanity.cpp
+++ b/src/mesa/main/tests/dispatch_sanity.cpp
@@ -951,6 +951,9 @@ const struct function gl_core_functions_possible[] = {
    { "glClearTexImage", 13, -1 },
    { "glClearTexSubImage", 13, -1 },
 
+   /* GL_ARB_texture_barrier */
+   { "glTextureBarrier", 31, -1 },
+
    { NULL, 0, -1 }
 };
 
diff --git a/src/mesa/main/texturebarrier.c b/src/mesa/main/texturebarrier.c
index 08ff561..303fa0c 100644
--- a/src/mesa/main/texturebarrier.c
+++ b/src/mesa/main/texturebarrier.c
@@ -51,3 +51,11 @@ _mesa_TextureBarrierNV(void)
 
    ctx->Driver.TextureBarrier(ctx);
 }
+
+void GLAPIENTRY
+_mesa_TextureBarrier(void)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   ctx->Driver.TextureBarrier(ctx);
+}
diff --git a/src/mesa/main/texturebarrier.h b/src/mesa/main/texturebarrier.h
index a84a85b..84dd469 100644
--- a/src/mesa/main/texturebarrier.h
+++ b/src/mesa/main/texturebarrier.h
@@ -41,4 +41,7 @@ _mesa_init_texture_barrier_functions(struct dd_function_table *driver);
 extern void GLAPIENTRY
 _mesa_TextureBarrierNV(void);
 
+extern void GLAPIENTRY
+_mesa_TextureBarrier(void);
+
 #endif /* TEXTUREBARRIER_H */
-- 
1.8.5.5



More information about the mesa-dev mailing list