diff options
author | Fredrik Höglund <[email protected]> | 2015-05-10 20:49:15 +0200 |
---|---|---|
committer | Fredrik Höglund <[email protected]> | 2015-05-14 15:48:17 +0200 |
commit | cb49940766b581c6656473d89c221653c69fa0f9 (patch) | |
tree | 2cb27973e1ebaa7d2c16f990e4472870a5ff0cde /src/mesa | |
parent | 6ad0b7e07a0445e9e0f368e079c4f7b8a6757bb3 (diff) |
mesa: Add ARB_direct_state_access checks in renderbuffer functions
Signed-off-by: Fredrik Höglund <[email protected]>
Reviewed-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/main/fbobject.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/fbobject.c b/src/mesa/main/fbobject.c index 65e194cb749..8db651ca2a1 100644 --- a/src/mesa/main/fbobject.c +++ b/src/mesa/main/fbobject.c @@ -1489,6 +1489,14 @@ void GLAPIENTRY _mesa_CreateRenderbuffers(GLsizei n, GLuint *renderbuffers) { GET_CURRENT_CONTEXT(ctx); + + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glCreateRenderbuffers(GL_ARB_direct_state_access " + "is not supported)"); + return; + } + create_render_buffers(ctx, n, renderbuffers, true); } @@ -1929,6 +1937,12 @@ renderbuffer_storage_named(GLuint renderbuffer, GLenum internalFormat, { GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "%s(GL_ARB_direct_state_access is not supported)", func); + return; + } + if (MESA_VERBOSE & VERBOSE_API) { if (samples == NO_SAMPLES) _mesa_debug(ctx, "%s(%u, %s, %d, %d)\n", @@ -2183,6 +2197,13 @@ _mesa_GetNamedRenderbufferParameteriv(GLuint renderbuffer, GLenum pname, { GET_CURRENT_CONTEXT(ctx); + if (!ctx->Extensions.ARB_direct_state_access) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glGetNamedRenderbufferParameteriv(" + "GL_ARB_direct_state_access is not supported)"); + return; + } + struct gl_renderbuffer *rb = _mesa_lookup_renderbuffer(ctx, renderbuffer); if (!rb || rb == &DummyRenderbuffer) { /* ID was reserved, but no real renderbuffer object made yet */ |