diff options
-rw-r--r-- | src/mapi/glapi/gen/EXT_direct_state_access.xml | 13 | ||||
-rw-r--r-- | src/mapi/glapi/gen/static_data.py | 2 | ||||
-rw-r--r-- | src/mesa/main/fbobject.c | 34 | ||||
-rw-r--r-- | src/mesa/main/fbobject.h | 7 | ||||
-rw-r--r-- | src/mesa/main/tests/dispatch_sanity.cpp | 4 |
5 files changed, 58 insertions, 2 deletions
diff --git a/src/mapi/glapi/gen/EXT_direct_state_access.xml b/src/mapi/glapi/gen/EXT_direct_state_access.xml index 32fa4094981..d01521b75d1 100644 --- a/src/mapi/glapi/gen/EXT_direct_state_access.xml +++ b/src/mapi/glapi/gen/EXT_direct_state_access.xml @@ -987,5 +987,18 @@ <param name="index" type="GLuint" /> <param name="params" type="GLvoid**" /> </function> + + <function name="NamedRenderbufferStorageEXT"> + <param name="renderbuffer" type="GLuint" /> + <param name="internalformat" type="GLenum" /> + <param name="width" type="GLsizei" /> + <param name="height" type="GLsizei" /> + </function> + + <function name="GetNamedRenderbufferParameterivEXT"> + <param name="renderbuffer" type="GLuint" /> + <param name="pname" type="GLenum" /> + <param name="params" type="GLint *" /> + </function> </category> </OpenGLAPI> diff --git a/src/mapi/glapi/gen/static_data.py b/src/mapi/glapi/gen/static_data.py index 2f3e448750a..bd37a34f6f6 100644 --- a/src/mapi/glapi/gen/static_data.py +++ b/src/mapi/glapi/gen/static_data.py @@ -1569,6 +1569,8 @@ offsets = { "GetMultiTexLevelParameterfvEXT": 1533, "FramebufferParameteriMESA": 1534, "GetFramebufferParameterivMESA": 1535, + "NamedRenderbufferStorageEXT": 1536, + "GetNamedRenderbufferParameterivEXT": 1537, } functions = [ diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 50ba6dd7fad..7ae7727c9c2 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -2708,6 +2708,22 @@ _mesa_NamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, } void GLAPIENTRY +_mesa_NamedRenderbufferStorageEXT(GLuint renderbuffer, 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, "glNamedRenderbufferStorageEXT"); + _mesa_HashUnlockMutex(ctx->Shared->RenderBuffers); + } + renderbuffer_storage(ctx, rb, internalformat, width, height, NO_SAMPLES, + 0, "glNamedRenderbufferStorageEXT"); +} + + +void GLAPIENTRY _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) @@ -2817,6 +2833,24 @@ _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, } +void GLAPIENTRY +_mesa_GetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname, + GLint *params) +{ + 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, "glGetNamedRenderbufferParameterivEXT"); + _mesa_HashUnlockMutex(ctx->Shared->RenderBuffers); + } + + get_render_buffer_parameteriv(ctx, rb, pname, params, + "glGetNamedRenderbufferParameterivEXT"); +} + + GLboolean GLAPIENTRY _mesa_IsFramebuffer(GLuint framebuffer) { diff --git a/src/mesa/main/fbobject.h b/src/mesa/main/fbobject.h index e44373e7dd3..56e53544dd7 100644 --- a/src/mesa/main/fbobject.h +++ b/src/mesa/main/fbobject.h @@ -190,6 +190,9 @@ _es_RenderbufferStorageEXT(GLenum target, GLenum internalFormat, extern void GLAPIENTRY _mesa_NamedRenderbufferStorage(GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height); +extern void GLAPIENTRY +_mesa_NamedRenderbufferStorageEXT(GLuint renderbuffer, GLenum internalformat, + GLsizei width, GLsizei height); extern void GLAPIENTRY _mesa_NamedRenderbufferStorageMultisample(GLuint renderbuffer, GLsizei samples, @@ -361,6 +364,10 @@ _mesa_NamedFramebufferParameteri(GLuint framebuffer, GLenum pname, GLint param); extern void GLAPIENTRY +_mesa_GetNamedRenderbufferParameterivEXT(GLuint renderbuffer, GLenum pname, + GLint *params); + +extern void GLAPIENTRY _mesa_GetFramebufferParameterivEXT(GLuint framebuffer, GLenum pname, GLint *param); diff --git a/src/mesa/main/tests/dispatch_sanity.cpp b/src/mesa/main/tests/dispatch_sanity.cpp index c3ac7beb73e..cbd65d7ba63 100644 --- a/src/mesa/main/tests/dispatch_sanity.cpp +++ b/src/mesa/main/tests/dispatch_sanity.cpp @@ -1185,8 +1185,8 @@ const struct function common_desktop_functions_possible[] = { /* GL_EXT_direct_state_access - GL 3.0 */ //{ "glGetFloati_vEXT", 30, -1 }, //{ "glGetDoublei_vEXT", 30, -1 }, - //{ "glNamedRenderbufferStorageEXT", 30, -1 }, - //{ "glGetNamedRenderbufferParameterivEXT", 30, -1 }, + { "glNamedRenderbufferStorageEXT", 30, -1 }, + { "glGetNamedRenderbufferParameterivEXT", 30, -1 }, //{ "glNamedRenderbufferStorageMultisampleEXT", 30, -1 }, { "glCheckNamedFramebufferStatusEXT", 30, -1 }, { "glNamedFramebufferTexture1DEXT", 30, -1 }, |