From: Martin Peres Date: Thu, 12 Feb 2015 11:12:19 +0000 (+0200) Subject: main: Added entry point for glCreateSamplers X-Git-Tag: upstream/17.1.0~19810 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=73a9d0fbe5a6d2d9e8ef98531bf662343dcc1abe;p=platform%2Fupstream%2Fmesa.git 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 Signed-off-by: Martin Peres --- diff --git a/src/mapi/glapi/gen/ARB_direct_state_access.xml b/src/mapi/glapi/gen/ARB_direct_state_access.xml index 9d7a59a..9bba64b 100644 --- a/src/mapi/glapi/gen/ARB_direct_state_access.xml +++ b/src/mapi/glapi/gen/ARB_direct_state_access.xml @@ -420,6 +420,13 @@ + + + + + + + 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) diff --git a/src/mesa/main/samplerobj.h b/src/mesa/main/samplerobj.h index 1bb3193..988b874 100644 --- a/src/mesa/main/samplerobj.h +++ b/src/mesa/main/samplerobj.h @@ -80,6 +80,8 @@ _mesa_init_sampler_object_functions(struct dd_function_table *driver); void GLAPIENTRY _mesa_GenSamplers(GLsizei count, GLuint *samplers); void GLAPIENTRY +_mesa_CreateSamplers(GLsizei count, GLuint *samplers); +void GLAPIENTRY _mesa_DeleteSamplers(GLsizei count, const GLuint *samplers); GLboolean GLAPIENTRY _mesa_IsSampler(GLuint sampler); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index cc14674..67c3b33 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -976,6 +976,7 @@ const struct function gl_core_functions_possible[] = { { "glTextureStorage3DMultisample", 45, -1 }, { "glTextureBuffer", 45, -1 }, { "glTextureBufferRange", 45, -1 }, + { "glCreateSamplers", 45, -1 }, { "glCreateProgramPipelines", 45, -1 }, { "glCreateQueries", 45, -1 }, { "glGetQueryBufferObjectiv", 45, -1 },