glsl: Scaffolding for ARB_shader_bit_encoding.

That adds support for activating the extension.  It doesn't actually
*do* anything yet, of course.

Signed-off-by: Olivier Galibert <galibert@pobox.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Olivier Galibert
2012-04-30 13:19:01 +02:00
committed by Kenneth Graunke
parent f8d40deea5
commit 199771bc32
8 changed files with 11 additions and 0 deletions

View File

@@ -186,6 +186,7 @@ read_builtins(GLenum target, const char *protos, const char **functions, unsigne
st->ARB_texture_rectangle_enable = true; st->ARB_texture_rectangle_enable = true;
st->EXT_texture_array_enable = true; st->EXT_texture_array_enable = true;
st->OES_EGL_image_external_enable = true; st->OES_EGL_image_external_enable = true;
st->ARB_shader_bit_encoding_enable = true;
_mesa_glsl_initialize_types(st); _mesa_glsl_initialize_types(st);
sh->ir = new(sh) exec_list; sh->ir = new(sh) exec_list;

View File

@@ -1141,6 +1141,9 @@ glcpp_parser_create (const struct gl_extensions *extensions, int api)
if (extensions->OES_EGL_image_external) if (extensions->OES_EGL_image_external)
add_builtin_define(parser, "GL_OES_EGL_image_external", 1); add_builtin_define(parser, "GL_OES_EGL_image_external", 1);
if (extensions->ARB_shader_bit_encoding)
add_builtin_define(parser, "GL_ARB_shader_bit_encoding", 1);
} }
language_version = 110; language_version = 110;

View File

@@ -295,6 +295,7 @@ static const _mesa_glsl_extension _mesa_glsl_supported_extensions[] = {
EXT(AMD_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export), EXT(AMD_shader_stencil_export, false, false, true, true, false, ARB_shader_stencil_export),
EXT(OES_texture_3D, true, false, true, false, true, EXT_texture3D), EXT(OES_texture_3D, true, false, true, false, true, EXT_texture3D),
EXT(OES_EGL_image_external, true, false, true, false, true, OES_EGL_image_external), EXT(OES_EGL_image_external, true, false, true, false, true, OES_EGL_image_external),
EXT(ARB_shader_bit_encoding, true, true, true, true, false, ARB_shader_bit_encoding),
}; };
#undef EXT #undef EXT

View File

@@ -205,6 +205,8 @@ struct _mesa_glsl_parse_state {
bool OES_texture_3D_warn; bool OES_texture_3D_warn;
bool OES_EGL_image_external_enable; bool OES_EGL_image_external_enable;
bool OES_EGL_image_external_warn; bool OES_EGL_image_external_warn;
bool ARB_shader_bit_encoding_enable;
bool ARB_shader_bit_encoding_warn;
/*@}*/ /*@}*/
/** Extensions supported by the OpenGL implementation. */ /** Extensions supported by the OpenGL implementation. */

View File

@@ -79,6 +79,7 @@ void initialize_context_to_defaults(struct gl_context *ctx, gl_api api)
ctx->Extensions.NV_texture_rectangle = true; ctx->Extensions.NV_texture_rectangle = true;
ctx->Extensions.EXT_texture3D = true; ctx->Extensions.EXT_texture3D = true;
ctx->Extensions.OES_EGL_image_external = true; ctx->Extensions.OES_EGL_image_external = true;
ctx->Extensions.ARB_shader_bit_encoding = true;
ctx->Const.GLSLVersion = 120; ctx->Const.GLSLVersion = 120;

View File

@@ -112,6 +112,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_robustness", o(dummy_true), GL, 2010 }, { "GL_ARB_robustness", o(dummy_true), GL, 2010 },
{ "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL, 2009 }, { "GL_ARB_sampler_objects", o(ARB_sampler_objects), GL, 2009 },
{ "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL, 2009 }, { "GL_ARB_seamless_cube_map", o(ARB_seamless_cube_map), GL, 2009 },
{ "GL_ARB_shader_bit_encoding", o(ARB_shader_bit_encoding), GL, 2010 },
{ "GL_ARB_shader_objects", o(ARB_shader_objects), GL, 2002 }, { "GL_ARB_shader_objects", o(ARB_shader_objects), GL, 2002 },
{ "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 }, { "GL_ARB_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
{ "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 }, { "GL_ARB_shader_texture_lod", o(ARB_shader_texture_lod), GL, 2009 },

View File

@@ -2895,6 +2895,7 @@ struct gl_extensions
GLboolean ARB_point_sprite; GLboolean ARB_point_sprite;
GLboolean ARB_sampler_objects; GLboolean ARB_sampler_objects;
GLboolean ARB_seamless_cube_map; GLboolean ARB_seamless_cube_map;
GLboolean ARB_shader_bit_encoding;
GLboolean ARB_shader_objects; GLboolean ARB_shader_objects;
GLboolean ARB_shader_stencil_export; GLboolean ARB_shader_stencil_export;
GLboolean ARB_shader_texture_lod; GLboolean ARB_shader_texture_lod;

View File

@@ -171,6 +171,7 @@ compute_version(struct gl_context *ctx)
ctx->Extensions.ARB_instanced_arrays && ctx->Extensions.ARB_instanced_arrays &&
ctx->Extensions.ARB_occlusion_query2 && ctx->Extensions.ARB_occlusion_query2 &&
ctx->Extensions.ARB_sampler_objects && ctx->Extensions.ARB_sampler_objects &&
ctx->Extensions.ARB_shader_bit_encoding &&
ctx->Extensions.ARB_texture_rgb10_a2ui && ctx->Extensions.ARB_texture_rgb10_a2ui &&
ctx->Extensions.ARB_timer_query && ctx->Extensions.ARB_timer_query &&
ctx->Extensions.ARB_vertex_type_2_10_10_10_rev && ctx->Extensions.ARB_vertex_type_2_10_10_10_rev &&