diff options
author | Erik Faye-Lund <[email protected]> | 2018-11-15 18:00:24 +0100 |
---|---|---|
committer | Erik Faye-Lund <[email protected]> | 2018-12-03 18:16:44 +0100 |
commit | 1b2e9aca7722a299f82d3590bf36e76071d804d8 (patch) | |
tree | 3366e9956561dd982cc6900873e1ab20725e5f0d /src/mesa/main/context.h | |
parent | 510b6424607b1e8af96162f6d571de34beb89e86 (diff) |
mesa/main: do not allow EXT_texture_shared_exponent enums before gles3
ctx->Extensions.EXT_texture_shared_exponent is set regardless of the
API that's used, so checking for those direcly will always allow the
enums from this extensions when they are supported by the driver.
We also need to make sure this is enabled on OpenGL ES 3. Because the
check is repeated, let's introduce a helper.
Signed-off-by: Erik Faye-Lund <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa/main/context.h')
-rw-r--r-- | src/mesa/main/context.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h index af81717d9bd..7db3b94e0b6 100644 --- a/src/mesa/main/context.h +++ b/src/mesa/main/context.h @@ -367,6 +367,12 @@ _mesa_has_rg_textures(const struct gl_context *ctx) return _mesa_has_ARB_texture_rg(ctx) || _mesa_is_gles3(ctx); } +static inline bool +_mesa_has_texture_shared_exponent(const struct gl_context *ctx) +{ + return _mesa_has_EXT_texture_shared_exponent(ctx) || _mesa_is_gles3(ctx); +} + /** * Checks if the context supports geometry shaders. */ |