summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/samplerobj.c
diff options
context:
space:
mode:
authorMartin Peres <martin.peres@linux.intel.com>2015-02-12 13:12:19 +0200
committerMartin Peres <martin.peres@linux.intel.com>2015-03-25 10:05:45 +0200
commit73a9d0fbe5a6d2d9e8ef98531bf662343dcc1abe (patch)
tree180672efa7671e7f9e845e94b70f723512cc6257 /src/mesa/main/samplerobj.c
parentb09f2ee8f7b76f30a75eec61ea8225a434365d49 (diff)
downloadexternal_mesa3d-73a9d0fbe5a6d2d9e8ef98531bf662343dcc1abe.zip
external_mesa3d-73a9d0fbe5a6d2d9e8ef98531bf662343dcc1abe.tar.gz
external_mesa3d-73a9d0fbe5a6d2d9e8ef98531bf662343dcc1abe.tar.bz2
main: Added entry point for glCreateSamplers
Because of the current way the code is architectured, there is no functional difference between the DSA and the non-DSA path. Reviewed-by: Laura Ekstrand <laura@jlekstrand.net> Signed-off-by: Martin Peres <martin.peres@linux.intel.com>
Diffstat (limited to 'src/mesa/main/samplerobj.c')
-rw-r--r--src/mesa/main/samplerobj.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/mesa/main/samplerobj.c b/src/mesa/main/samplerobj.c
index d66b0b5..a3aacc6 100644
--- a/src/mesa/main/samplerobj.c
+++ b/src/mesa/main/samplerobj.c
@@ -181,19 +181,18 @@ _mesa_delete_sampler_object(struct gl_context *ctx,
free(sampObj);
}
-
-void GLAPIENTRY
-_mesa_GenSamplers(GLsizei count, GLuint *samplers)
+static void
+create_samplers(struct gl_context *ctx, GLsizei count, GLuint *samplers,
+ const char *caller)
{
- GET_CURRENT_CONTEXT(ctx);
GLuint first;
GLint i;
if (MESA_VERBOSE & VERBOSE_API)
- _mesa_debug(ctx, "glGenSamplers(%d)\n", count);
+ _mesa_debug(ctx, "%s(%d)\n", caller, count);
if (count < 0) {
- _mesa_error(ctx, GL_INVALID_VALUE, "glGenSamplers");
+ _mesa_error(ctx, GL_INVALID_VALUE, "%s(n<0)", caller);
return;
}
@@ -211,6 +210,20 @@ _mesa_GenSamplers(GLsizei count, GLuint *samplers)
}
}
+void GLAPIENTRY
+_mesa_GenSamplers(GLsizei count, GLuint *samplers)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ create_samplers(ctx, count, samplers, "glGenSamplers");
+}
+
+void GLAPIENTRY
+_mesa_CreateSamplers(GLsizei count, GLuint *samplers)
+{
+ GET_CURRENT_CONTEXT(ctx);
+ create_samplers(ctx, count, samplers, "glCreateSamplers");
+}
+
void GLAPIENTRY
_mesa_DeleteSamplers(GLsizei count, const GLuint *samplers)