diff options
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r-- | src/mesa/main/buffers.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/buffers.c b/src/mesa/main/buffers.c index 0536266d756..c83459addf7 100644 --- a/src/mesa/main/buffers.c +++ b/src/mesa/main/buffers.c @@ -303,6 +303,13 @@ _mesa_NamedFramebufferDrawBuffer(GLuint framebuffer, GLenum buf) GET_CURRENT_CONTEXT(ctx); struct gl_framebuffer *fb; + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glNamedFramebufferDrawBuffer(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + if (framebuffer) { fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, "glNamedFramebufferDrawBuffer"); @@ -513,6 +520,13 @@ _mesa_NamedFramebufferDrawBuffers(GLuint framebuffer, GLsizei n, GET_CURRENT_CONTEXT(ctx); struct gl_framebuffer *fb; + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glNamedFramebufferDrawBuffers(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + if (framebuffer) { fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, "glNamedFramebufferDrawBuffers"); @@ -750,6 +764,13 @@ _mesa_NamedFramebufferReadBuffer(GLuint framebuffer, GLenum src) GET_CURRENT_CONTEXT(ctx); struct gl_framebuffer *fb; + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glNamedFramebufferReadBuffer(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + if (framebuffer) { fb = _mesa_lookup_framebuffer_err(ctx, framebuffer, "glNamedFramebufferReadBuffer"); |