aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/get.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-11 08:22:46 +0100
committermarha <marha@users.sourceforge.net>2013-01-11 08:22:46 +0100
commit0e1adc84d471955eaabe26486154e8ec44e91dd4 (patch)
treee2363fb022bfa7b730b0032b4c35379aa2a997d6 /mesalib/src/mesa/main/get.c
parente59b1896b907c5ecfe184723d4c6adc2c20fa678 (diff)
parentddc05759f098f06bd93253a7bffe38640963dfb3 (diff)
downloadvcxsrv-0e1adc84d471955eaabe26486154e8ec44e91dd4.tar.gz
vcxsrv-0e1adc84d471955eaabe26486154e8ec44e91dd4.tar.bz2
vcxsrv-0e1adc84d471955eaabe26486154e8ec44e91dd4.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig libX11 mesa mkfontscale xserver git update 11 jan 2013 Conflicts: mesalib/src/glsl/.gitignore mesalib/src/glsl/glcpp/.gitignore mesalib/src/mapi/glapi/gen/.gitignore mesalib/src/mesa/program/.gitignore
Diffstat (limited to 'mesalib/src/mesa/main/get.c')
-rw-r--r--mesalib/src/mesa/main/get.c49
1 files changed, 43 insertions, 6 deletions
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 273a79f7f..7d922ca15 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -131,6 +131,7 @@ enum value_extra {
EXTRA_API_GL,
EXTRA_API_GL_CORE,
EXTRA_API_ES2,
+ EXTRA_API_ES3,
EXTRA_NEW_BUFFERS,
EXTRA_NEW_FRAG_CLAMP,
EXTRA_VALID_DRAW_BUFFER,
@@ -290,14 +291,30 @@ static const int extra_texture_buffer_object[] = {
EXTRA_END
};
+static const int extra_ARB_transform_feedback2_api_es3[] = {
+ EXT(ARB_transform_feedback2),
+ EXTRA_API_ES3,
+ EXTRA_END
+};
+
static const int extra_ARB_uniform_buffer_object_and_geometry_shader[] = {
EXT(ARB_uniform_buffer_object),
EXT(ARB_geometry_shader4),
EXTRA_END
};
+static const int extra_ARB_ES2_compatibility_api_es2[] = {
+ EXT(ARB_ES2_compatibility),
+ EXTRA_API_ES2,
+ EXTRA_END
+};
+
+static const int extra_ARB_ES3_compatibility_api_es3[] = {
+ EXT(ARB_ES3_compatibility),
+ EXTRA_API_ES3,
+ EXTRA_END
+};
-EXTRA_EXT(ARB_ES2_compatibility);
EXTRA_EXT(ARB_texture_cube_map);
EXTRA_EXT(MESA_texture_array);
EXTRA_EXT2(EXT_secondary_color, ARB_vertex_program);
@@ -322,7 +339,6 @@ EXTRA_EXT(ARB_seamless_cube_map);
EXTRA_EXT(ARB_sync);
EXTRA_EXT(ARB_vertex_shader);
EXTRA_EXT(EXT_transform_feedback);
-EXTRA_EXT(ARB_transform_feedback2);
EXTRA_EXT(ARB_transform_feedback3);
EXTRA_EXT(EXT_pixel_buffer_object);
EXTRA_EXT(ARB_vertex_program);
@@ -348,6 +364,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),
@@ -874,6 +896,12 @@ check_extra(struct gl_context *ctx, const char *func, const struct value_desc *d
enabled++;
}
break;
+ case EXTRA_API_ES3:
+ if (_mesa_is_gles3(ctx)) {
+ total++;
+ enabled++;
+ }
+ break;
case EXTRA_API_GL:
if (_mesa_is_desktop_gl(ctx)) {
total++;
@@ -973,6 +1001,15 @@ find_value(const char *func, GLenum pname, void **p, union value *v)
int api;
api = ctx->API;
+ /* We index into the table_set[] list of per-API hash tables using the API's
+ * value in the gl_api enum. Since GLES 3 doesn't have an API_OPENGL* enum
+ * value since it's compatible with GLES2 its entry in table_set[] is at the
+ * end.
+ */
+ STATIC_ASSERT(Elements(table_set) == API_OPENGL_LAST + 2);
+ if (_mesa_is_gles3(ctx)) {
+ api = API_OPENGL_LAST + 1;
+ }
mask = Elements(table(api)) - 1;
hash = (pname * prime_factor);
while (1) {
@@ -1626,7 +1663,7 @@ _mesa_GetBooleani_v( GLenum pname, GLuint index, GLboolean *params )
{
union value v;
enum value_type type =
- find_value_indexed("glGetBooleanIndexedv", pname, index, &v);
+ find_value_indexed("glGetBooleani_v", pname, index, &v);
switch (type) {
case TYPE_INT:
@@ -1651,7 +1688,7 @@ _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params )
{
union value v;
enum value_type type =
- find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
+ find_value_indexed("glGetIntegeri_v", pname, index, &v);
switch (type) {
case TYPE_INT:
@@ -1672,11 +1709,11 @@ _mesa_GetIntegeri_v( GLenum pname, GLuint index, GLint *params )
}
void GLAPIENTRY
-_mesa_GetInteger64Indexedv( GLenum pname, GLuint index, GLint64 *params )
+_mesa_GetInteger64i_v( GLenum pname, GLuint index, GLint64 *params )
{
union value v;
enum value_type type =
- find_value_indexed("glGetIntegerIndexedv", pname, index, &v);
+ find_value_indexed("glGetInteger64i_v", pname, index, &v);
switch (type) {
case TYPE_INT: