summaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2011-03-08 11:29:20 +0100
committerMarek Olšák <[email protected]>2011-03-15 15:47:27 +0100
commit867f9b07d42c2b49ddb9e5bb17f0ac5c4a80d8ac (patch)
tree4c680731ab388ab50e61479c767b63778c27704a /src/mesa/main
parent65942e141fc3da760b53248eafdd876a45b592d4 (diff)
mesa: add NV_texture_barrier
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/api_exec.c4
-rw-r--r--src/mesa/main/dd.h5
-rw-r--r--src/mesa/main/extensions.c1
-rw-r--r--src/mesa/main/mtypes.h1
-rw-r--r--src/mesa/main/texturebarrier.c54
-rw-r--r--src/mesa/main/texturebarrier.h44
6 files changed, 109 insertions, 0 deletions
diff --git a/src/mesa/main/api_exec.c b/src/mesa/main/api_exec.c
index 546cdd61987..4da48936484 100644
--- a/src/mesa/main/api_exec.c
+++ b/src/mesa/main/api_exec.c
@@ -87,6 +87,7 @@
#include "texobj.h"
#include "texparam.h"
#include "texstate.h"
+#include "texturebarrier.h"
#include "transformfeedback.h"
#include "mtypes.h"
#include "varray.h"
@@ -719,6 +720,9 @@ _mesa_create_exec_table(void)
SET_BlendFuncSeparateiARB(exec, _mesa_BlendFuncSeparatei);
SET_BlendEquationiARB(exec, _mesa_BlendEquationi);
SET_BlendEquationSeparateiARB(exec, _mesa_BlendEquationSeparatei);
+
+ /* GL_NV_texture_barrier */
+ SET_TextureBarrierNV(exec, _mesa_TextureBarrierNV);
return exec;
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 749c30a4cc1..0947672a081 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -1025,6 +1025,11 @@ struct dd_function_table {
struct gl_transform_feedback_object *obj);
void (*DrawTransformFeedback)(struct gl_context *ctx, GLenum mode,
struct gl_transform_feedback_object *obj);
+
+ /**
+ * \name GL_NV_texture_barrier interface
+ */
+ void (*TextureBarrier)(struct gl_context *ctx);
};
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 68740e24cc1..1f39ec92df4 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -283,6 +283,7 @@ static const struct extension extension_table[] = {
{ "GL_NV_point_sprite", o(NV_point_sprite), GL },
{ "GL_NV_primitive_restart", o(NV_primitive_restart), GL },
{ "GL_NV_texgen_reflection", o(NV_texgen_reflection), GL },
+ { "GL_NV_texture_barrier", o(NV_texture_barrier), GL },
{ "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GL },
{ "GL_NV_texture_rectangle", o(NV_texture_rectangle), GL },
{ "GL_NV_vertex_program1_1", o(NV_vertex_program1_1), GL },
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 4f83e2e55c2..5409abaf1a4 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2848,6 +2848,7 @@ struct gl_extensions
GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
GLboolean NV_primitive_restart;
+ GLboolean NV_texture_barrier;
GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
diff --git a/src/mesa/main/texturebarrier.c b/src/mesa/main/texturebarrier.c
new file mode 100644
index 00000000000..56cc8718ca3
--- /dev/null
+++ b/src/mesa/main/texturebarrier.c
@@ -0,0 +1,54 @@
+/*
+ * Copyright © 2011 Marek Olšák <[email protected]>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file texturebarrier.c
+ * Implementation of glTextureBarrierNV.
+ *
+ * \author Marek Olšák <[email protected]>
+ */
+
+#include "context.h"
+#include "texturebarrier.h"
+
+
+static void
+_mesa_texture_barrier(struct gl_context *ctx)
+{
+ /* no-op */
+}
+
+void
+_mesa_init_texture_barrier_functions(struct dd_function_table *driver)
+{
+ driver->TextureBarrier = _mesa_texture_barrier;
+}
+
+void GLAPIENTRY
+_mesa_TextureBarrierNV(void)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ ASSERT_OUTSIDE_BEGIN_END(ctx);
+
+ ctx->Driver.TextureBarrier(ctx);
+}
diff --git a/src/mesa/main/texturebarrier.h b/src/mesa/main/texturebarrier.h
new file mode 100644
index 00000000000..a84a85b2176
--- /dev/null
+++ b/src/mesa/main/texturebarrier.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright © 2011 Marek Olšák <[email protected]>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the "Software"),
+ * to deal in the Software without restriction, including without limitation
+ * the rights to use, copy, modify, merge, publish, distribute, sublicense,
+ * and/or sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice (including the next
+ * paragraph) shall be included in all copies or substantial portions of the
+ * Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+
+/**
+ * \file texturebarrier.h
+ * GL_NV_texture_barrier
+ *
+ * \author Marek Olšák <[email protected]>
+ */
+
+#ifndef TEXTUREBARRIER_H
+#define TEXTUREBARRIER_H
+
+#include "glheader.h"
+
+struct dd_function_table;
+
+extern void
+_mesa_init_texture_barrier_functions(struct dd_function_table *driver);
+
+extern void GLAPIENTRY
+_mesa_TextureBarrierNV(void);
+
+#endif /* TEXTUREBARRIER_H */