From: Chad Versace <chad.vers...@linux.intel.com> For glGetIntegerv, add support for the following in an OpenGL ES 3.0 context: GL_MAJOR_VERSION GL_MINOR_VERSION GL_NUM_EXTENSIONS
See Table 6.29 of the OpenGL ES 3.0 spec. Fixes error GL_INVALID_ENUM in piglit egl-create-context-verify-gl-flavor, testcase for OpenGL ES 3.0. Reviewed-by: Kenneth Graunke <kenn...@whitecape.org> (v1) Reviewed-by: Matt Turner <matts...@gmail.com> Signed-off-by: Chad Versace <chad.vers...@linux.intel.com> (v1) --- src/mesa/main/get.c | 6 ++++++ src/mesa/main/get_hash_params.py | 8 +++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c index c7f8ada..5927f1e 100644 --- a/src/mesa/main/get.c +++ b/src/mesa/main/get.c @@ -355,6 +355,12 @@ static const int extra_version_30[] = { EXTRA_VERSION_30, EXTRA_END }; static const int extra_version_31[] = { EXTRA_VERSION_31, EXTRA_END }; static const int extra_version_32[] = { EXTRA_VERSION_32, EXTRA_END }; +static const int extra_gl30_es3[] = { + EXTRA_VERSION_30, + EXTRA_API_ES3, + EXTRA_END, +}; + static const int extra_ARB_vertex_program_api_es2[] = { EXT(ARB_vertex_program), diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py index cb58394..8533be3 100644 --- a/src/mesa/main/get_hash_params.py +++ b/src/mesa/main/get_hash_params.py @@ -321,6 +321,11 @@ descriptor=[ # Enums in OpenGL and ES 3.0 { "apis": ["GL", "GL_CORE", "GLES3"], "params": [ +# GL 3.0 / GLES3 + [ "NUM_EXTENSIONS", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ], + [ "MAJOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ], + [ "MINOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_gl30_es3" ], + # GL_ARB_ES3_compatibility [ "MAX_ELEMENT_INDEX", "CONTEXT_INT64(Const.MaxElementIndex), extra_ARB_ES3_compatibility"], @@ -661,9 +666,6 @@ descriptor=[ [ "SAMPLER_BINDING", "LOC_CUSTOM, TYPE_INT, GL_SAMPLER_BINDING, NO_EXTRA" ], # GL 3.0 - [ "NUM_EXTENSIONS", "LOC_CUSTOM, TYPE_INT, 0, extra_version_30" ], - [ "MAJOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_version_30" ], - [ "MINOR_VERSION", "LOC_CUSTOM, TYPE_INT, 0, extra_version_30" ], [ "CONTEXT_FLAGS", "CONTEXT_INT(Const.ContextFlags), extra_version_30" ], # GL3.0 / GL_EXT_framebuffer_sRGB -- 1.7.8.6 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev