From: Chris Forbes Date: Sat, 24 Nov 2012 00:08:45 +0000 (+1300) Subject: glapi: add ARB_texture_multisample X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0f83e415e49520021977e76ad3d0b0a9c1f6d8d4;p=mesa.git glapi: add ARB_texture_multisample Adds new enums, dispatch machinery, and stubs for the 4 new entrypoints. V2: - Drop placeholder - Align enum values - Remove explicit exec=mesa; it *is* the dispatch flavor we want, but it's also the default. I misunderstood how this worked before; after actually reading the generator it makes good sense. V3: - Squash in stubs for new entrypoints, and dispatch_sanity tweaks, so we don't get build breakage between those patches. V4: - Fix various remaining whitespace issues Signed-off-by: Chris Forbes [1/3 V2] Reviewed-by: Matt Turner [V3] Reviewed-by: Eric Anholt Reviewed-by: Ian Romanick --- diff --git a/src/mapi/glapi/gen/ARB_texture_multisample.xml b/src/mapi/glapi/gen/ARB_texture_multisample.xml new file mode 100644 index 00000000000..f0dd4f5f79b --- /dev/null +++ b/src/mapi/glapi/gen/ARB_texture_multisample.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/mapi/glapi/gen/gl_API.xml b/src/mapi/glapi/gen/gl_API.xml index 4cbd72462b4..75957dc7dbd 100644 --- a/src/mapi/glapi/gen/gl_API.xml +++ b/src/mapi/glapi/gen/gl_API.xml @@ -8179,7 +8179,8 @@ - + + diff --git a/src/mesa/main/multisample.c b/src/mesa/main/multisample.c index f792ad01e74..0687cd042d7 100644 --- a/src/mesa/main/multisample.c +++ b/src/mesa/main/multisample.c @@ -60,3 +60,18 @@ _mesa_init_multisample(struct gl_context *ctx) ctx->Multisample.SampleCoverageValue = 1.0; ctx->Multisample.SampleCoverageInvert = GL_FALSE; } + + +void GLAPIENTRY +_mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat * val) +{ + assert(!"Not implemented"); + // TODO: make this work +} + +void GLAPIENTRY +_mesa_SampleMaski(GLuint index, GLbitfield mask) +{ + assert(!"Not implemented"); + // TODO: make this work +} diff --git a/src/mesa/main/multisample.h b/src/mesa/main/multisample.h index 30726c34cf1..9e6b8e0d3f8 100644 --- a/src/mesa/main/multisample.h +++ b/src/mesa/main/multisample.h @@ -38,4 +38,10 @@ extern void _mesa_init_multisample(struct gl_context *ctx); +extern void GLAPIENTRY +_mesa_GetMultisamplefv(GLenum pname, GLuint index, GLfloat* val); + +extern void GLAPIENTRY +_mesa_SampleMaski(GLuint index, GLbitfield mask); + #endif diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index bf6b297e139..3431dedc105 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -602,10 +602,10 @@ const struct function gl_core_functions_possible[] = { { "glWaitSync", 43, -1 }, { "glGetInteger64v", 43, -1 }, { "glGetSynciv", 43, -1 }, -// { "glTexImage2DMultisample", 43, -1 }, // XXX: Add to xml -// { "glTexImage3DMultisample", 43, -1 }, // XXX: Add to xml -// { "glGetMultisamplefv", 43, -1 }, // XXX: Add to xml -// { "glSampleMaski", 43, -1 }, // XXX: Add to xml + { "glTexImage2DMultisample", 43, -1 }, + { "glTexImage3DMultisample", 43, -1 }, + { "glGetMultisamplefv", 43, -1 }, + { "glSampleMaski", 43, -1 }, { "glBlendEquationiARB", 43, -1 }, { "glBlendEquationSeparateiARB", 43, -1 }, { "glBlendFunciARB", 43, -1 }, diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index f0de0fb4935..d40d58eecc2 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4102,3 +4102,24 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer, texbufferrange(ctx, target, internalFormat, bufObj, offset, size); } + + +/** GL_ARB_texture_multisample */ +void GLAPIENTRY +_mesa_TexImage2DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations) +{ + assert(!"Not implemented"); + /* allocate a single 2d multisample texture */ +} + +void GLAPIENTRY +_mesa_TexImage3DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations) +{ + assert(!"Not implemented"); + /* allocate an array of 2d multisample textures */ +} diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 7124cac5214..744c47a8af6 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -294,6 +294,17 @@ _mesa_TexBufferRange(GLenum target, GLenum internalFormat, GLuint buffer, GLintptr offset, GLsizeiptr size); +extern void GLAPIENTRY +_mesa_TexImage2DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations); + +extern void GLAPIENTRY +_mesa_TexImage3DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations); + /*@}*/ #ifdef __cplusplus