summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/context.h
diff options
context:
space:
mode:
authorErik Faye-Lund <[email protected]>2018-11-15 17:43:36 +0100
committerErik Faye-Lund <[email protected]>2018-12-03 18:16:44 +0100
commit510b6424607b1e8af96162f6d571de34beb89e86 (patch)
tree33f29c86ac1d7b21db19eceeb0cb6ffb67ff1ac1 /src/mesa/main/context.h
parent59690bf0a31300febafd84868781990db0fa215a (diff)
mesa/main: do not allow rg-textures enums before gles3
EXT_packed_float isn't supported on OpenGL ES, we shouldn't allow these enums there, before OpenGL ES 3.0 which also introduce support for these enums. Since this check is repeated a lot, let's make a helper for this. 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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mesa/main/context.h b/src/mesa/main/context.h
index 84dbcb748c9..af81717d9bd 100644
--- a/src/mesa/main/context.h
+++ b/src/mesa/main/context.h
@@ -361,6 +361,12 @@ _mesa_has_packed_float(const struct gl_context *ctx)
return _mesa_has_EXT_packed_float(ctx) || _mesa_is_gles3(ctx);
}
+static inline bool
+_mesa_has_rg_textures(const struct gl_context *ctx)
+{
+ return _mesa_has_ARB_texture_rg(ctx) || _mesa_is_gles3(ctx);
+}
+
/**
* Checks if the context supports geometry shaders.
*/