diff options
Diffstat (limited to 'src/mesa/main/clear.c')
-rw-r--r-- | src/mesa/main/clear.c | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/mesa/main/clear.c b/src/mesa/main/clear.c index 426caea4709..c6999f7fdb6 100644 --- a/src/mesa/main/clear.c +++ b/src/mesa/main/clear.c @@ -412,6 +412,14 @@ _mesa_ClearNamedFramebufferiv(GLuint framebuffer, GLenum buffer, { GLint oldfb; + GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glClearNamedFramebufferiv(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); _mesa_ClearBufferiv(buffer, drawbuffer, value); @@ -502,6 +510,14 @@ _mesa_ClearNamedFramebufferuiv(GLuint framebuffer, GLenum buffer, { GLint oldfb; + GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glClearNamedFramebufferuiv(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); _mesa_ClearBufferuiv(buffer, drawbuffer, value); @@ -613,6 +629,14 @@ _mesa_ClearNamedFramebufferfv(GLuint framebuffer, GLenum buffer, { GLint oldfb; + GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glClearNamedFramebufferfv(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); _mesa_ClearBufferfv(buffer, drawbuffer, value); @@ -695,6 +719,14 @@ _mesa_ClearNamedFramebufferfi(GLuint framebuffer, GLenum buffer, { GLint oldfb; + GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glClearNamedFramebufferfi(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + _mesa_GetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, &oldfb); _mesa_BindFramebuffer(GL_DRAW_FRAMEBUFFER, framebuffer); _mesa_ClearBufferfi(buffer, 0, depth, stencil); |