From da21435a7aab65f3b76079bad4800497af9b0158 Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Wed, 11 Sep 2019 10:13:21 +0200 Subject: [PATCH] mesa: add EXT_dsa NamedRenderbufferStorageMultisampleEXT function MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Reviewed-by: Marek Olšák --- .../glapi/gen/EXT_direct_state_access.xml | 8 ++++++++ src/mapi/glapi/gen/static_data.py | 1 + src/mesa/main/fbobject.c | 19 +++++++++++++++++++ src/mesa/main/fbobject.h | 5 +++++ 4 files changed, 33 insertions(+) diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index b2f27cf2dde..d926b25014d 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -1036,6 +1036,14 @@ + + + + + + + + diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 95d68a947cb..344f476a676 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1595,6 +1595,7 @@ offsets = { "NamedProgramLocalParameters4fvEXT": 1559, "GenerateTextureMipmapEXT": 1560, "GenerateMultiTexMipmapEXT": 1561, + "NamedRenderbufferStorageMultisampleEXT": 1562, } functions = [ diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 7ae7727c9c2..2aeb48dfe7d 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2734,6 +2734,25 @@ _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, } +void GLAPIENTRY +_mesa_NamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height) +{ + GET_CURRENT_CONTEXT(ctx); + struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); + if (!rb || rb == &DummyRenderbuffer) { + _mesa_HashLockMutex(ctx->Shared->RenderBuffers); + rb = allocate_renderbuffer_locked(ctx, renderbuffer, + "glNamedRenderbufferStorageMultisampleEXT"); + _mesa_HashUnlockMutex(ctx->Shared->RenderBuffers); + } + renderbuffer_storage(ctx, rb, internalformat, width, height, + samples, samples, + "glNamedRenderbufferStorageMultisample"); +} + + void GLAPIENTRY _mesa_NamedRenderbufferStorageMultisampleAdvancedAMD( GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index 56e53544dd7..bd1f7e4a537 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -199,6 +199,11 @@ _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height); +extern void GLAPIENTRY +_mesa_NamedRenderbufferStorageMultisampleEXT(GLuint renderbuffer, GLsizei samples, + GLenum internalformat, + GLsizei width, GLsizei height); + extern void GLAPIENTRY _mesa_NamedRenderbufferStorageMultisampleAdvancedAMD( GLuint renderbuffer, GLsizei samples, GLsizei storageSamples, -- 2.30.2