diff options
author | Andres Rodriguez <[email protected]> | 2017-07-12 18:45:27 -0400 |
---|---|---|
committer | Timothy Arceri <[email protected]> | 2017-08-06 12:42:07 +1000 |
commit | 059d82c1c2566afc6f7ac07d38a206c6fa7c1ed4 (patch) | |
tree | 09e046de69d4305376914c32c97ca095d9936d75 /src/mesa/main/formatquery.c | |
parent | 68623933a06b018edb8555c26a4505832719054c (diff) |
mesa: hook up queries for NUM_TILING_TYPES and TILING_TYPES
These are just basic implementations.
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Reviewed-by: Samuel Pitoiset <[email protected]>
Diffstat (limited to 'src/mesa/main/formatquery.c')
-rw-r--r-- | src/mesa/main/formatquery.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c index 07fb2f2330f..77c7faa2251 100644 --- a/src/mesa/main/formatquery.c +++ b/src/mesa/main/formatquery.c @@ -216,6 +216,8 @@ _legal_parameters(struct gl_context *ctx, GLenum target, GLenum internalformat, case GL_CLEAR_BUFFER: case GL_TEXTURE_VIEW: case GL_VIEW_COMPATIBILITY_CLASS: + case GL_NUM_TILING_TYPES_EXT: + case GL_TILING_TYPES_EXT: /* The ARB_internalformat_query spec says: * * "If the <pname> parameter to GetInternalformativ is not SAMPLES @@ -284,6 +286,7 @@ _set_default_response(GLenum pname, GLint buffer[16]) */ switch(pname) { case GL_SAMPLES: + case GL_TILING_TYPES_EXT: break; case GL_MAX_COMBINED_DIMENSIONS: @@ -309,6 +312,7 @@ _set_default_response(GLenum pname, GLint buffer[16]) case GL_TEXTURE_COMPRESSED_BLOCK_WIDTH: case GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT: case GL_TEXTURE_COMPRESSED_BLOCK_SIZE: + case GL_NUM_TILING_TYPES_EXT: buffer[0] = 0; break; @@ -700,6 +704,13 @@ _mesa_query_internal_format_default(struct gl_context *ctx, GLenum target, case GL_FILTER: params[0] = GL_FULL_SUPPORT; break; + case GL_NUM_TILING_TYPES_EXT: + params[0] = 2; + break; + case GL_TILING_TYPES_EXT: + params[0] = GL_OPTIMAL_TILING_EXT; + params[1] = GL_LINEAR_TILING_EXT; + break; default: _set_default_response(pname, params); @@ -1519,6 +1530,12 @@ _mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname, } break; + case GL_NUM_TILING_TYPES_EXT: + case GL_TILING_TYPES_EXT: + ctx->Driver.QueryInternalFormat(ctx, target, internalformat, pname, + buffer); + break; + default: unreachable("bad param"); } |