Author: jgardou Date: Tue Oct 1 22:44:06 2013 New Revision: 60509
URL: http://svn.reactos.org/svn/reactos?rev=60509&view=rev Log: [[MESA] - leaner build part 7 of X - Get rid of the ARB_draw_elements and ARB_fragment_coord_conventions extensions CORE-7499
Modified: trunk/reactos/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_parser.cpp trunk/reactos/dll/opengl/mesa/src/glsl/ast.h trunk/reactos/dll/opengl/mesa/src/glsl/ast_to_hir.cpp trunk/reactos/dll/opengl/mesa/src/glsl/builtin_variables.cpp trunk/reactos/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c trunk/reactos/dll/opengl/mesa/src/glsl/glsl_lexer.cpp trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser.cpp trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.h trunk/reactos/dll/opengl/mesa/src/glsl/ir.cpp trunk/reactos/dll/opengl/mesa/src/glsl/ir.h trunk/reactos/dll/opengl/mesa/src/glsl/ir_clone.cpp trunk/reactos/dll/opengl/mesa/src/glsl/linker.cpp trunk/reactos/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.c trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.h trunk/reactos/dll/opengl/mesa/src/mesa/main/dd.h trunk/reactos/dll/opengl/mesa/src/mesa/main/dispatch.h trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c trunk/reactos/dll/opengl/mesa/src/mesa/main/extensions.c trunk/reactos/dll/opengl/mesa/src/mesa/main/mtypes.h trunk/reactos/dll/opengl/mesa/src/mesa/main/varray.h trunk/reactos/dll/opengl/mesa/src/mesa/main/version.c trunk/reactos/dll/opengl/mesa/src/mesa/main/vtxfmt.c trunk/reactos/dll/opengl/mesa/src/mesa/program/arbprogparse.c trunk/reactos/dll/opengl/mesa/src/mesa/program/ir_to_mesa.cpp trunk/reactos/dll/opengl/mesa/src/mesa/program/program.c trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parse_extra.c trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parser.h trunk/reactos/dll/opengl/mesa/src/mesa/swrast/s_fragprog.c trunk/reactos/dll/opengl/mesa/src/mesa/tnl/t_draw.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo.h trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_exec_array.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_noop.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_rebase.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_save_api.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split.c trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split_copy.c
Modified: trunk/reactos/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/generated/g... ============================================================================== --- trunk/reactos/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/generated/glsl/glcpp/glcpp-parse.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -3494,10 +3494,6 @@ add_builtin_define(parser, "GL_EXT_texture_array", 1); }
- if (extensions->ARB_fragment_coord_conventions) - add_builtin_define(parser, "GL_ARB_fragment_coord_conventions", - 1); - if (extensions->ARB_shader_texture_lod) add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
Modified: trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/generated/g... ============================================================================== --- trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_lexer.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -2008,8 +2008,7 @@ { if ((yyextra->language_version >= 140) || yyextra->AMD_conservative_depth_enable - || yyextra->ARB_conservative_depth_enable - || yyextra->ARB_fragment_coord_conventions_enable) { + || yyextra->ARB_conservative_depth_enable) { return LAYOUT_TOK; } else { yylval->identifier = strdup(yytext);
Modified: trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_parser.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/generated/g... ============================================================================== --- trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_parser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/generated/glsl/glsl_parser.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -4111,12 +4111,6 @@ }
(yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i; - - if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location; - - if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location; } break;
@@ -4128,23 +4122,6 @@ bool got_one = false;
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - /* Layout qualifiers for ARB_fragment_coord_conventions. */ - if (!got_one && state->ARB_fragment_coord_conventions_enable) { - if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.origin_upper_left = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.pixel_center_integer = 1; - } - - if (got_one && state->ARB_fragment_coord_conventions_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_fragment_coord_conventions layout " - "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier)); - } - }
/* Layout qualifiers for AMD/ARB_conservative_depth. */ if (!got_one &&
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/ast.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/as... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/ast.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/ast.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -352,18 +352,6 @@ unsigned flat:1; unsigned noperspective:1;
- /** \name Layout qualifiers for GL_ARB_fragment_coord_conventions */ - /*@{*/ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; - /*@}*/ - - /** - * Flag set if GL_ARB_explicit_attrib_location "location" layout - * qualifier is used. - */ - unsigned explicit_location:1; - /** \name Layout qualifiers for GL_AMD_conservative_depth */ /** { */ unsigned depth_any:1; @@ -378,14 +366,6 @@ /** \brief Set of flags, accessed as a bitmask. */ unsigned i; } flags; - - /** - * Location specified via GL_ARB_explicit_attrib_location layout - * - * \note - * This field is only valid if \c explicit_location is set. - */ - int location;
/** * Return true if and only if an interpolation qualifier is present.
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/ast_to_hir.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/as... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/ast_to_hir.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/ast_to_hir.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -2030,119 +2030,6 @@
}
- var->pixel_center_integer = qual->flags.q.pixel_center_integer; - var->origin_upper_left = qual->flags.q.origin_upper_left; - if ((qual->flags.q.origin_upper_left || qual->flags.q.pixel_center_integer) - && (strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->flags.q.origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - - _mesa_glsl_error(loc, state, - "layout qualifier `%s' can only be applied to " - "fragment shader input `gl_FragCoord'", - qual_string); - } - - if (qual->flags.q.explicit_location) { - const bool global_scope = (state->current_function == NULL); - bool fail = false; - const char *string = ""; - - /* In the vertex shader only shader inputs can be given explicit - * locations. - * - * In the fragment shader only shader outputs can be given explicit - * locations. - */ - switch (state->target) { - case vertex_shader: - if (!global_scope || (var->mode != ir_var_in)) { - fail = true; - string = "input"; - } - break; - - case fragment_shader: - if (!global_scope || (var->mode != ir_var_out)) { - fail = true; - string = "output"; - } - break; - }; - - if (fail) { - _mesa_glsl_error(loc, state, - "only %s shader %s variables can be given an " - "explicit location\n", - _mesa_glsl_shader_target_name(state->target), - string); - } else { - var->explicit_location = true; - - /* This bit of silliness is needed because invalid explicit locations - * are supposed to be flagged during linking. Small negative values - * biased by VERT_ATTRIB_GENERIC0 or FRAG_RESULT_DATA0 could alias - * built-in values (e.g., -16+VERT_ATTRIB_GENERIC0 = VERT_ATTRIB_POS). - * The linker needs to be able to differentiate these cases. This - * ensures that negative values stay negative. - */ - if (qual->location >= 0) { - var->location = (state->target == vertex_shader) - ? (qual->location + VERT_ATTRIB_GENERIC0) - : (qual->location + FRAG_RESULT_DATA0); - } else { - var->location = qual->location; - } - } - } - - /* Does the declaration use the 'layout' keyword? - */ - const bool uses_layout = qual->flags.q.pixel_center_integer - || qual->flags.q.origin_upper_left - || qual->flags.q.explicit_location; - - /* Does the declaration use the deprecated 'attribute' or 'varying' - * keywords? - */ - const bool uses_deprecated_qualifier = qual->flags.q.attribute - || qual->flags.q.varying; - - /* Is the 'layout' keyword used with parameters that allow relaxed checking. - * Many implementations of GL_ARB_fragment_coord_conventions_enable and some - * implementations (only Mesa?) GL_ARB_explicit_attrib_location_enable - * allowed the layout qualifier to be used with 'varying' and 'attribute'. - * These extensions and all following extensions that add the 'layout' - * keyword have been modified to require the use of 'in' or 'out'. - * - * The following extension do not allow the deprecated keywords: - * - * GL_AMD_conservative_depth - * GL_ARB_conservative_depth - * GL_ARB_gpu_shader5 - * GL_ARB_separate_shader_objects - * GL_ARB_tesselation_shader - * GL_ARB_transform_feedback3 - * GL_ARB_uniform_buffer_object - * - * It is unknown whether GL_EXT_shader_image_load_store or GL_NV_gpu_shader5 - * allow layout with the deprecated keywords. - */ - const bool relaxed_layout_qualifier_checking = - state->ARB_fragment_coord_conventions_enable; - - if (uses_layout && uses_deprecated_qualifier) { - if (relaxed_layout_qualifier_checking) { - _mesa_glsl_warning(loc, state, - "`layout' qualifier may not be used with " - "`attribute' or `varying'"); - } else { - _mesa_glsl_error(loc, state, - "`layout' qualifier may not be used with " - "`attribute' or `varying'"); - } - } - /* Layout qualifiers for gl_FragDepth, which are enabled by extension * AMD_conservative_depth. */ @@ -2236,26 +2123,6 @@ earlier->type = var->type; delete var; var = NULL; - } else if (state->ARB_fragment_coord_conventions_enable - && strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout - * qualifiers. - */ - earlier->origin_upper_left = var->origin_upper_left; - earlier->pixel_center_integer = var->pixel_center_integer; - - /* According to section 4.3.7 of the GLSL 1.30 spec, - * the following built-in varaibles can be redeclared with an - * interpolation qualifier: - * * gl_FrontColor - * * gl_BackColor - * * gl_FrontSecondaryColor - * * gl_BackSecondaryColor - * * gl_Color - * * gl_SecondaryColor - */ } else if (state->language_version >= 130 && (strcmp(var->name, "gl_FrontColor") == 0 || strcmp(var->name, "gl_BackColor") == 0 @@ -2579,8 +2446,7 @@ * This is relaxed in GLSL 1.30. It is also relaxed by any extension * that adds the 'layout' keyword. */ - if ((state->language_version < 130) - && !state->ARB_fragment_coord_conventions_enable) { + if (state->language_version < 130) { if (this->type->qualifier.flags.q.out) { _mesa_glsl_error(& loc, state, "`out' qualifier in declaration of `%s' "
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/builtin_variables.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/bu... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/builtin_variables.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/builtin_variables.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -407,7 +407,6 @@ }
var->location = slot; - var->explicit_location = (slot >= 0);
/* Once the variable is created an initialized, add it to the symbol table * and add the declaration to the IR stream.
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/gl... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/glcpp/glcpp-parse.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -3444,10 +3444,6 @@ add_builtin_define(parser, "GL_EXT_texture_array", 1); }
- if (extensions->ARB_fragment_coord_conventions) - add_builtin_define(parser, "GL_ARB_fragment_coord_conventions", - 1); - if (extensions->ARB_shader_texture_lod) add_builtin_define(parser, "GL_ARB_shader_texture_lod", 1);
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/glsl_lexer.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/gl... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/glsl_lexer.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/glsl_lexer.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -2001,8 +2001,7 @@ { if ((yyextra->language_version >= 140) || yyextra->AMD_conservative_depth_enable - || yyextra->ARB_conservative_depth_enable - || yyextra->ARB_fragment_coord_conventions_enable) { + || yyextra->ARB_conservative_depth_enable) { return LAYOUT_TOK; } else { yylval->identifier = strdup(yytext);
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/gl... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -4080,12 +4080,6 @@ }
(yyval.type_qualifier).flags.i = (yyvsp[(1) - (3)].type_qualifier).flags.i | (yyvsp[(3) - (3)].type_qualifier).flags.i; - - if ((yyvsp[(1) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(1) - (3)].type_qualifier).location; - - if ((yyvsp[(3) - (3)].type_qualifier).flags.q.explicit_location) - (yyval.type_qualifier).location = (yyvsp[(3) - (3)].type_qualifier).location; ;} break;
@@ -4097,23 +4091,6 @@ bool got_one = false;
memset(& (yyval.type_qualifier), 0, sizeof((yyval.type_qualifier))); - - /* Layout qualifiers for ARB_fragment_coord_conventions. */ - if (!got_one && state->ARB_fragment_coord_conventions_enable) { - if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.origin_upper_left = 1; - } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).flags.q.pixel_center_integer = 1; - } - - if (got_one && state->ARB_fragment_coord_conventions_warn) { - _mesa_glsl_warning(& (yylsp[(1) - (1)]), state, - "GL_ARB_fragment_coord_conventions layout " - "identifier `%s' used\n", (yyvsp[(1) - (1)].identifier)); - } - }
/* Layout qualifiers for AMD/ARB_conservative_depth. */ if (!got_one &&
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/gl... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -260,7 +260,6 @@ EXT(ARB_conservative_depth, false, false, true, true, false, ARB_conservative_depth), EXT(ARB_draw_buffers, false, false, true, true, false, dummy_true), EXT(ARB_draw_instanced, true, false, false, true, false, ARB_draw_instanced), - EXT(ARB_fragment_coord_conventions, true, false, true, true, false, ARB_fragment_coord_conventions), EXT(ARB_texture_rectangle, true, false, true, true, false, dummy_true), EXT(EXT_texture_array, true, false, true, true, false, EXT_texture_array), EXT(ARB_shader_texture_lod, true, false, true, true, false, ARB_shader_texture_lod),
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/gl... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/glsl_parser_extras.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -180,8 +180,6 @@ bool ARB_draw_buffers_warn; bool ARB_draw_instanced_enable; bool ARB_draw_instanced_warn; - bool ARB_fragment_coord_conventions_enable; - bool ARB_fragment_coord_conventions_warn; bool ARB_texture_rectangle_enable; bool ARB_texture_rectangle_warn; bool EXT_texture_array_enable;
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/ir.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/ir... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/ir.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/ir.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -1325,14 +1325,11 @@ this->ir_type = ir_type_variable; this->type = type; this->name = ralloc_strdup(this, name); - this->explicit_location = false; this->has_initializer = false; this->location = -1; this->warn_extension = NULL; this->constant_value = NULL; this->constant_initializer = NULL; - this->origin_upper_left = false; - this->pixel_center_integer = false; this->depth_layout = ir_depth_layout_none; this->used = false;
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/ir.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/ir... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/ir.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/ir.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -347,22 +347,7 @@ */ unsigned interpolation:2;
- /** - * \name ARB_fragment_coord_conventions - * @{ - */ - unsigned origin_upper_left:1; - unsigned pixel_center_integer:1; /*@}*/ - - /** - * Was the location explicitly set in the shader? - * - * If the location is explicitly set in the shader, it \b cannot be changed - * by the linker or by the API (e.g., calls to \c glBindAttribLocation have - * no effect). - */ - unsigned explicit_location:1;
/** * Does this variable have an initializer?
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/ir_clone.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/ir... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/ir_clone.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/ir_clone.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -47,9 +47,6 @@ var->interpolation = this->interpolation; var->location = this->location; var->warn_extension = this->warn_extension; - var->origin_upper_left = this->origin_upper_left; - var->pixel_center_integer = this->pixel_center_integer; - var->explicit_location = this->explicit_location; var->has_initializer = this->has_initializer; var->depth_layout = this->depth_layout;
@@ -63,9 +60,6 @@ memcpy(var->state_slots, this->state_slots, sizeof(this->state_slots[0]) * var->num_state_slots); } - - if (this->explicit_location) - var->location = this->location;
if (this->constant_value) var->constant_value = this->constant_value->clone(mem_ctx, ht);
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/linker.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/li... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/linker.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/linker.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -202,7 +202,7 @@
/* Only assign locations for generic attributes / varyings / etc. */ - if ((var->location >= generic_base) && !var->explicit_location) + if (var->location >= generic_base) var->location = -1; } } @@ -407,19 +407,6 @@ existing->type->name); return false; } - } - - if (var->explicit_location) { - if (existing->explicit_location - && (var->location != existing->location)) { - linker_error(prog, "explicit locations for %s " - "`%s' have differing values\n", - mode_string(var), var->name); - return false; - } - - existing->location = var->location; - existing->explicit_location = true; }
/* Validate layout qualifiers for gl_FragDepth. @@ -1214,17 +1201,7 @@ if ((var == NULL) || (var->mode != (unsigned) direction)) continue;
- if (var->explicit_location) { - if ((var->location >= (int)(max_index + generic_base)) - || (var->location < 0)) { - linker_error(prog, - "invalid explicit location %d specified for `%s'\n", - (var->location < 0) - ? var->location : var->location - generic_base, - var->name); - return false; - } - } else if (target_index == MESA_SHADER_VERTEX) { + if (target_index == MESA_SHADER_VERTEX) { unsigned binding;
if (prog->AttributeBindings->get(binding, var->name)) {
Modified: trunk/reactos/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/glsl/st... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/glsl/standalone_scaffolding.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -68,7 +68,6 @@ ctx->Extensions.dummy_true = true; ctx->Extensions.ARB_ES2_compatibility = true; ctx->Extensions.ARB_draw_instanced = true; - ctx->Extensions.ARB_fragment_coord_conventions = true; ctx->Extensions.EXT_texture_array = true; ctx->Extensions.NV_texture_rectangle = true; ctx->Extensions.EXT_texture3D = true;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -164,7 +164,7 @@ */ static GLboolean check_index_bounds(struct gl_context *ctx, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { struct _mesa_prim prim; struct _mesa_index_buffer ib; @@ -186,8 +186,7 @@
vbo_get_minmax_index(ctx, &prim, &ib, &min, &max);
- if ((int)(min + basevertex) < 0 || - max + basevertex >= ctx->Array.ArrayObj->_MaxElement) { + if (max >= ctx->Array.ArrayObj->_MaxElement) { /* the max element is out of bounds of one or more enabled arrays */ _mesa_warning(ctx, "glDrawElements() index=%u is out of bounds (max=%u)", max, ctx->Array.ArrayObj->_MaxElement); @@ -223,7 +222,7 @@ GLboolean _mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -264,7 +263,7 @@ return GL_FALSE; }
- if (!check_index_bounds(ctx, count, type, indices, basevertex)) + if (!check_index_bounds(ctx, count, type, indices)) return GL_FALSE;
return GL_TRUE; @@ -280,7 +279,7 @@ _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) + const GLvoid *indices) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -325,7 +324,7 @@ return GL_FALSE; }
- if (!check_index_bounds(ctx, count, type, indices, basevertex)) + if (!check_index_bounds(ctx, count, type, indices)) return GL_FALSE;
return GL_TRUE; @@ -413,8 +412,7 @@ GLboolean _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLsizei numInstances, - GLint basevertex) + const GLvoid *indices, GLsizei numInstances) { ASSERT_OUTSIDE_BEGIN_END_WITH_RETVAL(ctx, GL_FALSE);
@@ -465,9 +463,9 @@ return GL_FALSE; }
- if (!check_index_bounds(ctx, count, type, indices, basevertex)) - return GL_FALSE; - - return GL_TRUE; -} - + if (!check_index_bounds(ctx, count, type, indices)) + return GL_FALSE; + + return GL_TRUE; +} +
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/api_validate.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -53,13 +53,13 @@ extern GLboolean _mesa_validate_DrawElements(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); + const GLvoid *indices);
extern GLboolean _mesa_validate_DrawRangeElements(struct gl_context *ctx, GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex); + const GLvoid *indices);
extern GLboolean @@ -69,7 +69,6 @@ extern GLboolean _mesa_validate_DrawElementsInstanced(struct gl_context *ctx, GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLsizei primcount, - GLint basevertex); + const GLvoid *indices, GLsizei primcount);
#endif
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/dd.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/dd.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/dd.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -1022,29 +1022,11 @@ GLenum type, const GLvoid **indices, GLsizei primcount); - void (GLAPIENTRYP DrawElementsBaseVertex)( GLenum mode, GLsizei count, - GLenum type, - const GLvoid *indices, - GLint basevertex ); - void (GLAPIENTRYP DrawRangeElementsBaseVertex)( GLenum mode, GLuint start, - GLuint end, GLsizei count, - GLenum type, - const GLvoid *indices, - GLint basevertex); - void (GLAPIENTRYP MultiDrawElementsBaseVertex)( GLenum mode, - const GLsizei *count, - GLenum type, - const GLvoid **indices, - GLsizei primcount, - const GLint *basevertex); void (GLAPIENTRYP DrawArraysInstanced)(GLenum mode, GLint first, GLsizei count, GLsizei primcount); void (GLAPIENTRYP DrawElementsInstanced)(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei primcount); - void (GLAPIENTRYP DrawElementsInstancedBaseVertex)(GLenum mode, GLsizei count, - GLenum type, const GLvoid *indices, - GLsizei primcount, GLint basevertex); /*@}*/
/**
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/dispatch.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/dispatch.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/dispatch.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -640,10 +640,6 @@ #define _gloffset_BindVertexArray 583 #define _gloffset_GenVertexArrays 584 #define _gloffset_CopyBufferSubData 585 -#define _gloffset_DrawElementsBaseVertex 593 -#define _gloffset_DrawElementsInstancedBaseVertex 594 -#define _gloffset_DrawRangeElementsBaseVertex 595 -#define _gloffset_MultiDrawElementsBaseVertex 596 #define _gloffset_BlendEquationSeparateiARB 597 #define _gloffset_BlendEquationiARB 598 #define _gloffset_BlendFuncSeparateiARB 599 @@ -1100,10 +1096,6 @@ #define BindVertexArray_remap_index 175 #define GenVertexArrays_remap_index 176 #define CopyBufferSubData_remap_index 177 -#define DrawElementsBaseVertex_remap_index 185 -#define DrawElementsInstancedBaseVertex_remap_index 186 -#define DrawRangeElementsBaseVertex_remap_index 187 -#define MultiDrawElementsBaseVertex_remap_index 188 #define BlendEquationSeparateiARB_remap_index 189 #define BlendEquationiARB_remap_index 190 #define BlendFuncSeparateiARB_remap_index 191 @@ -1554,10 +1546,6 @@ #define _gloffset_BindVertexArray driDispatchRemapTable[BindVertexArray_remap_index] #define _gloffset_GenVertexArrays driDispatchRemapTable[GenVertexArrays_remap_index] #define _gloffset_CopyBufferSubData driDispatchRemapTable[CopyBufferSubData_remap_index] -#define _gloffset_DrawElementsBaseVertex driDispatchRemapTable[DrawElementsBaseVertex_remap_index] -#define _gloffset_DrawElementsInstancedBaseVertex driDispatchRemapTable[DrawElementsInstancedBaseVertex_remap_index] -#define _gloffset_DrawRangeElementsBaseVertex driDispatchRemapTable[DrawRangeElementsBaseVertex_remap_index] -#define _gloffset_MultiDrawElementsBaseVertex driDispatchRemapTable[MultiDrawElementsBaseVertex_remap_index] #define _gloffset_BlendEquationSeparateiARB driDispatchRemapTable[BlendEquationSeparateiARB_remap_index] #define _gloffset_BlendEquationiARB driDispatchRemapTable[BlendEquationiARB_remap_index] #define _gloffset_BlendFuncSeparateiARB driDispatchRemapTable[BlendFuncSeparateiARB_remap_index] @@ -8137,50 +8125,6 @@ SET_by_offset(disp, _gloffset_CopyBufferSubData, fn); }
-typedef void (GLAPIENTRYP _glptr_DrawElementsBaseVertex)(GLenum, GLsizei, GLenum, const GLvoid *, GLint); -#define CALL_DrawElementsBaseVertex(disp, parameters) \ - (* GET_DrawElementsBaseVertex(disp)) parameters -static inline _glptr_DrawElementsBaseVertex GET_DrawElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawElementsBaseVertex)); -} - -static inline void SET_DrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLint)) { - SET_by_offset(disp, _gloffset_DrawElementsBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawElementsInstancedBaseVertex)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei, GLint); -#define CALL_DrawElementsInstancedBaseVertex(disp, parameters) \ - (* GET_DrawElementsInstancedBaseVertex(disp)) parameters -static inline _glptr_DrawElementsInstancedBaseVertex GET_DrawElementsInstancedBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawElementsInstancedBaseVertex) (GET_by_offset(disp, _gloffset_DrawElementsInstancedBaseVertex)); -} - -static inline void SET_DrawElementsInstancedBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLsizei, GLenum, const GLvoid *, GLsizei, GLint)) { - SET_by_offset(disp, _gloffset_DrawElementsInstancedBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_DrawRangeElementsBaseVertex)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint); -#define CALL_DrawRangeElementsBaseVertex(disp, parameters) \ - (* GET_DrawRangeElementsBaseVertex(disp)) parameters -static inline _glptr_DrawRangeElementsBaseVertex GET_DrawRangeElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_DrawRangeElementsBaseVertex) (GET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex)); -} - -static inline void SET_DrawRangeElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, GLuint, GLuint, GLsizei, GLenum, const GLvoid *, GLint)) { - SET_by_offset(disp, _gloffset_DrawRangeElementsBaseVertex, fn); -} - -typedef void (GLAPIENTRYP _glptr_MultiDrawElementsBaseVertex)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *); -#define CALL_MultiDrawElementsBaseVertex(disp, parameters) \ - (* GET_MultiDrawElementsBaseVertex(disp)) parameters -static inline _glptr_MultiDrawElementsBaseVertex GET_MultiDrawElementsBaseVertex(struct _glapi_table *disp) { - return (_glptr_MultiDrawElementsBaseVertex) (GET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex)); -} - -static inline void SET_MultiDrawElementsBaseVertex(struct _glapi_table *disp, void (GLAPIENTRYP fn)(GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei, const GLint *)) { - SET_by_offset(disp, _gloffset_MultiDrawElementsBaseVertex, fn); -} - typedef void (GLAPIENTRYP _glptr_BlendEquationSeparateiARB)(GLuint, GLenum, GLenum); #define CALL_BlendEquationSeparateiARB(disp, parameters) \ (* GET_BlendEquationSeparateiARB(disp)) parameters
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/dlist.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -1271,19 +1271,6 @@ GET_CURRENT_CONTEXT(ctx); _mesa_error(ctx, GL_INVALID_OPERATION, "glDrawElementsInstanced() during display list compile"); -} - -static void GLAPIENTRY -save_DrawElementsInstancedBaseVertexARB(GLenum mode, - GLsizei count, - GLenum type, - const GLvoid *indices, - GLsizei primcount, - GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - _mesa_error(ctx, GL_INVALID_OPERATION, - "glDrawElementsInstancedBaseVertex() during display list compile"); }
static void invalidate_saved_current_state( struct gl_context *ctx ) @@ -10051,9 +10038,6 @@ vfmt->DrawArraysInstanced = save_DrawArraysInstancedARB; vfmt->DrawElementsInstanced = save_DrawElementsInstancedARB;
- /* GL_ARB_draw_elements_base_vertex */ - vfmt->DrawElementsInstancedBaseVertex = save_DrawElementsInstancedBaseVertexARB; - /* The driver is required to implement these as * 1) They can probably do a better job. * 2) A lot of new mechanisms would have to be added to this module
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/extensions.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/extensions.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/extensions.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -85,9 +85,6 @@ { "GL_ARB_depth_clamp", o(ARB_depth_clamp), GL, 2003 }, { "GL_ARB_draw_buffers", o(dummy_true), GL, 2002 }, { "GL_ARB_draw_buffers_blend", o(ARB_draw_buffers_blend), GL, 2009 }, - { "GL_ARB_draw_elements_base_vertex", o(ARB_draw_elements_base_vertex), GL, 2009 }, - { "GL_ARB_draw_instanced", o(ARB_draw_instanced), GL, 2008 }, - { "GL_ARB_fragment_coord_conventions", o(ARB_fragment_coord_conventions), GL, 2009 }, { "GL_ARB_fragment_program", o(ARB_fragment_program), GL, 2002 }, { "GL_ARB_fragment_program_shadow", o(ARB_fragment_program_shadow), GL, 2003 }, { "GL_ARB_fragment_shader", o(ARB_fragment_shader), GL, 2002 }, @@ -348,9 +345,7 @@ { /*ctx->Extensions.ARB_copy_buffer = GL_TRUE;*/ ctx->Extensions.ARB_depth_clamp = GL_TRUE; - ctx->Extensions.ARB_draw_elements_base_vertex = GL_TRUE; ctx->Extensions.ARB_draw_instanced = GL_TRUE; - ctx->Extensions.ARB_fragment_coord_conventions = GL_TRUE; #if FEATURE_ARB_fragment_program ctx->Extensions.ARB_fragment_program = GL_TRUE; ctx->Extensions.ARB_fragment_program_shadow = GL_TRUE;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/mtypes.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/mtypes.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/mtypes.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -1824,8 +1824,6 @@ { struct gl_program Base; /**< base class */ GLboolean UsesKill; /**< shader uses KIL instruction */ - GLboolean OriginUpperLeft; - GLboolean PixelCenterInteger; enum gl_frag_depth_layout FragDepthLayout;
/** @@ -2495,9 +2493,7 @@ GLboolean ARB_depth_buffer_float; GLboolean ARB_depth_clamp; GLboolean ARB_draw_buffers_blend; - GLboolean ARB_draw_elements_base_vertex; GLboolean ARB_draw_instanced; - GLboolean ARB_fragment_coord_conventions; GLboolean ARB_fragment_program; GLboolean ARB_fragment_program_shadow; GLboolean ARB_fragment_shader;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/varray.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/varray.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/varray.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -201,12 +201,6 @@ const GLvoid **indices, GLsizei primcount );
extern void GLAPIENTRY -_mesa_MultiDrawElementsBaseVertex( GLenum mode, - const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount, - const GLint *basevertex); - -extern void GLAPIENTRY _mesa_MultiModeDrawArraysIBM( const GLenum * mode, const GLint * first, const GLsizei * count, GLsizei primcount, GLint modestride );
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/version.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/version.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/version.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -148,9 +148,7 @@ ctx->Const.MaxVertexTextureImageUnits >= 16); const GLboolean ver_3_2 = (ver_3_1 && ctx->Const.GLSLVersion >= 150 && - ctx->Extensions.ARB_depth_clamp && - ctx->Extensions.ARB_draw_elements_base_vertex && - ctx->Extensions.ARB_fragment_coord_conventions); + ctx->Extensions.ARB_depth_clamp);
if (ver_3_2) { major = 3;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/main/vtxfmt.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/ma... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/main/vtxfmt.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/main/vtxfmt.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -101,12 +101,8 @@ SET_DrawElements(tab, vfmt->DrawElements); SET_DrawRangeElements(tab, vfmt->DrawRangeElements); SET_MultiDrawElementsEXT(tab, vfmt->MultiDrawElementsEXT); - SET_DrawElementsBaseVertex(tab, vfmt->DrawElementsBaseVertex); - SET_DrawRangeElementsBaseVertex(tab, vfmt->DrawRangeElementsBaseVertex); - SET_MultiDrawElementsBaseVertex(tab, vfmt->MultiDrawElementsBaseVertex); SET_DrawArraysInstancedARB(tab, vfmt->DrawArraysInstanced); SET_DrawElementsInstancedARB(tab, vfmt->DrawElementsInstanced); - SET_DrawElementsInstancedBaseVertex(tab, vfmt->DrawElementsInstancedBaseVertex);
/* GL_NV_vertex_program */ SET_VertexAttrib1fNV(tab, vfmt->VertexAttrib1fNV);
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/arbprogparse.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/arbprogparse.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/arbprogparse.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -116,8 +116,6 @@ program->Base.SamplersUsed |= (1 << i); } program->Base.ShadowSamplers = prog.ShadowSamplers; - program->OriginUpperLeft = state.option.OriginUpperLeft; - program->PixelCenterInteger = state.option.PixelCenterInteger;
program->UsesKill = state.fragment.UsesKill;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/ir_to_mesa.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/ir_to_mesa.cpp [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/ir_to_mesa.cpp [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -680,13 +680,6 @@ void ir_to_mesa_visitor::visit(ir_variable *ir) { - if (strcmp(ir->name, "gl_FragCoord") == 0) { - struct gl_fragment_program *fp = (struct gl_fragment_program *)this->prog; - - fp->OriginUpperLeft = ir->origin_upper_left; - fp->PixelCenterInteger = ir->pixel_center_integer; - } - if (ir->mode == ir_var_uniform && strncmp(ir->name, "gl_", 3) == 0) { unsigned int i; const ir_state_slot *const slots = ir->state_slots;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/program.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/program.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/program.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -480,8 +480,6 @@ = (const struct gl_fragment_program *) prog; struct gl_fragment_program *fpc = (struct gl_fragment_program *) clone; fpc->UsesKill = fp->UsesKill; - fpc->OriginUpperLeft = fp->OriginUpperLeft; - fpc->PixelCenterInteger = fp->PixelCenterInteger; } break; default:
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parse_extra.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parse_extra.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parse_extra.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -216,18 +216,6 @@ state->option.Shadow = 1; return 1; } - } else if (strncmp(option, "fragment_coord_", 15) == 0) { - option += 15; - if (state->ctx->Extensions.ARB_fragment_coord_conventions) { - if (strcmp(option, "origin_upper_left") == 0) { - state->option.OriginUpperLeft = 1; - return 1; - } - else if (strcmp(option, "pixel_center_integer") == 0) { - state->option.PixelCenterInteger = 1; - return 1; - } - } } } else if (strncmp(option, "ATI_", 4) == 0) { option += 4;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parser.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/pr... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parser.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/program/program_parser.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -208,8 +208,6 @@ unsigned TexRect:1; unsigned TexArray:1; unsigned NV_fragment:1; - unsigned OriginUpperLeft:1; - unsigned PixelCenterInteger:1; } option;
struct {
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/swrast/s_fragprog.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/sw... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/swrast/s_fragprog.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/swrast/s_fragprog.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -133,19 +133,9 @@ const struct gl_fragment_program *program, const SWspan *span, GLuint col) { - GLfloat *wpos = span->array->attribs[FRAG_ATTRIB_WPOS][col]; - if (program->Base.Target == GL_FRAGMENT_PROGRAM_NV) { /* Clear temporary registers (undefined for ARB_f_p) */ memset(machine->Temporaries, 0, MAX_PROGRAM_TEMPS * 4 * sizeof(GLfloat)); - } - - /* ARB_fragment_coord_conventions */ - if (program->OriginUpperLeft) - wpos[1] = ctx->DrawBuffer->Height - 1 - wpos[1]; - if (!program->PixelCenterInteger) { - wpos[0] += 0.5F; - wpos[1] += 0.5F; }
/* Setup pointer to input attributes */
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/tnl/t_draw.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/tn... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/tnl/t_draw.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/tnl/t_draw.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -330,27 +330,22 @@ ptr = ADD_POINTERS(ib->obj->Pointer, ib->ptr); }
- if (ib->type == GL_UNSIGNED_INT && VB->Primitive[0].basevertex == 0) { + if (ib->type == GL_UNSIGNED_INT) { VB->Elts = (GLuint *) ptr; } else { GLuint *elts = (GLuint *)get_space(ctx, ib->count * sizeof(GLuint)); VB->Elts = elts;
- if (ib->type == GL_UNSIGNED_INT) { - const GLuint *in = (GLuint *)ptr; - for (i = 0; i < ib->count; i++) - *elts++ = (GLuint)(*in++) + VB->Primitive[0].basevertex; - } - else if (ib->type == GL_UNSIGNED_SHORT) { + if (ib->type == GL_UNSIGNED_SHORT) { const GLushort *in = (GLushort *)ptr; for (i = 0; i < ib->count; i++) - *elts++ = (GLuint)(*in++) + VB->Primitive[0].basevertex; + *elts++ = (GLuint)(*in++); } else { const GLubyte *in = (GLubyte *)ptr; for (i = 0; i < ib->count; i++) - *elts++ = (GLuint)(*in++) + VB->Primitive[0].basevertex; + *elts++ = (GLuint)(*in++); } } } @@ -407,17 +402,13 @@ TNLcontext *tnl = TNL_CONTEXT(ctx); const GLuint TEST_SPLIT = 0; const GLint max = TEST_SPLIT ? 8 : tnl->vb.Size - MAX_CLIPPED_VERTICES; - GLint max_basevertex = prim->basevertex; - GLuint i;
/* Mesa core state should have been validated already */ assert(ctx->NewState == 0x0);
- for (i = 1; i < nr_prims; i++) - max_basevertex = MAX2(max_basevertex, prim[i].basevertex); - if (0) { + GLuint i; printf("%s %d..%d\n", __FUNCTION__, min_index, max_index); for (i = 0; i < nr_prims; i++) printf("prim %d: %s start %d count %d\n", i, @@ -434,7 +425,7 @@ _tnl_vbo_draw_prims ); return; } - else if ((GLint)max_index + max_basevertex > max) { + else if (max_index > max) { /* The software TNL pipeline has a fixed amount of storage for * vertices and it is necessary to split incoming drawing commands * if they exceed that limit. @@ -448,7 +439,7 @@ * recursively call back into this function. */ vbo_split_prims( ctx, arrays, prim, nr_prims, ib, - 0, max_index + prim->basevertex, + 0, max_index, _tnl_vbo_draw_prims, &limits ); } @@ -460,40 +451,22 @@ GLuint nr_bo = 0; GLuint inst;
- for (i = 0; i < nr_prims;) { - GLuint this_nr_prims; - - /* Our SW TNL pipeline doesn't handle basevertex yet, so bind_indices - * will rebase the elements to the basevertex, and we'll only - * emit strings of prims with the same basevertex in one draw call. - */ - for (this_nr_prims = 1; i + this_nr_prims < nr_prims; - this_nr_prims++) { - if (prim[i].basevertex != prim[i + this_nr_prims].basevertex) - break; - } - - assert(prim[i].num_instances > 0); - /* Binding inputs may imply mapping some vertex buffer objects. * They will need to be unmapped below. */ - for (inst = 0; inst < prim[i].num_instances; inst++) { - - bind_prims(ctx, &prim[i], this_nr_prims); - bind_inputs(ctx, arrays, max_index + prim[i].basevertex + 1, - bo, &nr_bo); - bind_indices(ctx, ib, bo, &nr_bo); - - tnl->CurInstance = inst; - TNL_CONTEXT(ctx)->Driver.RunPipeline(ctx); - - unmap_vbos(ctx, bo, nr_bo); - free_space(ctx); - } - - i += this_nr_prims; - } - } -} - + for (inst = 0; inst < prim[0].num_instances; inst++) { + + bind_prims(ctx, prim, nr_prims); + bind_inputs(ctx, arrays, max_index + 1, + bo, &nr_bo); + bind_indices(ctx, ib, bo, &nr_bo); + + tnl->CurInstance = inst; + TNL_CONTEXT(ctx)->Driver.RunPipeline(ctx); + + unmap_vbos(ctx, bo, nr_bo); + free_space(ctx); + } + } +} +
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo.h [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo.h [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -49,7 +49,6 @@
GLuint start; GLuint count; - GLint basevertex; GLsizei num_instances; };
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_exec_array.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_exec_array.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_exec_array.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -736,8 +736,7 @@ GLboolean index_bounds_valid, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, - GLint basevertex, GLint numInstances) + const GLvoid *indices, GLint numInstances) { struct vbo_context *vbo = vbo_context(ctx); struct vbo_exec_context *exec = &vbo->exec; @@ -771,7 +770,6 @@ prim[0].start = 0; prim[0].count = count; prim[0].indexed = 1; - prim[0].basevertex = basevertex; prim[0].num_instances = numInstances;
/* Need to give special consideration to rendering a range of @@ -810,16 +808,14 @@ index_bounds_valid, start, end ); }
- /** * Called by glDrawRangeElementsBaseVertex() in immediate mode. */ static void GLAPIENTRY -vbo_exec_DrawRangeElementsBaseVertex(GLenum mode, +vbo_exec_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, - const GLvoid *indices, - GLint basevertex) + const GLvoid *indices) { static GLuint warnCount = 0; GLboolean index_bounds_valid = GL_TRUE; @@ -827,16 +823,16 @@
if (MESA_VERBOSE & VERBOSE_DRAW) _mesa_debug(ctx, - "glDrawRangeElementsBaseVertex(%s, %u, %u, %d, %s, %p, %d)\n", + "glDrawRangeElementsBaseVertex(%s, %u, %u, %d, %s, %p)\n", _mesa_lookup_enum_by_nr(mode), start, end, count, - _mesa_lookup_enum_by_nr(type), indices, basevertex); + _mesa_lookup_enum_by_nr(type), indices);
if (!_mesa_validate_DrawRangeElements( ctx, mode, start, end, count, - type, indices, basevertex )) + type, indices )) return;
- if ((int) end + basevertex < 0 || - start + basevertex >= ctx->Array.ArrayObj->_MaxElement) { + if (end < start || + end >= ctx->Array.ArrayObj->_MaxElement) { /* The application requested we draw using a range of indices that's * outside the bounds of the current VBO. This is invalid and appears * to give undefined results. The safest thing to do is to simply @@ -846,10 +842,10 @@ */ if (warnCount++ < 10) { _mesa_warning(ctx, "glDrawRangeElements(start %u, end %u, " - "basevertex %d, count %d, type 0x%x, indices=%p):\n" + "count %d, type 0x%x, indices=%p):\n" "\trange is outside VBO bounds (max=%u); ignoring.\n" "\tThis should be fixed in the application.", - start, end, basevertex, count, type, indices, + start, end, count, type, indices, ctx->Array.ArrayObj->_MaxElement - 1); } index_bounds_valid = GL_FALSE; @@ -872,17 +868,11 @@ }
if (0) { - printf("glDraw[Range]Elements{,BaseVertex}" - "(start %u, end %u, type 0x%x, count %d) ElemBuf %u, " - "base %d\n", + printf("glDraw[Range]Elements" + "(start %u, end %u, type 0x%x, count %d) ElemBuf %u\n", start, end, type, count, - ctx->Array.ArrayObj->ElementArrayBufferObj->Name, - basevertex); - } - - if ((int) start + basevertex < 0 || - end + basevertex >= ctx->Array.ArrayObj->_MaxElement) - index_bounds_valid = GL_FALSE; + ctx->Array.ArrayObj->ElementArrayBufferObj->Name); + }
#if 0 check_draw_elements_data(ctx, count, type, indices); @@ -891,27 +881,7 @@ #endif
vbo_validated_drawrangeelements(ctx, mode, index_bounds_valid, start, end, - count, type, indices, basevertex, 1); -} - - -/** - * Called by glDrawRangeElements() in immediate mode. - */ -static void GLAPIENTRY -vbo_exec_DrawRangeElements(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, const GLvoid *indices) -{ - if (MESA_VERBOSE & VERBOSE_DRAW) { - GET_CURRENT_CONTEXT(ctx); - _mesa_debug(ctx, - "glDrawRangeElements(%s, %u, %u, %d, %s, %p)\n", - _mesa_lookup_enum_by_nr(mode), start, end, count, - _mesa_lookup_enum_by_nr(type), indices); - } - - vbo_exec_DrawRangeElementsBaseVertex(mode, start, end, count, type, - indices, 0); + count, type, indices, 1); }
@@ -929,34 +899,11 @@ _mesa_lookup_enum_by_nr(mode), count, _mesa_lookup_enum_by_nr(type), indices);
- if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, 0 )) + if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices)) return;
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0, - count, type, indices, 0, 1); -} - - -/** - * Called by glDrawElementsBaseVertex() in immediate mode. - */ -static void GLAPIENTRY -vbo_exec_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - - if (MESA_VERBOSE & VERBOSE_DRAW) - _mesa_debug(ctx, "glDrawElementsBaseVertex(%s, %d, %s, %p, %d)\n", - _mesa_lookup_enum_by_nr(mode), count, - _mesa_lookup_enum_by_nr(type), indices, basevertex); - - if (!_mesa_validate_DrawElements( ctx, mode, count, type, indices, - basevertex )) - return; - - vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0, - count, type, indices, basevertex, 1); + count, type, indices, 1); }
@@ -975,35 +922,11 @@ _mesa_lookup_enum_by_nr(type), indices, numInstances);
if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices, - numInstances, 0)) + numInstances)) return;
vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0, - count, type, indices, 0, numInstances); -} - -/** - * Called by glDrawElementsInstancedBaseVertex() in immediate mode. - */ -static void GLAPIENTRY -vbo_exec_DrawElementsInstancedBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLsizei numInstances, - GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - - if (MESA_VERBOSE & VERBOSE_DRAW) - _mesa_debug(ctx, "glDrawElementsInstancedBaseVertex(%s, %d, %s, %p, %d; %d)\n", - _mesa_lookup_enum_by_nr(mode), count, - _mesa_lookup_enum_by_nr(type), indices, - numInstances, basevertex); - - if (!_mesa_validate_DrawElementsInstanced(ctx, mode, count, type, indices, - numInstances, basevertex)) - return; - - vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0, - count, type, indices, basevertex, numInstances); + count, type, indices, numInstances); }
@@ -1015,8 +938,7 @@ static void vbo_validated_multidrawelements(struct gl_context *ctx, GLenum mode, const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount, - const GLint *basevertex) + const GLvoid **indices, GLsizei primcount) { struct vbo_context *vbo = vbo_context(ctx); struct vbo_exec_context *exec = &vbo->exec; @@ -1097,11 +1019,7 @@ prim[i].start = ((uintptr_t)indices[i] - min_index_ptr) / index_type_size; prim[i].count = count[i]; prim[i].indexed = 1; - prim[i].num_instances = 1; - if (basevertex != NULL) - prim[i].basevertex = basevertex[i]; - else - prim[i].basevertex = 0; + prim[i].num_instances = 1; }
check_buffers_are_unmapped(exec->array.inputs); @@ -1124,10 +1042,6 @@ prim[0].count = count[i]; prim[0].indexed = 1; prim[0].num_instances = 1; - if (basevertex != NULL) - prim[0].basevertex = basevertex[i]; - else - prim[0].basevertex = 0;
check_buffers_are_unmapped(exec->array.inputs); vbo->draw_prims(ctx, exec->array.inputs, prim, 1, &ib, @@ -1151,36 +1065,11 @@ ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx);
for (i = 0; i < primcount; i++) { - if (!_mesa_validate_DrawElements(ctx, mode, count[i], type, indices[i], - 0)) + if (!_mesa_validate_DrawElements(ctx, mode, count[i], type, indices[i])) return; }
- vbo_validated_multidrawelements(ctx, mode, count, type, indices, primcount, - NULL); -} - - -static void GLAPIENTRY -vbo_exec_MultiDrawElementsBaseVertex(GLenum mode, - const GLsizei *count, GLenum type, - const GLvoid **indices, - GLsizei primcount, - const GLsizei *basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - GLint i; - - ASSERT_OUTSIDE_BEGIN_END_AND_FLUSH(ctx); - - for (i = 0; i < primcount; i++) { - if (!_mesa_validate_DrawElements(ctx, mode, count[i], type, indices[i], - basevertex[i])) - return; - } - - vbo_validated_multidrawelements(ctx, mode, count, type, indices, primcount, - basevertex); + vbo_validated_multidrawelements(ctx, mode, count, type, indices, primcount); }
/** @@ -1194,12 +1083,8 @@ exec->vtxfmt.DrawElements = vbo_exec_DrawElements; exec->vtxfmt.DrawRangeElements = vbo_exec_DrawRangeElements; exec->vtxfmt.MultiDrawElementsEXT = vbo_exec_MultiDrawElements; - exec->vtxfmt.DrawElementsBaseVertex = vbo_exec_DrawElementsBaseVertex; - exec->vtxfmt.DrawRangeElementsBaseVertex = vbo_exec_DrawRangeElementsBaseVertex; - exec->vtxfmt.MultiDrawElementsBaseVertex = vbo_exec_MultiDrawElementsBaseVertex; exec->vtxfmt.DrawArraysInstanced = vbo_exec_DrawArraysInstanced; exec->vtxfmt.DrawElementsInstanced = vbo_exec_DrawElementsInstanced; - exec->vtxfmt.DrawElementsInstancedBaseVertex = vbo_exec_DrawElementsInstancedBaseVertex; }
@@ -1233,28 +1118,10 @@
void GLAPIENTRY -_mesa_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) -{ - vbo_exec_DrawElementsBaseVertex(mode, count, type, indices, basevertex); -} - - -void GLAPIENTRY _mesa_DrawRangeElements(GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) { vbo_exec_DrawRangeElements(mode, start, end, count, type, indices); -} - - -void GLAPIENTRY -_mesa_DrawRangeElementsBaseVertex(GLenum mode, GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid *indices, GLint basevertex) -{ - vbo_exec_DrawRangeElementsBaseVertex(mode, start, end, count, type, - indices, basevertex); }
@@ -1265,13 +1132,3 @@ vbo_exec_MultiDrawElements(mode, count, type, indices, primcount); }
- -void GLAPIENTRY -_mesa_MultiDrawElementsBaseVertex(GLenum mode, - const GLsizei *count, GLenum type, - const GLvoid **indices, GLsizei primcount, - const GLint *basevertex) -{ - vbo_exec_MultiDrawElementsBaseVertex(mode, count, type, indices, - primcount, basevertex); -}
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_noop.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_noop.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_noop.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -371,12 +371,6 @@ { }
-static void GLAPIENTRY -_mesa_noop_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid * indices, GLint basevertex) -{ -} -
static void GLAPIENTRY _mesa_noop_DrawRangeElements(GLenum mode, @@ -389,24 +383,6 @@ static void GLAPIENTRY _mesa_noop_MultiDrawElements(GLenum mode, const GLsizei * count, GLenum type, const GLvoid ** indices, GLsizei primcount) -{ -} - -static void GLAPIENTRY -_mesa_noop_DrawRangeElementsBaseVertex(GLenum mode, - GLuint start, GLuint end, - GLsizei count, GLenum type, - const GLvoid * indices, - GLint basevertex) -{ -} - -static void GLAPIENTRY -_mesa_noop_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei * count, - GLenum type, - const GLvoid ** indices, - GLsizei primcount, - const GLint * basevertex) { }
@@ -500,9 +476,6 @@ vfmt->DrawElements = _mesa_noop_DrawElements; vfmt->DrawRangeElements = _mesa_noop_DrawRangeElements; vfmt->MultiDrawElementsEXT = _mesa_noop_MultiDrawElements; - vfmt->DrawElementsBaseVertex = _mesa_noop_DrawElementsBaseVertex; - vfmt->DrawRangeElementsBaseVertex = _mesa_noop_DrawRangeElementsBaseVertex; - vfmt->MultiDrawElementsBaseVertex = _mesa_noop_MultiDrawElementsBaseVertex; }
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_rebase.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_rebase.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_rebase.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -138,22 +138,7 @@ printf("%s %d..%d\n", __FUNCTION__, min_index, max_index);
- /* XXX this path is disabled for now. - * There's rendering corruption in some apps when it's enabled. - */ - if (0 && ib && ctx->Extensions.ARB_draw_elements_base_vertex) { - /* If we can just tell the hardware or the TNL to interpret our - * indices with a different base, do so. - */ - tmp_prims = (struct _mesa_prim *)malloc(sizeof(*prim) * nr_prims); - - for (i = 0; i < nr_prims; i++) { - tmp_prims[i] = prim[i]; - tmp_prims[i].basevertex -= min_index; - } - - prim = tmp_prims; - } else if (ib) { + if (ib) { /* Unfortunately need to adjust each index individually. */ GLboolean map_ib = ib->obj->Name && !ib->obj->Pointer;
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_save_api.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_save_api.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_save_api.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -980,40 +980,6 @@
static void GLAPIENTRY -_save_DrawElementsBaseVertex(GLenum mode, GLsizei count, GLenum type, - const GLvoid * indices, GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - (void) mode; - (void) count; - (void) type; - (void) indices; - (void) basevertex; - _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawElements"); -} - - -static void GLAPIENTRY -_save_DrawRangeElementsBaseVertex(GLenum mode, - GLuint start, - GLuint end, - GLsizei count, - GLenum type, - const GLvoid * indices, GLint basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - (void) mode; - (void) start; - (void) end; - (void) count; - (void) type; - (void) indices; - (void) basevertex; - _mesa_compile_error(ctx, GL_INVALID_OPERATION, "glDrawRangeElements"); -} - - -static void GLAPIENTRY _save_DrawArrays(GLenum mode, GLint start, GLsizei count) { GET_CURRENT_CONTEXT(ctx); @@ -1039,23 +1005,6 @@
static void GLAPIENTRY -_save_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, - GLenum type, const GLvoid **indices, - GLsizei primcount, const GLint *basevertex) -{ - GET_CURRENT_CONTEXT(ctx); - (void) mode; - (void) count; - (void) type; - (void) indices; - (void) primcount; - (void) basevertex; - _mesa_compile_error(ctx, GL_INVALID_OPERATION, - "glMultiDrawElementsBaseVertex"); -} - - -static void GLAPIENTRY _save_Rectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2) { GET_CURRENT_CONTEXT(ctx); @@ -1168,7 +1117,7 @@ struct vbo_save_context *save = &vbo_context(ctx)->save; GLint i;
- if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices, 0)) + if (!_mesa_validate_DrawElements(ctx, mode, count, type, indices)) return;
if (save->out_of_memory) @@ -1216,7 +1165,7 @@ struct vbo_save_context *save = &vbo_context(ctx)->save;
if (!_mesa_validate_DrawRangeElements(ctx, mode, - start, end, count, type, indices, 0)) + start, end, count, type, indices)) return;
if (save->out_of_memory) @@ -1235,25 +1184,6 @@ for (i = 0; i < primcount; i++) { if (count[i] > 0) { CALL_DrawElements(GET_DISPATCH(), (mode, count[i], type, indices[i])); - } - } -} - - -static void GLAPIENTRY -_save_OBE_MultiDrawElementsBaseVertex(GLenum mode, const GLsizei *count, - GLenum type, - const GLvoid **indices, - GLsizei primcount, - const GLint *basevertex) -{ - GLsizei i; - - for (i = 0; i < primcount; i++) { - if (count[i] > 0) { - CALL_DrawElementsBaseVertex(GET_DISPATCH(), (mode, count[i], type, - indices[i], - basevertex[i])); } } } @@ -1356,10 +1286,7 @@ vfmt->DrawArrays = _save_DrawArrays; vfmt->DrawElements = _save_DrawElements; vfmt->DrawRangeElements = _save_DrawRangeElements; - vfmt->DrawElementsBaseVertex = _save_DrawElementsBaseVertex; - vfmt->DrawRangeElementsBaseVertex = _save_DrawRangeElementsBaseVertex; vfmt->MultiDrawElementsEXT = _save_MultiDrawElements; - vfmt->MultiDrawElementsBaseVertex = _save_MultiDrawElementsBaseVertex; }
@@ -1562,7 +1489,6 @@ ctx->ListState.ListVtxfmt.DrawElements = _save_OBE_DrawElements; ctx->ListState.ListVtxfmt.DrawRangeElements = _save_OBE_DrawRangeElements; ctx->ListState.ListVtxfmt.MultiDrawElementsEXT = _save_OBE_MultiDrawElements; - ctx->ListState.ListVtxfmt.MultiDrawElementsBaseVertex = _save_OBE_MultiDrawElementsBaseVertex; _mesa_install_save_vtxfmt(ctx, &ctx->ListState.ListVtxfmt); }
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -108,14 +108,6 @@ vbo_draw_func draw, const struct split_limits *limits ) { - GLint max_basevertex = prim->basevertex; - GLuint i; - - for (i = 1; i < nr_prims; i++) - max_basevertex = MAX2(max_basevertex, prim[i].basevertex); - - /* XXX max_basevertex is computed but not used, why? */ - if (ib) { if (limits->max_indices == 0) { /* Could traverse the indices, re-emitting vertices in turn.
Modified: trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split_copy.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/opengl/mesa/src/mesa/vb... ============================================================================== --- trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split_copy.c [iso-8859-1] (original) +++ trunk/reactos/dll/opengl/mesa/src/mesa/vbo/vbo_split_copy.c [iso-8859-1] Tue Oct 1 22:44:06 2013 @@ -588,40 +588,28 @@ const struct split_limits *limits ) { struct copy_context copy; - GLuint i, this_nr_prims; - - for (i = 0; i < nr_prims;) { - /* Our SW TNL pipeline doesn't handle basevertex yet, so bind_indices - * will rebase the elements to the basevertex, and we'll only - * emit strings of prims with the same basevertex in one draw call. - */ - for (this_nr_prims = 1; i + this_nr_prims < nr_prims; - this_nr_prims++) { - if (prim[i].basevertex != prim[i + this_nr_prims].basevertex) - break; - } - - memset(©, 0, sizeof(copy)); - - /* Require indexed primitives: - */ - assert(ib); - - copy.ctx = ctx; - copy.array = arrays; - copy.prim = &prim[i]; - copy.nr_prims = this_nr_prims; - copy.ib = ib; - copy.draw = draw; - copy.limits = limits; - - /* Clear the vertex cache: - */ - for (i = 0; i < ELT_TABLE_SIZE; i++) - copy.vert_cache[i].in = ~0; - - replay_init(©); - replay_elts(©); - replay_finish(©); - } -} + GLuint i; + + memset(©, 0, sizeof(copy)); + + /* Require indexed primitives: + */ + assert(ib); + + copy.ctx = ctx; + copy.array = arrays; + copy.prim = prim; + copy.nr_prims = nr_prims; + copy.ib = ib; + copy.draw = draw; + copy.limits = limits; + + /* Clear the vertex cache: + */ + for (i = 0; i < ELT_TABLE_SIZE; i++) + copy.vert_cache[i].in = ~0; + + replay_init(©); + replay_elts(©); + replay_finish(©); +}