aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/extensions.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2013-01-22 14:07:34 +0100
committermarha <marha@users.sourceforge.net>2013-01-22 14:07:34 +0100
commit470f7ca9f0be348faf2f03fc16811844c5eeffce (patch)
tree3071ab9b9fbabc772ee68c86fe587f260bde26c6 /mesalib/src/mesa/main/extensions.c
parent4fc6b34d1c14cc61f553ca59264d0909656933f3 (diff)
downloadvcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.tar.gz
vcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.tar.bz2
vcxsrv-470f7ca9f0be348faf2f03fc16811844c5eeffce.zip
fontconfig libfontenc mesa mkfontscale pixman xserver xkeyboard-config
fontconfig: 000ca9ccb03013a5b151f0d21148ab0ca4c2f2de libfontenc: f5d1208172e965fdd7fae8927bd3e29b3cc3a975 mesa: 148fc6d53716f39971a453792570c2b8c207efb6 mkfontscale: 547517571e695728278a264eedbac47b6e1f43bc pixman: 2c6577476e5b18e17904ae8af244a39c352e2e33 xserver: 70b127c9f1c53bdb42f078265e67f76b464deae2 xkeyboard-config: 6b35b1b43d2fdff30f530d7cf65fffd6c3504690
Diffstat (limited to 'mesalib/src/mesa/main/extensions.c')
-rw-r--r--mesalib/src/mesa/main/extensions.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index 23b494836..fd25d31c6 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -45,6 +45,7 @@ enum {
GL = (1 << API_OPENGL_COMPAT) | (1 << API_OPENGL_CORE),
ES1 = 1 << API_OPENGLES,
ES2 = 1 << API_OPENGLES2,
+ ES3 = 1 << (API_OPENGL_LAST + 1),
};
/**
@@ -232,6 +233,7 @@ static const struct extension extension_table[] = {
{ "GL_EXT_unpack_subimage", o(dummy_true), ES2, 2011 },
{ "GL_EXT_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 },
{ "GL_EXT_vertex_array", o(dummy_true), GLL, 1995 },
+ { "GL_EXT_color_buffer_float", o(dummy_true), ES3, 2013 },
/* OES extensions */
{ "GL_OES_blend_equation_separate", o(EXT_blend_equation_separate), ES1, 2009 },
@@ -243,6 +245,7 @@ static const struct extension extension_table[] = {
{ "GL_OES_depth24", o(EXT_framebuffer_object), ES1 | ES2, 2005 },
{ "GL_OES_depth32", o(dummy_false), DISABLE, 2005 },
{ "GL_OES_depth_texture", o(ARB_depth_texture), ES2, 2006 },
+ { "GL_OES_depth_texture_cube_map", o(OES_depth_texture_cube_map), ES2, 2012 },
{ "GL_OES_draw_texture", o(OES_draw_texture), ES1, 2004 },
/* FIXME: Mesa expects GL_OES_EGL_image to be available in OpenGL contexts. */
{ "GL_OES_EGL_image", o(OES_EGL_image), GL | ES1 | ES2, 2006 },
@@ -745,6 +748,9 @@ _mesa_make_extension_string(struct gl_context *ctx)
const struct extension *i;
unsigned j;
unsigned maxYear = ~0;
+ unsigned api_set = (1 << ctx->API);
+ if (_mesa_is_gles3(ctx))
+ api_set |= ES3;
/* Check if the MESA_EXTENSION_MAX_YEAR env var is set */
{
@@ -761,7 +767,7 @@ _mesa_make_extension_string(struct gl_context *ctx)
for (i = extension_table; i->name != 0; ++i) {
if (base[i->offset] &&
i->year <= maxYear &&
- (i->api_set & (1 << ctx->API))) {
+ (i->api_set & api_set)) {
length += strlen(i->name) + 1; /* +1 for space */
++count;
}
@@ -791,7 +797,7 @@ _mesa_make_extension_string(struct gl_context *ctx)
for (i = extension_table; i->name != 0; ++i) {
if (base[i->offset] &&
i->year <= maxYear &&
- (i->api_set & (1 << ctx->API))) {
+ (i->api_set & api_set)) {
extension_indices[j++] = i - extension_table;
}
}
@@ -801,7 +807,7 @@ _mesa_make_extension_string(struct gl_context *ctx)
/* Build the extension string.*/
for (j = 0; j < count; ++j) {
i = &extension_table[extension_indices[j]];
- assert(base[i->offset] && (i->api_set & (1 << ctx->API)));
+ assert(base[i->offset] && (i->api_set & api_set));
strcat(exts, i->name);
strcat(exts, " ");
}
@@ -822,6 +828,9 @@ _mesa_get_extension_count(struct gl_context *ctx)
{
GLboolean *base;
const struct extension *i;
+ unsigned api_set = (1 << ctx->API);
+ if (_mesa_is_gles3(ctx))
+ api_set |= ES3;
/* only count once */
if (ctx->Extensions.Count != 0)
@@ -829,7 +838,7 @@ _mesa_get_extension_count(struct gl_context *ctx)
base = (GLboolean *) &ctx->Extensions;
for (i = extension_table; i->name != 0; ++i) {
- if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
+ if (base[i->offset] && (i->api_set & api_set)) {
ctx->Extensions.Count++;
}
}
@@ -845,11 +854,14 @@ _mesa_get_enabled_extension(struct gl_context *ctx, GLuint index)
const GLboolean *base;
size_t n;
const struct extension *i;
+ unsigned api_set = (1 << ctx->API);
+ if (_mesa_is_gles3(ctx))
+ api_set |= ES3;
base = (GLboolean*) &ctx->Extensions;
n = 0;
for (i = extension_table; i->name != 0; ++i) {
- if (base[i->offset] && (i->api_set & (1 << ctx->API))) {
+ if (base[i->offset] && (i->api_set & api_set)) {
if (n == index)
return (const GLubyte*) i->name;
else