aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/mesa')
-rw-r--r--mesalib/src/mesa/drivers/dri/swrast/swrast.c4
-rw-r--r--mesalib/src/mesa/main/enable.c2
-rw-r--r--mesalib/src/mesa/main/extensions.c75
-rw-r--r--mesalib/src/mesa/main/get.c7
-rw-r--r--mesalib/src/mesa/main/get_hash_params.py17
-rw-r--r--mesalib/src/mesa/main/mtypes.h19
-rw-r--r--mesalib/src/mesa/main/version.c2
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_array.c10
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_clip.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_atom_constbuf.c6
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_bitmap.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_clear.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawpixels.c8
-rw-r--r--mesalib/src/mesa/state_tracker/st_cb_drawtex.c5
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.c3
-rw-r--r--mesalib/src/mesa/state_tracker/st_context.h3
-rw-r--r--mesalib/src/mesa/state_tracker/st_draw_feedback.c4
-rw-r--r--mesalib/src/mesa/state_tracker/st_extensions.c11
18 files changed, 80 insertions, 116 deletions
diff --git a/mesalib/src/mesa/drivers/dri/swrast/swrast.c b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
index ffeda5161..f6c6133e3 100644
--- a/mesalib/src/mesa/drivers/dri/swrast/swrast.c
+++ b/mesalib/src/mesa/drivers/dri/swrast/swrast.c
@@ -653,12 +653,8 @@ swrast_init_driver_functions(struct dd_function_table *driver)
static const char *es2_extensions[] = {
/* Used by mesa internally (cf all_mesa_extensions in ../common/utils.c) */
- "GL_ARB_transpose_matrix",
- "GL_ARB_window_pos",
"GL_EXT_blend_func_separate",
- "GL_EXT_compiled_vertex_array",
"GL_EXT_framebuffer_blit",
- "GL_IBM_multimode_draw_arrays",
"GL_MESA_window_pos",
/* Required by GLES2 */
diff --git a/mesalib/src/mesa/main/enable.c b/mesalib/src/mesa/main/enable.c
index e60a05a9e..e704f2f2d 100644
--- a/mesalib/src/mesa/main/enable.c
+++ b/mesalib/src/mesa/main/enable.c
@@ -803,7 +803,6 @@ _mesa_set_enable(struct gl_context *ctx, GLenum cap, GLboolean state)
case GL_RASTER_POSITION_UNCLIPPED_IBM:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION(IBM_rasterpos_clip, cap);
if (ctx->Transform.RasterPositionUnclipped == state)
return;
FLUSH_VERTICES(ctx, _NEW_TRANSFORM);
@@ -1450,7 +1449,6 @@ _mesa_IsEnabled( GLenum cap )
case GL_RASTER_POSITION_UNCLIPPED_IBM:
if (ctx->API != API_OPENGL)
goto invalid_enum_error;
- CHECK_EXTENSION(IBM_rasterpos_clip);
return ctx->Transform.RasterPositionUnclipped;
/* GL_NV_point_sprite */
diff --git a/mesalib/src/mesa/main/extensions.c b/mesalib/src/mesa/main/extensions.c
index edee5967d..f8688cdb9 100644
--- a/mesalib/src/mesa/main/extensions.c
+++ b/mesalib/src/mesa/main/extensions.c
@@ -83,7 +83,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_base_instance", o(ARB_base_instance), GL, 2011 },
{ "GL_ARB_blend_func_extended", o(ARB_blend_func_extended), GL, 2009 },
{ "GL_ARB_color_buffer_float", o(ARB_color_buffer_float), GL, 2004 },
- { "GL_ARB_copy_buffer", o(ARB_copy_buffer), GL, 2008 },
+ { "GL_ARB_copy_buffer", o(dummy_true), GL, 2008 },
{ "GL_ARB_conservative_depth", o(ARB_conservative_depth), GL, 2011 },
{ "GL_ARB_debug_output", o(dummy_true), GL, 2009 },
{ "GL_ARB_depth_buffer_float", o(ARB_depth_buffer_float), GL, 2008 },
@@ -104,6 +104,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_half_float_vertex", o(ARB_half_float_vertex), GL, 2008 },
{ "GL_ARB_instanced_arrays", o(ARB_instanced_arrays), GL, 2008 },
{ "GL_ARB_invalidate_subdata", o(dummy_true), GL, 2012 },
+ { "GL_ARB_map_buffer_alignment", o(ARB_map_buffer_alignment), GL, 2011 },
{ "GL_ARB_map_buffer_range", o(ARB_map_buffer_range), GL, 2008 },
{ "GL_ARB_multisample", o(dummy_true), GLL, 1994 },
{ "GL_ARB_multitexture", o(dummy_true), GLL, 1998 },
@@ -145,7 +146,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_transform_feedback2", o(ARB_transform_feedback2), GL, 2010 },
{ "GL_ARB_transform_feedback3", o(ARB_transform_feedback3), GL, 2010 },
{ "GL_ARB_transform_feedback_instanced", o(ARB_transform_feedback_instanced), GL, 2011 },
- { "GL_ARB_transpose_matrix", o(ARB_transpose_matrix), GLL, 1999 },
+ { "GL_ARB_transpose_matrix", o(dummy_true), GLL, 1999 },
{ "GL_ARB_uniform_buffer_object", o(ARB_uniform_buffer_object), GL, 2009 },
{ "GL_ARB_vertex_array_bgra", o(EXT_vertex_array_bgra), GL, 2008 },
{ "GL_ARB_vertex_array_object", o(dummy_true), GL, 2006 },
@@ -153,7 +154,7 @@ static const struct extension extension_table[] = {
{ "GL_ARB_vertex_program", o(ARB_vertex_program), GLL, 2002 },
{ "GL_ARB_vertex_shader", o(ARB_vertex_shader), GL, 2002 },
{ "GL_ARB_vertex_type_2_10_10_10_rev", o(ARB_vertex_type_2_10_10_10_rev), GL, 2009 },
- { "GL_ARB_window_pos", o(ARB_window_pos), GLL, 2001 },
+ { "GL_ARB_window_pos", o(dummy_true), GLL, 2001 },
/* EXT extensions */
{ "GL_EXT_abgr", o(dummy_true), GL, 1995 },
{ "GL_EXT_bgra", o(dummy_true), GLL, 1995 },
@@ -163,12 +164,12 @@ static const struct extension extension_table[] = {
{ "GL_EXT_blend_minmax", o(EXT_blend_minmax), GLL | ES1 | ES2, 1995 },
{ "GL_EXT_blend_subtract", o(dummy_true), GLL, 1995 },
{ "GL_EXT_clip_volume_hint", o(EXT_clip_volume_hint), GL, 1996 },
- { "GL_EXT_compiled_vertex_array", o(EXT_compiled_vertex_array), GLL, 1996 },
+ { "GL_EXT_compiled_vertex_array", o(dummy_true), GLL, 1996 },
{ "GL_EXT_copy_texture", o(dummy_true), GLL, 1995 },
{ "GL_EXT_depth_bounds_test", o(EXT_depth_bounds_test), GL, 2002 },
{ "GL_EXT_draw_buffers2", o(EXT_draw_buffers2), GL, 2006 },
{ "GL_EXT_draw_instanced", o(ARB_draw_instanced), GL, 2006 },
- { "GL_EXT_draw_range_elements", o(EXT_draw_range_elements), GLL, 1997 },
+ { "GL_EXT_draw_range_elements", o(dummy_true), GLL, 1997 },
{ "GL_EXT_fog_coord", o(EXT_fog_coord), GLL, 1999 },
{ "GL_EXT_framebuffer_blit", o(EXT_framebuffer_blit), GL, 2005 },
{ "GL_EXT_framebuffer_multisample", o(EXT_framebuffer_multisample), GL, 2005 },
@@ -180,15 +181,15 @@ static const struct extension extension_table[] = {
{ "GL_EXT_multi_draw_arrays", o(dummy_true), GLL | ES1 | ES2, 1999 },
{ "GL_EXT_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2005 },
{ "GL_EXT_packed_float", o(EXT_packed_float), GL, 2004 },
- { "GL_EXT_packed_pixels", o(EXT_packed_pixels), GLL, 1997 },
+ { "GL_EXT_packed_pixels", o(dummy_true), GLL, 1997 },
{ "GL_EXT_pixel_buffer_object", o(EXT_pixel_buffer_object), GL, 2004 },
{ "GL_EXT_point_parameters", o(EXT_point_parameters), GLL, 1997 },
{ "GL_EXT_polygon_offset", o(dummy_true), GLL, 1995 },
{ "GL_EXT_provoking_vertex", o(EXT_provoking_vertex), GL, 2009 },
- { "GL_EXT_rescale_normal", o(EXT_rescale_normal), GLL, 1997 },
+ { "GL_EXT_rescale_normal", o(dummy_true), GLL, 1997 },
{ "GL_EXT_secondary_color", o(EXT_secondary_color), GLL, 1999 },
{ "GL_EXT_separate_shader_objects", o(EXT_separate_shader_objects), GLL, 2008 },
- { "GL_EXT_separate_specular_color", o(EXT_separate_specular_color), GLL, 1997 },
+ { "GL_EXT_separate_specular_color", o(dummy_true), GLL, 1997 },
{ "GL_EXT_shadow_funcs", o(EXT_shadow_funcs), GLL, 2002 },
{ "GL_EXT_stencil_two_side", o(EXT_stencil_two_side), GLL, 2001 },
{ "GL_EXT_stencil_wrap", o(dummy_true), GLL, 2002 },
@@ -274,7 +275,7 @@ static const struct extension extension_table[] = {
{ "GL_AMD_seamless_cubemap_per_texture", o(AMD_seamless_cubemap_per_texture), GL, 2009 },
{ "GL_AMD_shader_stencil_export", o(ARB_shader_stencil_export), GL, 2009 },
{ "GL_APPLE_object_purgeable", o(APPLE_object_purgeable), GL, 2006 },
- { "GL_APPLE_packed_pixels", o(APPLE_packed_pixels), GLL, 2002 },
+ { "GL_APPLE_packed_pixels", o(dummy_true), GLL, 2002 },
{ "GL_APPLE_texture_max_level", o(dummy_true), ES1 | ES2, 2009 },
{ "GL_APPLE_vertex_array_object", o(dummy_true), GLL, 2002 },
{ "GL_ATI_blend_equation_separate", o(EXT_blend_equation_separate), GL, 2003 },
@@ -286,15 +287,15 @@ static const struct extension extension_table[] = {
{ "GL_ATI_texture_env_combine3", o(ATI_texture_env_combine3), GLL, 2002 },
{ "GL_ATI_texture_float", o(ARB_texture_float), GL, 2002 },
{ "GL_ATI_texture_mirror_once", o(ATI_texture_mirror_once), GL, 2006 },
- { "GL_IBM_multimode_draw_arrays", o(IBM_multimode_draw_arrays), GL, 1998 },
- { "GL_IBM_rasterpos_clip", o(IBM_rasterpos_clip), GL, 1996 },
+ { "GL_IBM_multimode_draw_arrays", o(dummy_true), GL, 1998 },
+ { "GL_IBM_rasterpos_clip", o(dummy_true), GL, 1996 },
{ "GL_IBM_texture_mirrored_repeat", o(dummy_true), GLL, 1998 },
{ "GL_INGR_blend_func_separate", o(EXT_blend_func_separate), GLL, 1999 },
{ "GL_MESA_pack_invert", o(MESA_pack_invert), GL, 2002 },
{ "GL_MESA_resize_buffers", o(MESA_resize_buffers), GL, 1999 },
{ "GL_MESA_texture_array", o(MESA_texture_array), GLL, 2007 },
{ "GL_MESA_texture_signed_rgba", o(EXT_texture_snorm), GL, 2009 },
- { "GL_MESA_window_pos", o(ARB_window_pos), GLL, 2000 },
+ { "GL_MESA_window_pos", o(dummy_true), GLL, 2000 },
{ "GL_MESA_ycbcr_texture", o(MESA_ycbcr_texture), GL, 2002 },
{ "GL_NV_blend_square", o(NV_blend_square), GLL, 1999 },
{ "GL_NV_conditional_render", o(NV_conditional_render), GL, 2008 },
@@ -303,12 +304,12 @@ static const struct extension extension_table[] = {
{ "GL_NV_fbo_color_attachments", o(EXT_framebuffer_object), ES2, 2010 },
{ "GL_NV_fog_distance", o(NV_fog_distance), GLL, 2001 },
{ "GL_NV_fragment_program_option", o(NV_fragment_program_option), GLL, 2005 },
- { "GL_NV_light_max_exponent", o(NV_light_max_exponent), GLL, 1999 },
+ { "GL_NV_light_max_exponent", o(dummy_true), GLL, 1999 },
{ "GL_NV_packed_depth_stencil", o(EXT_packed_depth_stencil), GL, 2000 },
{ "GL_NV_point_sprite", o(NV_point_sprite), GL, 2001 },
{ "GL_NV_primitive_restart", o(NV_primitive_restart), GL, 2002 },
{ "GL_NV_read_buffer", o(dummy_true), ES2, 2011 },
- { "GL_NV_texgen_reflection", o(NV_texgen_reflection), GLL, 1999 },
+ { "GL_NV_texgen_reflection", o(dummy_true), GLL, 1999 },
{ "GL_NV_texture_barrier", o(NV_texture_barrier), GL, 2009 },
{ "GL_NV_texture_env_combine4", o(NV_texture_env_combine4), GLL, 1999 },
{ "GL_NV_texture_rectangle", o(NV_texture_rectangle), GLL, 2000 },
@@ -316,7 +317,7 @@ static const struct extension extension_table[] = {
{ "GL_SGIS_generate_mipmap", o(dummy_true), GLL, 1997 },
{ "GL_SGIS_texture_border_clamp", o(ARB_texture_border_clamp), GLL, 1997 },
{ "GL_SGIS_texture_edge_clamp", o(dummy_true), GLL, 1997 },
- { "GL_SGIS_texture_lod", o(SGIS_texture_lod), GLL, 1997 },
+ { "GL_SGIS_texture_lod", o(dummy_true), GLL, 1997 },
{ "GL_SUN_multi_draw_arrays", o(dummy_true), GLL, 1999 },
{ 0, 0, 0, 0 },
@@ -349,46 +350,12 @@ name_to_offset(const char* name)
/**
- * \brief Extensions enabled by default.
- *
- * These extensions are enabled by _mesa_init_extensions().
- *
- * XXX: Should these defaults also apply to GLES?
- */
-static const size_t default_extensions[] = {
- o(ARB_copy_buffer),
- o(ARB_transpose_matrix),
- o(ARB_window_pos),
-
- o(EXT_compiled_vertex_array),
- o(EXT_draw_range_elements),
- o(EXT_packed_pixels),
- o(EXT_rescale_normal),
- o(EXT_separate_specular_color),
- o(EXT_texture3D),
-
- o(OES_standard_derivatives),
-
- /* Vendor Extensions */
- o(APPLE_packed_pixels),
- o(IBM_multimode_draw_arrays),
- o(IBM_rasterpos_clip),
- o(NV_light_max_exponent),
- o(NV_texgen_reflection),
- o(SGIS_texture_lod),
-
- 0,
-};
-
-
-/**
* Enable all extensions suitable for a software-only renderer.
* This is a convenience function used by the XMesa, OSMesa, GGI drivers, etc.
*/
void
_mesa_enable_sw_extensions(struct gl_context *ctx)
{
- /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/
ctx->Extensions.ARB_depth_clamp = GL_TRUE;
ctx->Extensions.ARB_depth_texture = GL_TRUE;
ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
@@ -461,20 +428,18 @@ _mesa_enable_sw_extensions(struct gl_context *ctx)
ctx->Extensions.EXT_texture_swizzle = GL_TRUE;
/*ctx->Extensions.EXT_transform_feedback = GL_TRUE;*/
ctx->Extensions.EXT_vertex_array_bgra = GL_TRUE;
- /*ctx->Extensions.IBM_multimode_draw_arrays = GL_TRUE;*/
ctx->Extensions.MESA_pack_invert = GL_TRUE;
ctx->Extensions.MESA_resize_buffers = GL_TRUE;
ctx->Extensions.MESA_texture_array = GL_TRUE;
ctx->Extensions.MESA_ycbcr_texture = GL_TRUE;
ctx->Extensions.NV_blend_square = GL_TRUE;
ctx->Extensions.NV_conditional_render = GL_TRUE;
- /*ctx->Extensions.NV_light_max_exponent = GL_TRUE;*/
ctx->Extensions.NV_point_sprite = GL_TRUE;
ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
ctx->Extensions.NV_texture_rectangle = GL_TRUE;
- /*ctx->Extensions.NV_texgen_reflection = GL_TRUE;*/
ctx->Extensions.NV_fragment_program_option = GL_TRUE;
ctx->Extensions.EXT_gpu_program_parameters = GL_TRUE;
+ ctx->Extensions.OES_standard_derivatives = GL_TRUE;
_mesa_enable_extension(ctx, "GL_3DFX_texture_compression_FXT1");
if (ctx->Mesa_DXTn) {
ctx->Extensions.ANGLE_texture_compression_dxt = GL_TRUE;
@@ -495,7 +460,6 @@ _mesa_enable_1_3_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_texture_cube_map = GL_TRUE;
ctx->Extensions.ARB_texture_env_combine = GL_TRUE;
ctx->Extensions.ARB_texture_env_dot3 = GL_TRUE;
- /*ctx->Extensions.ARB_transpose_matrix = GL_TRUE;*/
}
@@ -510,7 +474,6 @@ _mesa_enable_1_4_extensions(struct gl_context *ctx)
ctx->Extensions.ARB_depth_texture = GL_TRUE;
ctx->Extensions.ARB_shadow = GL_TRUE;
ctx->Extensions.ARB_texture_env_crossbar = GL_TRUE;
- ctx->Extensions.ARB_window_pos = GL_TRUE;
ctx->Extensions.EXT_blend_color = GL_TRUE;
ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
ctx->Extensions.EXT_blend_minmax = GL_TRUE;
@@ -717,7 +680,6 @@ _mesa_init_extensions( struct gl_context *ctx )
GLboolean *base = (GLboolean *) &ctx->Extensions;
GLboolean *sentinel = base + o(extension_sentinel);
GLboolean *i;
- const size_t *j;
/* First, turn all extensions off. */
for (i = base; i != sentinel; ++i)
@@ -725,8 +687,7 @@ _mesa_init_extensions( struct gl_context *ctx )
/* Then, selectively turn default extensions on. */
ctx->Extensions.dummy_true = GL_TRUE;
- for (j = default_extensions; *j != 0; ++j)
- base[*j] = GL_TRUE;
+ ctx->Extensions.EXT_texture3D = GL_TRUE;
}
diff --git a/mesalib/src/mesa/main/get.c b/mesalib/src/mesa/main/get.c
index 805f0f978..c34d873f2 100644
--- a/mesalib/src/mesa/main/get.c
+++ b/mesalib/src/mesa/main/get.c
@@ -303,11 +303,9 @@ EXTRA_EXT(EXT_secondary_color);
EXTRA_EXT(EXT_fog_coord);
EXTRA_EXT(NV_fog_distance);
EXTRA_EXT(EXT_texture_filter_anisotropic);
-EXTRA_EXT(IBM_rasterpos_clip);
EXTRA_EXT(NV_point_sprite);
EXTRA_EXT(NV_texture_rectangle);
EXTRA_EXT(EXT_stencil_two_side);
-EXTRA_EXT(NV_light_max_exponent);
EXTRA_EXT(EXT_depth_bounds_test);
EXTRA_EXT(ARB_depth_clamp);
EXTRA_EXT(ATI_fragment_shader);
@@ -319,7 +317,6 @@ EXTRA_EXT(ARB_fragment_program);
EXTRA_EXT2(ARB_framebuffer_object, EXT_framebuffer_multisample);
EXTRA_EXT(EXT_framebuffer_object);
EXTRA_EXT(ARB_seamless_cube_map);
-EXTRA_EXT(EXT_compiled_vertex_array);
EXTRA_EXT(ARB_sync);
EXTRA_EXT(ARB_vertex_shader);
EXTRA_EXT(EXT_transform_feedback);
@@ -331,13 +328,13 @@ EXTRA_EXT2(NV_point_sprite, ARB_point_sprite);
EXTRA_EXT2(ARB_vertex_program, ARB_fragment_program);
EXTRA_EXT(ARB_geometry_shader4);
EXTRA_EXT(ARB_color_buffer_float);
-EXTRA_EXT(ARB_copy_buffer);
EXTRA_EXT(EXT_framebuffer_sRGB);
EXTRA_EXT(ARB_texture_buffer_object);
EXTRA_EXT(OES_EGL_image_external);
EXTRA_EXT(ARB_blend_func_extended);
EXTRA_EXT(ARB_uniform_buffer_object);
EXTRA_EXT(ARB_timer_query);
+EXTRA_EXT(ARB_map_buffer_alignment);
static const int
extra_NV_primitive_restart[] = {
@@ -360,7 +357,7 @@ extra_ARB_vertex_program_api_es2[] = {
* GLES2 if the NV_read_buffer extension is available. */
static const int
extra_NV_read_buffer_api_gl[] = {
- EXT(NV_read_buffer),
+ EXTRA_API_ES2,
EXTRA_API_GL,
EXTRA_END
};
diff --git a/mesalib/src/mesa/main/get_hash_params.py b/mesalib/src/mesa/main/get_hash_params.py
index 7a25cb10c..376df09ee 100644
--- a/mesalib/src/mesa/main/get_hash_params.py
+++ b/mesalib/src/mesa/main/get_hash_params.py
@@ -99,8 +99,8 @@ descriptor=[
[ "CLAMP_READ_COLOR", "CONTEXT_ENUM(Color.ClampReadColor), extra_ARB_color_buffer_float" ],
# GL_ARB_copy_buffer
- [ "COPY_READ_BUFFER", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer" ],
- [ "COPY_WRITE_BUFFER", "LOC_CUSTOM, TYPE_INT, 0, extra_ARB_copy_buffer" ],
+ [ "COPY_READ_BUFFER", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
+ [ "COPY_WRITE_BUFFER", "LOC_CUSTOM, TYPE_INT, 0, NO_EXTRA" ],
# GL_OES_read_format
[ "IMPLEMENTATION_COLOR_READ_TYPE_OES", "LOC_CUSTOM, TYPE_INT, 0, extra_new_buffers" ],
@@ -480,8 +480,8 @@ descriptor=[
[ "TEXTURE_COMPRESSION_HINT_ARB", "CONTEXT_INT(Hint.TextureCompression), NO_EXTRA" ],
# GL_EXT_compiled_vertex_array
- [ "ARRAY_ELEMENT_LOCK_FIRST_EXT", "CONTEXT_INT(Array.LockFirst), extra_EXT_compiled_vertex_array" ],
- [ "ARRAY_ELEMENT_LOCK_COUNT_EXT", "CONTEXT_INT(Array.LockCount), extra_EXT_compiled_vertex_array" ],
+ [ "ARRAY_ELEMENT_LOCK_FIRST_EXT", "CONTEXT_INT(Array.LockFirst), NO_EXTRA" ],
+ [ "ARRAY_ELEMENT_LOCK_COUNT_EXT", "CONTEXT_INT(Array.LockCount), NO_EXTRA" ],
# GL_ARB_transpose_matrix
[ "TRANSPOSE_MODELVIEW_MATRIX_ARB", "CONTEXT_MATRIX_T(ModelviewMatrixStack), NO_EXTRA" ],
@@ -507,7 +507,7 @@ descriptor=[
[ "FOG_DISTANCE_MODE_NV", "CONTEXT_ENUM(Fog.FogDistanceMode), extra_NV_fog_distance" ],
# GL_IBM_rasterpos_clip
- [ "RASTER_POSITION_UNCLIPPED_IBM", "CONTEXT_BOOL(Transform.RasterPositionUnclipped), extra_IBM_rasterpos_clip" ],
+ [ "RASTER_POSITION_UNCLIPPED_IBM", "CONTEXT_BOOL(Transform.RasterPositionUnclipped), NO_EXTRA" ],
# GL_NV_point_sprite
[ "POINT_SPRITE_R_MODE_NV", "CONTEXT_ENUM(Point.SpriteRMode), extra_NV_point_sprite" ],
@@ -523,8 +523,8 @@ descriptor=[
[ "ACTIVE_STENCIL_FACE_EXT", "LOC_CUSTOM, TYPE_ENUM, NO_OFFSET, NO_EXTRA" ],
# GL_NV_light_max_exponent
- [ "MAX_SHININESS_NV", "CONTEXT_FLOAT(Const.MaxShininess), extra_NV_light_max_exponent" ],
- [ "MAX_SPOT_EXPONENT_NV", "CONTEXT_FLOAT(Const.MaxSpotExponent), extra_NV_light_max_exponent" ],
+ [ "MAX_SHININESS_NV", "CONTEXT_FLOAT(Const.MaxShininess), NO_EXTRA" ],
+ [ "MAX_SPOT_EXPONENT_NV", "CONTEXT_FLOAT(Const.MaxSpotExponent), NO_EXTRA" ],
# GL_NV_primitive_restart
[ "PRIMITIVE_RESTART_NV", "CONTEXT_BOOL(Array.PrimitiveRestart), extra_NV_primitive_restart" ],
@@ -685,6 +685,9 @@ descriptor=[
# GL_ARB_timer_query
[ "TIMESTAMP", "LOC_CUSTOM, TYPE_INT64, 0, extra_ARB_timer_query" ],
+
+# GL_ARB_map_buffer_alignment
+ [ "MIN_MAP_BUFFER_ALIGNMENT", "CONTEXT_INT(Const.MinMapBufferAlignment), extra_ARB_map_buffer_alignment" ],
]}
]
diff --git a/mesalib/src/mesa/main/mtypes.h b/mesalib/src/mesa/main/mtypes.h
index 7f2adc773..c8f2ca325 100644
--- a/mesalib/src/mesa/main/mtypes.h
+++ b/mesalib/src/mesa/main/mtypes.h
@@ -2919,6 +2919,9 @@ struct gl_constants
* Force software support for primitive restart in the VBO module.
*/
GLboolean PrimitiveRestartInSoftware;
+
+ /** GL_ARB_map_buffer_alignment */
+ GLuint MinMapBufferAlignment;
};
@@ -2937,7 +2940,6 @@ struct gl_extensions
GLboolean ARB_blend_func_extended;
GLboolean ARB_color_buffer_float;
GLboolean ARB_conservative_depth;
- GLboolean ARB_copy_buffer;
GLboolean ARB_depth_buffer_float;
GLboolean ARB_depth_clamp;
GLboolean ARB_depth_texture;
@@ -2954,6 +2956,7 @@ struct gl_extensions
GLboolean ARB_half_float_pixel;
GLboolean ARB_half_float_vertex;
GLboolean ARB_instanced_arrays;
+ GLboolean ARB_map_buffer_alignment;
GLboolean ARB_map_buffer_range;
GLboolean ARB_occlusion_query;
GLboolean ARB_occlusion_query2;
@@ -2983,21 +2986,17 @@ struct gl_extensions
GLboolean ARB_transform_feedback2;
GLboolean ARB_transform_feedback3;
GLboolean ARB_transform_feedback_instanced;
- GLboolean ARB_transpose_matrix;
GLboolean ARB_uniform_buffer_object;
GLboolean ARB_vertex_program;
GLboolean ARB_vertex_shader;
GLboolean ARB_vertex_type_2_10_10_10_rev;
- GLboolean ARB_window_pos;
GLboolean EXT_blend_color;
GLboolean EXT_blend_equation_separate;
GLboolean EXT_blend_func_separate;
GLboolean EXT_blend_minmax;
GLboolean EXT_clip_volume_hint;
- GLboolean EXT_compiled_vertex_array;
GLboolean EXT_depth_bounds_test;
GLboolean EXT_draw_buffers2;
- GLboolean EXT_draw_range_elements;
GLboolean EXT_fog_coord;
GLboolean EXT_framebuffer_blit;
GLboolean EXT_framebuffer_multisample;
@@ -3007,15 +3006,12 @@ struct gl_extensions
GLboolean EXT_gpu_shader4;
GLboolean EXT_packed_depth_stencil;
GLboolean EXT_packed_float;
- GLboolean EXT_packed_pixels;
GLboolean EXT_pixel_buffer_object;
GLboolean EXT_point_parameters;
GLboolean EXT_provoking_vertex;
- GLboolean EXT_rescale_normal;
GLboolean EXT_shadow_funcs;
GLboolean EXT_secondary_color;
GLboolean EXT_separate_shader_objects;
- GLboolean EXT_separate_specular_color;
GLboolean EXT_stencil_two_side;
GLboolean EXT_texture3D;
GLboolean EXT_texture_array;
@@ -3036,7 +3032,6 @@ struct gl_extensions
GLboolean OES_standard_derivatives;
/* vendor extensions */
GLboolean AMD_seamless_cubemap_per_texture;
- GLboolean APPLE_packed_pixels;
GLboolean APPLE_object_purgeable;
GLboolean ATI_envmap_bumpmap;
GLboolean ATI_texture_compression_3dc;
@@ -3044,8 +3039,6 @@ struct gl_extensions
GLboolean ATI_texture_env_combine3;
GLboolean ATI_fragment_shader;
GLboolean ATI_separate_stencil;
- GLboolean IBM_rasterpos_clip;
- GLboolean IBM_multimode_draw_arrays;
GLboolean MESA_pack_invert;
GLboolean MESA_resize_buffers;
GLboolean MESA_ycbcr_texture;
@@ -3054,15 +3047,11 @@ struct gl_extensions
GLboolean NV_conditional_render;
GLboolean NV_fog_distance;
GLboolean NV_fragment_program_option;
- GLboolean NV_light_max_exponent;
GLboolean NV_point_sprite;
GLboolean NV_primitive_restart;
- GLboolean NV_read_buffer;
GLboolean NV_texture_barrier;
- GLboolean NV_texgen_reflection;
GLboolean NV_texture_env_combine4;
GLboolean NV_texture_rectangle;
- GLboolean SGIS_texture_lod;
GLboolean TDFX_texture_compression_FXT1;
GLboolean S3_s3tc;
GLboolean OES_EGL_image;
diff --git a/mesalib/src/mesa/main/version.c b/mesalib/src/mesa/main/version.c
index 8d69c3a05..334e6e80b 100644
--- a/mesalib/src/mesa/main/version.c
+++ b/mesalib/src/mesa/main/version.c
@@ -161,7 +161,6 @@ compute_version(struct gl_context *ctx)
ctx->Extensions.ARB_depth_texture &&
ctx->Extensions.ARB_shadow &&
ctx->Extensions.ARB_texture_env_crossbar &&
- ctx->Extensions.ARB_window_pos &&
ctx->Extensions.EXT_blend_color &&
ctx->Extensions.EXT_blend_func_separate &&
ctx->Extensions.EXT_blend_minmax &&
@@ -213,7 +212,6 @@ compute_version(struct gl_context *ctx)
ctx->Extensions.NV_conditional_render);
const GLboolean ver_3_1 = (ver_3_0 &&
ctx->Const.GLSLVersion >= 140 &&
- ctx->Extensions.ARB_copy_buffer &&
ctx->Extensions.ARB_draw_instanced &&
ctx->Extensions.ARB_texture_buffer_object &&
ctx->Extensions.ARB_uniform_buffer_object &&
diff --git a/mesalib/src/mesa/state_tracker/st_atom_array.c b/mesalib/src/mesa/state_tracker/st_atom_array.c
index ab46f1188..15f5d1c95 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_array.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_array.c
@@ -574,7 +574,13 @@ static void update_array(struct st_context *st)
num_velements = vpv->num_inputs;
}
- cso_set_vertex_buffers(st->cso_context, num_vbuffers, vbuffer);
+ cso_set_vertex_buffers(st->cso_context, 0, num_vbuffers, vbuffer);
+ if (st->last_num_vbuffers > num_vbuffers) {
+ /* Unbind remaining buffers, if any. */
+ cso_set_vertex_buffers(st->cso_context, num_vbuffers,
+ st->last_num_vbuffers - num_vbuffers, NULL);
+ }
+ st->last_num_vbuffers = num_vbuffers;
cso_set_vertex_elements(st->cso_context, num_velements, velements);
}
@@ -582,7 +588,7 @@ static void update_array(struct st_context *st)
const struct st_tracked_state st_update_array = {
"st_update_array", /* name */
{ /* dirty */
- (_NEW_PROGRAM | _NEW_BUFFER_OBJECT), /* mesa */
+ _NEW_BUFFER_OBJECT, /* mesa */
ST_NEW_VERTEX_ARRAYS | ST_NEW_VERTEX_PROGRAM, /* st */
},
update_array /* update */
diff --git a/mesalib/src/mesa/state_tracker/st_atom_clip.c b/mesalib/src/mesa/state_tracker/st_atom_clip.c
index a1a7e003a..8558d768f 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_clip.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_clip.c
@@ -67,8 +67,8 @@ static void update_clip( struct st_context *st )
const struct st_tracked_state st_update_clip = {
"st_update_clip", /* name */
{ /* dirty */
- (_NEW_TRANSFORM | _NEW_PROGRAM), /* mesa */
- 0, /* st */
+ _NEW_TRANSFORM, /* mesa */
+ ST_NEW_VERTEX_PROGRAM, /* st */
},
update_clip /* update */
};
diff --git a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
index fd9228583..580393e60 100644
--- a/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
+++ b/mesalib/src/mesa/state_tracker/st_atom_constbuf.c
@@ -125,7 +125,7 @@ static void update_vs_constants(struct st_context *st )
const struct st_tracked_state st_update_vs_constants = {
"st_update_vs_constants", /* name */
{ /* dirty */
- (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS), /* mesa */
+ _NEW_PROGRAM_CONSTANTS, /* mesa */
ST_NEW_VERTEX_PROGRAM, /* st */
},
update_vs_constants /* update */
@@ -148,7 +148,7 @@ static void update_fs_constants(struct st_context *st )
const struct st_tracked_state st_update_fs_constants = {
"st_update_fs_constants", /* name */
{ /* dirty */
- (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS), /* mesa */
+ _NEW_PROGRAM_CONSTANTS, /* mesa */
ST_NEW_FRAGMENT_PROGRAM, /* st */
},
update_fs_constants /* update */
@@ -170,7 +170,7 @@ static void update_gs_constants(struct st_context *st )
const struct st_tracked_state st_update_gs_constants = {
"st_update_gs_constants", /* name */
{ /* dirty */
- (_NEW_PROGRAM | _NEW_PROGRAM_CONSTANTS), /* mesa */
+ _NEW_PROGRAM_CONSTANTS, /* mesa */
ST_NEW_GEOMETRY_PROGRAM, /* st */
},
update_gs_constants /* update */
diff --git a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
index b024ef0db..843dc5be3 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_bitmap.c
@@ -457,7 +457,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_vertex_shader(cso);
cso_save_geometry_shader(cso);
cso_save_vertex_elements(cso);
- cso_save_vertex_buffers(cso);
+ cso_save_aux_vertex_buffer_slot(cso);
/* rasterizer state: just scissor */
st->bitmap.rasterizer.scissor = ctx->Scissor.Enabled;
@@ -526,7 +526,9 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
x, y, width, height, z, color, &vbuf, &offset);
if (vbuf) {
- util_draw_vertex_buffer(pipe, st->cso_context, vbuf, offset,
+ util_draw_vertex_buffer(pipe, st->cso_context, vbuf,
+ cso_get_aux_vertex_buffer_slot(st->cso_context),
+ offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
3); /* attribs/vert */
@@ -541,7 +543,7 @@ draw_bitmap_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_restore_vertex_shader(cso);
cso_restore_geometry_shader(cso);
cso_restore_vertex_elements(cso);
- cso_restore_vertex_buffers(cso);
+ cso_restore_aux_vertex_buffer_slot(cso);
cso_restore_stream_outputs(cso);
pipe_resource_reference(&vbuf, NULL);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_clear.c b/mesalib/src/mesa/state_tracker/st_cb_clear.c
index 90eb0af4f..4aa0bc18f 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_clear.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_clear.c
@@ -176,7 +176,9 @@ draw_quad(struct st_context *st,
/* draw */
util_draw_vertex_buffer(pipe,
st->cso_context,
- vbuf, offset,
+ vbuf,
+ cso_get_aux_vertex_buffer_slot(st->cso_context),
+ offset,
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
2); /* attribs/vert */
@@ -225,7 +227,7 @@ clear_with_quad(struct gl_context *ctx,
cso_save_vertex_shader(st->cso_context);
cso_save_geometry_shader(st->cso_context);
cso_save_vertex_elements(st->cso_context);
- cso_save_vertex_buffers(st->cso_context);
+ cso_save_aux_vertex_buffer_slot(st->cso_context);
/* blend state: RGBA masking */
{
@@ -325,7 +327,7 @@ clear_with_quad(struct gl_context *ctx,
cso_restore_vertex_shader(st->cso_context);
cso_restore_geometry_shader(st->cso_context);
cso_restore_vertex_elements(st->cso_context);
- cso_restore_vertex_buffers(st->cso_context);
+ cso_restore_aux_vertex_buffer_slot(st->cso_context);
cso_restore_stream_outputs(st->cso_context);
}
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
index 642011488..ff8a9dc43 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawpixels.c
@@ -637,7 +637,9 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z,
}
u_upload_unmap(st->uploader);
- util_draw_vertex_buffer(pipe, st->cso_context, buf, offset,
+ util_draw_vertex_buffer(pipe, st->cso_context, buf,
+ cso_get_aux_vertex_buffer_slot(st->cso_context),
+ offset,
PIPE_PRIM_QUADS,
4, /* verts */
3); /* attribs/vert */
@@ -683,7 +685,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_save_vertex_shader(cso);
cso_save_geometry_shader(cso);
cso_save_vertex_elements(cso);
- cso_save_vertex_buffers(cso);
+ cso_save_aux_vertex_buffer_slot(cso);
if (write_stencil) {
cso_save_depth_stencil_alpha(cso);
cso_save_blend(cso);
@@ -808,7 +810,7 @@ draw_textured_quad(struct gl_context *ctx, GLint x, GLint y, GLfloat z,
cso_restore_vertex_shader(cso);
cso_restore_geometry_shader(cso);
cso_restore_vertex_elements(cso);
- cso_restore_vertex_buffers(cso);
+ cso_restore_aux_vertex_buffer_slot(cso);
cso_restore_stream_outputs(cso);
if (write_stencil) {
cso_restore_depth_stencil_alpha(cso);
diff --git a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
index e87de4406..269068da2 100644
--- a/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
+++ b/mesalib/src/mesa/state_tracker/st_cb_drawtex.c
@@ -228,7 +228,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_save_vertex_shader(cso);
cso_save_geometry_shader(cso);
cso_save_vertex_elements(cso);
- cso_save_vertex_buffers(cso);
+ cso_save_aux_vertex_buffer_slot(cso);
{
void *vs = lookup_shader(pipe, numAttribs,
@@ -266,6 +266,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
util_draw_vertex_buffer(pipe, cso, vbuffer,
+ cso_get_aux_vertex_buffer_slot(cso),
offset, /* offset */
PIPE_PRIM_TRIANGLE_FAN,
4, /* verts */
@@ -279,7 +280,7 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
cso_restore_vertex_shader(cso);
cso_restore_geometry_shader(cso);
cso_restore_vertex_elements(cso);
- cso_restore_vertex_buffers(cso);
+ cso_restore_aux_vertex_buffer_slot(cso);
cso_restore_stream_outputs(cso);
}
diff --git a/mesalib/src/mesa/state_tracker/st_context.c b/mesalib/src/mesa/state_tracker/st_context.c
index da361d887..69bd50336 100644
--- a/mesalib/src/mesa/state_tracker/st_context.c
+++ b/mesalib/src/mesa/state_tracker/st_context.c
@@ -173,7 +173,8 @@ st_create_context_priv( struct gl_context *ctx, struct pipe_context *pipe,
memset(&st->velems_util_draw[i], 0, sizeof(struct pipe_vertex_element));
st->velems_util_draw[i].src_offset = i * 4 * sizeof(float);
st->velems_util_draw[i].instance_divisor = 0;
- st->velems_util_draw[i].vertex_buffer_index = 0;
+ st->velems_util_draw[i].vertex_buffer_index =
+ cso_get_aux_vertex_buffer_slot(st->cso_context);
st->velems_util_draw[i].src_format = PIPE_FORMAT_R32G32B32A32_FLOAT;
}
diff --git a/mesalib/src/mesa/state_tracker/st_context.h b/mesalib/src/mesa/state_tracker/st_context.h
index c85d09cb5..2cc52773e 100644
--- a/mesalib/src/mesa/state_tracker/st_context.h
+++ b/mesalib/src/mesa/state_tracker/st_context.h
@@ -188,6 +188,9 @@ struct st_context
int force_msaa;
void *winsys_drawable_handle;
+ /* The number of vertex buffers from the last call of validate_arrays. */
+ unsigned last_num_vbuffers;
+
/* Active render condition. */
struct pipe_query *render_condition;
unsigned condition_mode;
diff --git a/mesalib/src/mesa/state_tracker/st_draw_feedback.c b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
index a6c7d0eec..ae87fb28d 100644
--- a/mesalib/src/mesa/state_tracker/st_draw_feedback.c
+++ b/mesalib/src/mesa/state_tracker/st_draw_feedback.c
@@ -205,7 +205,7 @@ st_feedback_draw_vbo(struct gl_context *ctx,
#endif
}
- draw_set_vertex_buffers(draw, vp->num_inputs, vbuffers);
+ draw_set_vertex_buffers(draw, 0, vp->num_inputs, vbuffers);
draw_set_vertex_elements(draw, vp->num_inputs, velements);
memset(&ibuffer, 0, sizeof(ibuffer));
@@ -264,5 +264,5 @@ st_feedback_draw_vbo(struct gl_context *ctx,
draw_set_mapped_vertex_buffer(draw, attr, NULL);
pipe_resource_reference(&vbuffers[attr].buffer, NULL);
}
- draw_set_vertex_buffers(draw, 0, NULL);
+ draw_set_vertex_buffers(draw, 0, vp->num_inputs, NULL);
}
diff --git a/mesalib/src/mesa/state_tracker/st_extensions.c b/mesalib/src/mesa/state_tracker/st_extensions.c
index 0560f3a8a..887700568 100644
--- a/mesalib/src/mesa/state_tracker/st_extensions.c
+++ b/mesalib/src/mesa/state_tracker/st_extensions.c
@@ -377,6 +377,8 @@ void st_init_extensions(struct st_context *st)
/* GL_NV_point_sprite is not supported by gallium because we don't
* support the GL_POINT_SPRITE_R_MODE_NV option. */
{ o(MESA_texture_array), PIPE_CAP_MAX_TEXTURE_ARRAY_LAYERS },
+
+ { o(OES_standard_derivatives), PIPE_CAP_SM3 }
};
/* Required: render target and sampler support */
@@ -479,7 +481,6 @@ void st_init_extensions(struct st_context *st)
* Extensions that are supported by all Gallium drivers:
*/
ctx->Extensions.ARB_ES2_compatibility = GL_TRUE;
- ctx->Extensions.ARB_copy_buffer = GL_TRUE;
ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE;
ctx->Extensions.ARB_explicit_attrib_location = GL_TRUE;
ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE;
@@ -498,7 +499,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.ARB_texture_storage = GL_TRUE;
ctx->Extensions.ARB_vertex_program = GL_TRUE;
ctx->Extensions.ARB_vertex_shader = GL_TRUE;
- ctx->Extensions.ARB_window_pos = GL_TRUE;
ctx->Extensions.EXT_blend_color = GL_TRUE;
ctx->Extensions.EXT_blend_func_separate = GL_TRUE;
@@ -522,7 +522,6 @@ void st_init_extensions(struct st_context *st)
ctx->Extensions.NV_blend_square = GL_TRUE;
ctx->Extensions.NV_fog_distance = GL_TRUE;
- ctx->Extensions.NV_texgen_reflection = GL_TRUE;
ctx->Extensions.NV_texture_env_combine4 = GL_TRUE;
ctx->Extensions.NV_texture_rectangle = GL_TRUE;
@@ -637,4 +636,10 @@ void st_init_extensions(struct st_context *st)
}
if (st->options.force_glsl_extensions_warn)
ctx->Const.ForceGLSLExtensionsWarn = 1;
+
+ ctx->Const.MinMapBufferAlignment =
+ screen->get_param(screen, PIPE_CAP_MIN_MAP_BUFFER_ALIGNMENT);
+ if (ctx->Const.MinMapBufferAlignment >= 64) {
+ ctx->Extensions.ARB_map_buffer_alignment = GL_TRUE;
+ }
}