summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/get.c
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2016-08-28 19:51:45 -0400
committerIlia Mirkin <[email protected]>2016-09-13 20:49:47 -0400
commita69dc2c41294a4b7126804050bd4d10f3208852e (patch)
tree0d1738526cf3ed1a19333225783b559f0692b1d8 /src/mesa/main/get.c
parentaa7b410592700bf6253e8695ea208d0448c1610e (diff)
mesa: add a GLES3.2 enums section, and expose new MS line width params
This also exposes them for ARB_ES3_2_compatibility. While both specs refer to the new MS line width parameters being separate from the existing AA line widths, reality begs to differ. It's the same on all hardware currently supported by mesa. Should hardware come along that wants these to be different, they're easy enough to separate out. Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Ian Romanick <[email protected]> (v1) Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/mesa/main/get.c')
-rw-r--r--src/mesa/main/get.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 810ccb9e396..3cabb2ba29c 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -142,6 +142,7 @@ enum value_extra {
EXTRA_API_ES2,
EXTRA_API_ES3,
EXTRA_API_ES31,
+ EXTRA_API_ES32,
EXTRA_NEW_BUFFERS,
EXTRA_NEW_FRAG_CLAMP,
EXTRA_VALID_DRAW_BUFFER,
@@ -416,6 +417,12 @@ static const int extra_ARB_gpu_shader5_or_OES_sample_variables[] = {
EXTRA_END
};
+static const int extra_ES32[] = {
+ EXT(ARB_ES3_2_compatibility),
+ EXTRA_API_ES32,
+ EXTRA_END
+};
+
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(EXT_texture_array);
EXTRA_EXT(NV_fog_distance);
@@ -1164,6 +1171,11 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
if (_mesa_is_gles31(ctx))
api_found = GL_TRUE;
break;
+ case EXTRA_API_ES32:
+ api_check = GL_TRUE;
+ if (_mesa_is_gles32(ctx))
+ api_found = GL_TRUE;
+ break;
case EXTRA_API_GL:
api_check = GL_TRUE;
if (_mesa_is_desktop_gl(ctx))
@@ -1312,12 +1324,14 @@ find_value(const char *func, GLenum pname, void **p, union value *v)
* value since it's compatible with GLES2 its entry in table_set[] is at the
* end.
*/
- STATIC_ASSERT(ARRAY_SIZE(table_set) == API_OPENGL_LAST + 3);
- if (_mesa_is_gles3(ctx)) {
- api = API_OPENGL_LAST + 1;
- }
- if (_mesa_is_gles31(ctx)) {
- api = API_OPENGL_LAST + 2;
+ STATIC_ASSERT(ARRAY_SIZE(table_set) == API_OPENGL_LAST + 4);
+ if (ctx->API == API_OPENGLES2) {
+ if (ctx->Version >= 32)
+ api = API_OPENGL_LAST + 3;
+ else if (ctx->Version >= 31)
+ api = API_OPENGL_LAST + 2;
+ else if (ctx->Version >= 30)
+ api = API_OPENGL_LAST + 1;
}
mask = ARRAY_SIZE(table(api)) - 1;
hash = (pname * prime_factor);