Mesa (gles3): mesa: Support more glGet enums for ES3
Chad Versace
chadversary at kemper.freedesktop.org
Wed Nov 21 17:20:53 UTC 2012
Module: Mesa
Branch: gles3
Commit: fd617ef716994f4347d304f72840ab7b860e58b4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fd617ef716994f4347d304f72840ab7b860e58b4
Author: Chad Versace <chad.versace at linux.intel.com>
Date: Tue Nov 20 17:04:45 2012 -0800
mesa: Support more glGet enums for ES3
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 <kenneth at whitecape.org>
Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---
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 43bf3b9..df5a9e6 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -396,6 +396,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 1772ed2..7939c88 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -609,9 +609,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
@@ -648,6 +645,11 @@ descriptor=[
]},
{ "apis": ["GL", "GL_CORE", "GLES2"], "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_EXT_pixel_buffer_object
[ "PIXEL_PACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object_api_es3" ],
[ "PIXEL_UNPACK_BUFFER_BINDING_EXT", "LOC_CUSTOM, TYPE_INT, 0, extra_EXT_pixel_buffer_object_api_es3" ],
More information about the mesa-commit
mailing list