From 719974b54c292a507b5600bcfe1f259c2938e963 Mon Sep 17 00:00:00 2001 From: Chris Forbes Date: Sat, 16 Feb 2013 22:02:00 +1300 Subject: glapi: add definition of ARB_texture_storage_multisample Adds XML for the extension, dispatch_sanity enabling, and the two new entrypoints. These are both implemented by calling the shared teximagemultisample() with immutable=GL_TRUE. Signed-off-by: Chris Forbes Reviewed-by: Eric Anholt Reviewed-by: Brian Paul --- src/mesa/main/tests/dispatch_sanity.cpp | 4 ++-- src/mesa/main/teximage.c | 20 ++++++++++++++++++++ src/mesa/main/teximage.h | 11 +++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) (limited to 'src/mesa/main') diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index 3431dedc105..ffd83fe54ed 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -895,8 +895,8 @@ const struct function gl_core_functions_possible[] = { // { "glShaderStorageBlockBinding", 43, -1 }, // XXX: Add to xml { "glTexBufferRange", 43, -1 }, // { "glTextureBufferRangeEXT", 43, -1 }, // XXX: Add to xml -// { "glTexStorage2DMultisample", 43, -1 }, // XXX: Add to xml -// { "glTexStorage3DMultisample", 43, -1 }, // XXX: Add to xml + { "glTexStorage2DMultisample", 43, -1 }, + { "glTexStorage3DMultisample", 43, -1 }, // { "glTextureStorage2DMultisampleEXT", 43, -1 }, // XXX: Add to xml // { "glTextureStorage3DMultisampleEXT", 43, -1 }, // XXX: Add to xml diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index d7de69b9e99..68e42a71f66 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -4346,3 +4346,23 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples, teximagemultisample(3, target, samples, internalformat, width, height, depth, fixedsamplelocations, GL_FALSE); } + + +void GLAPIENTRY +_mesa_TexStorage2DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations) +{ + teximagemultisample(2, target, samples, internalformat, + width, height, 1, fixedsamplelocations, GL_TRUE); +} + +void GLAPIENTRY +_mesa_TexStorage3DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations) +{ + teximagemultisample(3, target, samples, internalformat, + width, height, depth, fixedsamplelocations, GL_TRUE); +} diff --git a/src/mesa/main/teximage.h b/src/mesa/main/teximage.h index 744c47a8af6..cedd9338355 100644 --- a/src/mesa/main/teximage.h +++ b/src/mesa/main/teximage.h @@ -305,6 +305,17 @@ _mesa_TexImage3DMultisample(GLenum target, GLsizei samples, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations); +extern void GLAPIENTRY +_mesa_TexStorage2DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLboolean fixedsamplelocations); + +extern void GLAPIENTRY +_mesa_TexStorage3DMultisample(GLenum target, GLsizei samples, + GLint internalformat, GLsizei width, + GLsizei height, GLsizei depth, + GLboolean fixedsamplelocations); + /*@}*/ #ifdef __cplusplus -- cgit v1.2.3