diff options
author | Antia Puentes <[email protected]> | 2015-12-19 20:27:16 +0100 |
---|---|---|
committer | Eduardo Lima Mitev <[email protected]> | 2016-03-03 15:14:07 +0100 |
commit | 2066c7be61c2edc07c79ea690ee1aef92665b5ec (patch) | |
tree | 40be4b7c001dd9e215eaac3079c6789aee4899a3 /src/mesa/main | |
parent | aed633bb97443749f250951553287cde021a1aaa (diff) |
mesa/formatquery: Added CLEAR_BUFFER <pname> query
From the ARB_internalformat_query2 specification:
"- CLEAR_BUFFER: The support for using the resource with ClearBuffer*Data
commands is returned in <params>.
Possible values returned are FULL_SUPPORT, CAVEAT_SUPPORT, or NONE.
If the resource or operation is not supported, NONE is returned."
Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/formatquery.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index a921566760e..9fe9072a781 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -616,6 +616,7 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target, case GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST: case GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE: case GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE: + case GL_CLEAR_BUFFER: params[0] = GL_FULL_SUPPORT; break; @@ -1367,7 +1368,11 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, } case GL_CLEAR_BUFFER: - /* @TODO */ + if (target != GL_TEXTURE_BUFFER) + goto end; + + ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname, + buffer); break; case GL_TEXTURE_VIEW: |