summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/buffers.c
diff options
context:
space:
mode:
authorFredrik Höglund <[email protected]>2015-05-10 20:48:11 +0200
committerFredrik Höglund <[email protected]>2015-05-14 15:48:17 +0200
commit6ad0b7e07a0445e9e0f368e079c4f7b8a6757bb3 (patch)
tree2731fe750e7319b56c712baff1ae0f468d77a756 /src/mesa/main/buffers.c
parent339ed0984d4f54fca91235a1df2ce3a850f6123f (diff)
mesa: Add ARB_direct_state_access checks in FBO functions
Signed-off-by: Fredrik Höglund <[email protected]> Reviewed-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/mesa/main/buffers.c')
-rw-r--r--src/mesa/main/buffers.c21
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");