diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn deleted file mode 100644 index 60caeb6d8deb23ef4508ceeb5d68eacd6e58c052..0000000000000000000000000000000000000000 --- a/third_party/mesa/BUILD.gn +++ /dev/null @@ -1,723 +0,0 @@ -# Copyright 2014 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import("//build/config/ui.gni") - -config("mesa_headers_config") { - include_dirs = [ "src/include" ] - if (use_x11) { - defines = [ "MESA_EGL_NO_X11_HEADERS" ] - } -} - -# This directory contains checked-in files generated from the Mesa build. -generated_src_dir = "src/chromium_gensrc" - -source_set("mesa_headers") { - public_configs = [ ":mesa_headers_config" ] -} - -# This config must generally be prepended to the configs list so that the Mesa -# dirs appear before the system ones on Windows. This is necessary so that -# #include "GL/gl.h" means to include Mesa's, not the system's. -config("mesa_internal_config") { - cflags = [] - defines = [ - "MAPI_ABI_HEADER=\"glapi_mapi_tmp_shared.h\"", - "PACKAGE_NAME=\"Mesa\"", - "PACKAGE_TARNAME=\"mesa\"", - "PACKAGE_VERSION=\"9.0.3\"", - "PACKAGE_STRING=\"Mesa\ 9.0.3\"", - "PACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"", - "PACKAGE_URL=\"\"", - "PACKAGE=\"mesa\"", - "VERSION=\"9.0.3\"", - "STDC_HEADERS=1", - "HAVE_SYS_TYPES_H=1", - "HAVE_SYS_STAT_H=1", - "HAVE_STDLIB_H=1", - "HAVE_STRING_H=1", - "HAVE_MEMORY_H=1", - "HAVE_STRINGS_H=1", - "HAVE_INTTYPES_H=1", - "HAVE_STDINT_H=1", - "HAVE_DLFCN_H=1", - "LT_OBJDIR=\".libs/\"", - "YYTEXT_POINTER=1", - "HAVE_LIBEXPAT=1", - "HAVE_LIBXCB_DRI2=1", - "FEATURE_GL=1", - "MAPI_MODE_GLAPI", - - #"USE_X86_64_ASM", - "IN_DRI_DRIVER", - "USE_XCB", - "GLX_INDIRECT_RENDERING", - "GLX_DIRECT_RENDERING", - "USE_EXTERNAL_DXTN_LIB=1", - "IN_DRI_DRIVER", - "HAVE_ALIAS", - "HAVE_MINCORE", - "HAVE_LIBUDEV", - "_GLAPI_NO_EXPORTS", - ] - include_dirs = [ - "src/src/gallium/auxiliary", - "src/src/gallium/include", - "src/src/glsl", - "src/src/glsl/glcpp", - "src/src/mapi", - "src/src/mapi/glapi", - "src/src/mesa", - "src/src/mesa/main", - "src/include", - "$generated_src_dir/mesa/", - "$generated_src_dir/mesa/main", - "$generated_src_dir/mesa/program", - "$generated_src_dir/mesa/glapi", - ] - - if (is_android) { - defines += [ - "__GLIBC__", - "_GNU_SOURCE", - ] - } - - if (is_linux) { - defines += [ "_GNU_SOURCE" ] - } - - if (is_win) { - defines += [ - # Generated files use const only if __cplusplus or __STDC__ is defined. - # On Windows, neither is defined, so define YY_USE_CONST to explicitly - # enable const. - "YY_USE_CONST", - ] - } - - if (is_posix) { - defines += [ - "HAVE_DLOPEN", - "HAVE_PTHREAD=1", - "HAVE_UNISTD_H=1", - ] - - if (!is_android) { - defines += [ "HAVE_POSIX_MEMALIGN" ] - } - - if (!is_android && !is_mac) { - cflags += [ "-fPIC" ] - } - } -} - -# mesa_internal_config is prepended to the config lists. Flags that -# disable warnings need to be appended instead so that they show up -# after flags like -Wall. (gn orders flags on a target before flags from -# configs.) -config("mesa_internal_warnings") { - cflags = [] - if (is_clang) { - cflags += [ - "-Wno-tautological-constant-out-of-range-compare", - "-Wno-mismatched-tags", # Fixed upstream. - ] - } - if (is_win) { - # TODO(scottmg): http://crbug.com/143877 These should be removed if - # Mesa is ever rolled and the warnings are fixed. - cflags += [ - "/wd4005", # Macro defined twice. - "/wd4065", # Switch statement contains 'default' but no 'case' labels. - "/wd4090", # 'Operation' : different 'modifier' qualifiers - "/wd4099", # Type name struct-vs-class doesn't match. - "/wd4273", # Inconsistent DLL linkage. - "/wd4291", # No matching operator delete found for placement new. - "/wd4305", # Truncation from int to float. - "/wd4334", # Result of 32-bit shift implicitly converted to 64 bits. - "/wd4345", # POD-type default initializers. - ] - } -} - -static_library("mesa_libglslcommon") { - sources = [ - "$generated_src_dir/mesa/glcpp-lex.c", - "$generated_src_dir/mesa/glcpp-parse.c", - "$generated_src_dir/mesa/glcpp-parse.h", - "$generated_src_dir/mesa/glsl_lexer.cc", - "$generated_src_dir/mesa/glsl_parser.cc", - "$generated_src_dir/mesa/main/dispatch.h", - "src/src/glsl/ast_expr.cpp", - "src/src/glsl/ast_function.cpp", - "src/src/glsl/ast_to_hir.cpp", - "src/src/glsl/ast_type.cpp", - "src/src/glsl/builtin_variables.cpp", - "src/src/glsl/glcpp/glcpp.h", - "src/src/glsl/glcpp/pp.c", - "src/src/glsl/glsl_parser_extras.cpp", - "src/src/glsl/glsl_parser_extras.h", - "src/src/glsl/glsl_symbol_table.cpp", - "src/src/glsl/glsl_symbol_table.h", - "src/src/glsl/glsl_types.cpp", - "src/src/glsl/glsl_types.h", - "src/src/glsl/hir_field_selection.cpp", - "src/src/glsl/ir.cpp", - "src/src/glsl/ir.h", - "src/src/glsl/ir_basic_block.cpp", - "src/src/glsl/ir_basic_block.h", - "src/src/glsl/ir_builder.cpp", - "src/src/glsl/ir_builder.h", - "src/src/glsl/ir_clone.cpp", - "src/src/glsl/ir_constant_expression.cpp", - "src/src/glsl/ir_expression_flattening.cpp", - "src/src/glsl/ir_expression_flattening.h", - "src/src/glsl/ir_function.cpp", - "src/src/glsl/ir_function_can_inline.cpp", - "src/src/glsl/ir_function_detect_recursion.cpp", - "src/src/glsl/ir_hierarchical_visitor.cpp", - "src/src/glsl/ir_hierarchical_visitor.h", - "src/src/glsl/ir_hv_accept.cpp", - "src/src/glsl/ir_import_prototypes.cpp", - "src/src/glsl/ir_print_visitor.cpp", - "src/src/glsl/ir_print_visitor.h", - "src/src/glsl/ir_reader.cpp", - "src/src/glsl/ir_reader.h", - "src/src/glsl/ir_rvalue_visitor.cpp", - "src/src/glsl/ir_rvalue_visitor.h", - "src/src/glsl/ir_set_program_inouts.cpp", - "src/src/glsl/ir_validate.cpp", - "src/src/glsl/ir_variable_refcount.cpp", - "src/src/glsl/ir_variable_refcount.h", - "src/src/glsl/link_functions.cpp", - "src/src/glsl/link_uniform_initializers.cpp", - "src/src/glsl/link_uniforms.cpp", - "src/src/glsl/linker.cpp", - "src/src/glsl/linker.h", - "src/src/glsl/loop_analysis.cpp", - "src/src/glsl/loop_analysis.h", - "src/src/glsl/loop_controls.cpp", - "src/src/glsl/loop_unroll.cpp", - "src/src/glsl/lower_clip_distance.cpp", - "src/src/glsl/lower_discard.cpp", - "src/src/glsl/lower_discard_flow.cpp", - "src/src/glsl/lower_if_to_cond_assign.cpp", - "src/src/glsl/lower_instructions.cpp", - "src/src/glsl/lower_jumps.cpp", - "src/src/glsl/lower_mat_op_to_vec.cpp", - "src/src/glsl/lower_noise.cpp", - "src/src/glsl/lower_output_reads.cpp", - "src/src/glsl/lower_texture_projection.cpp", - "src/src/glsl/lower_ubo_reference.cpp", - "src/src/glsl/lower_variable_index_to_cond_assign.cpp", - "src/src/glsl/lower_vec_index_to_cond_assign.cpp", - "src/src/glsl/lower_vec_index_to_swizzle.cpp", - "src/src/glsl/lower_vector.cpp", - "src/src/glsl/opt_algebraic.cpp", - "src/src/glsl/opt_array_splitting.cpp", - "src/src/glsl/opt_constant_folding.cpp", - "src/src/glsl/opt_constant_propagation.cpp", - "src/src/glsl/opt_constant_variable.cpp", - "src/src/glsl/opt_copy_propagation.cpp", - "src/src/glsl/opt_copy_propagation_elements.cpp", - "src/src/glsl/opt_dead_code.cpp", - "src/src/glsl/opt_dead_code_local.cpp", - "src/src/glsl/opt_dead_functions.cpp", - "src/src/glsl/opt_function_inlining.cpp", - "src/src/glsl/opt_if_simplification.cpp", - "src/src/glsl/opt_noop_swizzle.cpp", - "src/src/glsl/opt_redundant_jumps.cpp", - "src/src/glsl/opt_structure_splitting.cpp", - "src/src/glsl/opt_swizzle_swizzle.cpp", - "src/src/glsl/opt_tree_grafting.cpp", - "src/src/glsl/program.h", - "src/src/glsl/ralloc.c", - "src/src/glsl/ralloc.h", - "src/src/glsl/s_expression.cpp", - "src/src/glsl/s_expression.h", - - # Skipped in the GN build. This file duplicates symbols from errors.c and - # happens to link in GYP due to static library link ordering. - #"src/src/glsl/standalone_scaffolding.cpp", - #"src/src/glsl/standalone_scaffolding.h", - "src/src/glsl/strtod.c", - "src/src/glsl/strtod.h", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + - [ ":mesa_internal_warnings" ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - deps = [ - ":mesa_headers", - ] -} - -static_library("mesa") { - sources = [ - "$generated_src_dir/mesa/builtin_function.cpp", - "$generated_src_dir/mesa/enums.c", - "$generated_src_dir/mesa/glapi_mapi_tmp_shared.h", - "$generated_src_dir/mesa/lex.yy.c", - "$generated_src_dir/mesa/program/program_parse.tab.c", - "$generated_src_dir/mesa/program/program_parse.tab.h", - "src/src/mapi/mapi/entry.c", - "src/src/mapi/mapi/entry.h", - "src/src/mapi/mapi/mapi_glapi.c", - "src/src/mapi/mapi/stub.c", - "src/src/mapi/mapi/stub.h", - "src/src/mapi/mapi/table.c", - "src/src/mapi/mapi/table.h", - "src/src/mapi/mapi/u_current.c", - "src/src/mapi/mapi/u_current.h", - "src/src/mapi/mapi/u_execmem.c", - "src/src/mapi/mapi/u_execmem.h", - "src/src/mesa/main/accum.c", - "src/src/mesa/main/accum.h", - "src/src/mesa/main/api_arrayelt.c", - "src/src/mesa/main/api_arrayelt.h", - "src/src/mesa/main/api_exec.c", - "src/src/mesa/main/api_exec.h", - "src/src/mesa/main/api_loopback.c", - "src/src/mesa/main/api_loopback.h", - "src/src/mesa/main/api_validate.c", - "src/src/mesa/main/api_validate.h", - "src/src/mesa/main/arbprogram.c", - "src/src/mesa/main/arbprogram.h", - "src/src/mesa/main/arrayobj.c", - "src/src/mesa/main/arrayobj.h", - "src/src/mesa/main/atifragshader.c", - "src/src/mesa/main/atifragshader.h", - "src/src/mesa/main/attrib.c", - "src/src/mesa/main/attrib.h", - "src/src/mesa/main/blend.c", - "src/src/mesa/main/blend.h", - "src/src/mesa/main/bufferobj.c", - "src/src/mesa/main/bufferobj.h", - "src/src/mesa/main/buffers.c", - "src/src/mesa/main/buffers.h", - "src/src/mesa/main/clear.c", - "src/src/mesa/main/clear.h", - "src/src/mesa/main/clip.c", - "src/src/mesa/main/clip.h", - "src/src/mesa/main/colortab.c", - "src/src/mesa/main/colortab.h", - "src/src/mesa/main/condrender.c", - "src/src/mesa/main/condrender.h", - "src/src/mesa/main/context.c", - "src/src/mesa/main/context.h", - "src/src/mesa/main/convolve.c", - "src/src/mesa/main/convolve.h", - "src/src/mesa/main/cpuinfo.c", - "src/src/mesa/main/cpuinfo.h", - "src/src/mesa/main/debug.c", - "src/src/mesa/main/debug.h", - "src/src/mesa/main/depth.c", - "src/src/mesa/main/depth.h", - "src/src/mesa/main/dlist.c", - "src/src/mesa/main/dlist.h", - "src/src/mesa/main/drawpix.c", - "src/src/mesa/main/drawpix.h", - "src/src/mesa/main/drawtex.c", - "src/src/mesa/main/drawtex.h", - "src/src/mesa/main/enable.c", - "src/src/mesa/main/enable.h", - "src/src/mesa/main/enums.h", - "src/src/mesa/main/errors.c", - "src/src/mesa/main/errors.h", - "src/src/mesa/main/eval.c", - "src/src/mesa/main/eval.h", - "src/src/mesa/main/execmem.c", - "src/src/mesa/main/extensions.c", - "src/src/mesa/main/extensions.h", - "src/src/mesa/main/fbobject.c", - "src/src/mesa/main/fbobject.h", - "src/src/mesa/main/feedback.c", - "src/src/mesa/main/feedback.h", - "src/src/mesa/main/ff_fragment_shader.cpp", - "src/src/mesa/main/ffvertex_prog.c", - "src/src/mesa/main/ffvertex_prog.h", - "src/src/mesa/main/fog.c", - "src/src/mesa/main/fog.h", - "src/src/mesa/main/format_pack.c", - "src/src/mesa/main/format_pack.h", - "src/src/mesa/main/format_unpack.c", - "src/src/mesa/main/format_unpack.h", - "src/src/mesa/main/formats.c", - "src/src/mesa/main/formats.h", - "src/src/mesa/main/framebuffer.c", - "src/src/mesa/main/framebuffer.h", - "src/src/mesa/main/get.c", - "src/src/mesa/main/get.h", - "src/src/mesa/main/getstring.c", - "src/src/mesa/main/glformats.c", - "src/src/mesa/main/glformats.h", - "src/src/mesa/main/hash.c", - "src/src/mesa/main/hash.h", - "src/src/mesa/main/hint.c", - "src/src/mesa/main/hint.h", - "src/src/mesa/main/histogram.c", - "src/src/mesa/main/histogram.h", - "src/src/mesa/main/image.c", - "src/src/mesa/main/image.h", - "src/src/mesa/main/imports.c", - "src/src/mesa/main/imports.h", - "src/src/mesa/main/light.c", - "src/src/mesa/main/light.h", - "src/src/mesa/main/lines.c", - "src/src/mesa/main/lines.h", - "src/src/mesa/main/matrix.c", - "src/src/mesa/main/matrix.h", - "src/src/mesa/main/mipmap.c", - "src/src/mesa/main/mipmap.h", - "src/src/mesa/main/mm.c", - "src/src/mesa/main/mm.h", - "src/src/mesa/main/multisample.c", - "src/src/mesa/main/multisample.h", - "src/src/mesa/main/nvprogram.c", - "src/src/mesa/main/nvprogram.h", - "src/src/mesa/main/pack.c", - "src/src/mesa/main/pack.h", - "src/src/mesa/main/pbo.c", - "src/src/mesa/main/pbo.h", - "src/src/mesa/main/pixel.c", - "src/src/mesa/main/pixel.h", - "src/src/mesa/main/pixelstore.c", - "src/src/mesa/main/pixelstore.h", - "src/src/mesa/main/pixeltransfer.c", - "src/src/mesa/main/pixeltransfer.h", - "src/src/mesa/main/points.c", - "src/src/mesa/main/points.h", - "src/src/mesa/main/polygon.c", - "src/src/mesa/main/polygon.h", - "src/src/mesa/main/queryobj.c", - "src/src/mesa/main/queryobj.h", - "src/src/mesa/main/rastpos.c", - "src/src/mesa/main/rastpos.h", - "src/src/mesa/main/readpix.c", - "src/src/mesa/main/readpix.h", - "src/src/mesa/main/remap.c", - "src/src/mesa/main/remap.h", - "src/src/mesa/main/renderbuffer.c", - "src/src/mesa/main/renderbuffer.h", - "src/src/mesa/main/samplerobj.c", - "src/src/mesa/main/samplerobj.h", - "src/src/mesa/main/scissor.c", - "src/src/mesa/main/scissor.h", - "src/src/mesa/main/shader_query.cpp", - "src/src/mesa/main/shaderapi.c", - "src/src/mesa/main/shaderapi.h", - "src/src/mesa/main/shaderobj.c", - "src/src/mesa/main/shaderobj.h", - "src/src/mesa/main/shared.c", - "src/src/mesa/main/shared.h", - "src/src/mesa/main/state.c", - "src/src/mesa/main/state.h", - "src/src/mesa/main/stencil.c", - "src/src/mesa/main/stencil.h", - "src/src/mesa/main/syncobj.c", - "src/src/mesa/main/syncobj.h", - "src/src/mesa/main/texcompress.c", - "src/src/mesa/main/texcompress.h", - "src/src/mesa/main/texcompress_cpal.c", - "src/src/mesa/main/texcompress_cpal.h", - "src/src/mesa/main/texcompress_etc.c", - "src/src/mesa/main/texcompress_etc.h", - "src/src/mesa/main/texcompress_fxt1.c", - "src/src/mesa/main/texcompress_fxt1.h", - "src/src/mesa/main/texcompress_rgtc.c", - "src/src/mesa/main/texcompress_rgtc.h", - "src/src/mesa/main/texcompress_s3tc.c", - "src/src/mesa/main/texcompress_s3tc.h", - "src/src/mesa/main/texenv.c", - "src/src/mesa/main/texenv.h", - "src/src/mesa/main/texformat.c", - "src/src/mesa/main/texformat.h", - "src/src/mesa/main/texgen.c", - "src/src/mesa/main/texgen.h", - "src/src/mesa/main/texgetimage.c", - "src/src/mesa/main/texgetimage.h", - "src/src/mesa/main/teximage.c", - "src/src/mesa/main/teximage.h", - "src/src/mesa/main/texobj.c", - "src/src/mesa/main/texobj.h", - "src/src/mesa/main/texparam.c", - "src/src/mesa/main/texparam.h", - "src/src/mesa/main/texstate.c", - "src/src/mesa/main/texstate.h", - "src/src/mesa/main/texstorage.c", - "src/src/mesa/main/texstorage.h", - "src/src/mesa/main/texstore.c", - "src/src/mesa/main/texstore.h", - "src/src/mesa/main/texturebarrier.c", - "src/src/mesa/main/texturebarrier.h", - "src/src/mesa/main/transformfeedback.c", - "src/src/mesa/main/transformfeedback.h", - "src/src/mesa/main/uniform_query.cpp", - "src/src/mesa/main/uniforms.c", - "src/src/mesa/main/uniforms.h", - "src/src/mesa/main/varray.c", - "src/src/mesa/main/varray.h", - "src/src/mesa/main/version.c", - "src/src/mesa/main/version.h", - "src/src/mesa/main/viewport.c", - "src/src/mesa/main/viewport.h", - "src/src/mesa/main/vtxfmt.c", - "src/src/mesa/main/vtxfmt.h", - "src/src/mesa/math/m_debug_clip.c", - "src/src/mesa/math/m_debug_norm.c", - "src/src/mesa/math/m_debug_xform.c", - "src/src/mesa/math/m_eval.c", - "src/src/mesa/math/m_eval.h", - "src/src/mesa/math/m_matrix.c", - "src/src/mesa/math/m_matrix.h", - "src/src/mesa/math/m_translate.c", - "src/src/mesa/math/m_translate.h", - "src/src/mesa/math/m_vector.c", - "src/src/mesa/math/m_vector.h", - "src/src/mesa/math/m_xform.c", - "src/src/mesa/math/m_xform.h", - "src/src/mesa/program/arbprogparse.c", - "src/src/mesa/program/arbprogparse.h", - "src/src/mesa/program/hash_table.c", - "src/src/mesa/program/hash_table.h", - "src/src/mesa/program/ir_to_mesa.cpp", - "src/src/mesa/program/ir_to_mesa.h", - "src/src/mesa/program/nvfragparse.c", - "src/src/mesa/program/nvfragparse.h", - "src/src/mesa/program/nvvertparse.c", - "src/src/mesa/program/nvvertparse.h", - "src/src/mesa/program/prog_cache.c", - "src/src/mesa/program/prog_cache.h", - "src/src/mesa/program/prog_execute.c", - "src/src/mesa/program/prog_execute.h", - "src/src/mesa/program/prog_instruction.c", - "src/src/mesa/program/prog_instruction.h", - "src/src/mesa/program/prog_noise.c", - "src/src/mesa/program/prog_noise.h", - "src/src/mesa/program/prog_opt_constant_fold.c", - "src/src/mesa/program/prog_optimize.c", - "src/src/mesa/program/prog_optimize.h", - "src/src/mesa/program/prog_parameter.c", - "src/src/mesa/program/prog_parameter.h", - "src/src/mesa/program/prog_parameter_layout.c", - "src/src/mesa/program/prog_parameter_layout.h", - "src/src/mesa/program/prog_print.c", - "src/src/mesa/program/prog_print.h", - "src/src/mesa/program/prog_statevars.c", - "src/src/mesa/program/prog_statevars.h", - "src/src/mesa/program/program.c", - "src/src/mesa/program/program.h", - "src/src/mesa/program/program_parse_extra.c", - "src/src/mesa/program/programopt.c", - "src/src/mesa/program/programopt.h", - "src/src/mesa/program/register_allocate.c", - "src/src/mesa/program/register_allocate.h", - "src/src/mesa/program/sampler.cpp", - "src/src/mesa/program/sampler.h", - "src/src/mesa/program/string_to_uint_map.cpp", - "src/src/mesa/program/symbol_table.c", - "src/src/mesa/program/symbol_table.h", - "src/src/mesa/swrast/s_aaline.c", - "src/src/mesa/swrast/s_aaline.h", - "src/src/mesa/swrast/s_aatriangle.c", - "src/src/mesa/swrast/s_aatriangle.h", - "src/src/mesa/swrast/s_alpha.c", - "src/src/mesa/swrast/s_alpha.h", - "src/src/mesa/swrast/s_atifragshader.c", - "src/src/mesa/swrast/s_atifragshader.h", - "src/src/mesa/swrast/s_bitmap.c", - "src/src/mesa/swrast/s_blend.c", - "src/src/mesa/swrast/s_blend.h", - "src/src/mesa/swrast/s_blit.c", - "src/src/mesa/swrast/s_clear.c", - "src/src/mesa/swrast/s_context.c", - "src/src/mesa/swrast/s_context.h", - "src/src/mesa/swrast/s_copypix.c", - "src/src/mesa/swrast/s_depth.c", - "src/src/mesa/swrast/s_depth.h", - "src/src/mesa/swrast/s_drawpix.c", - "src/src/mesa/swrast/s_feedback.c", - "src/src/mesa/swrast/s_feedback.h", - "src/src/mesa/swrast/s_fog.c", - "src/src/mesa/swrast/s_fog.h", - "src/src/mesa/swrast/s_fragprog.c", - "src/src/mesa/swrast/s_fragprog.h", - "src/src/mesa/swrast/s_lines.c", - "src/src/mesa/swrast/s_lines.h", - "src/src/mesa/swrast/s_logic.c", - "src/src/mesa/swrast/s_logic.h", - "src/src/mesa/swrast/s_masking.c", - "src/src/mesa/swrast/s_masking.h", - "src/src/mesa/swrast/s_points.c", - "src/src/mesa/swrast/s_points.h", - "src/src/mesa/swrast/s_renderbuffer.c", - "src/src/mesa/swrast/s_renderbuffer.h", - "src/src/mesa/swrast/s_span.c", - "src/src/mesa/swrast/s_span.h", - "src/src/mesa/swrast/s_stencil.c", - "src/src/mesa/swrast/s_stencil.h", - "src/src/mesa/swrast/s_texcombine.c", - "src/src/mesa/swrast/s_texcombine.h", - "src/src/mesa/swrast/s_texfetch.c", - "src/src/mesa/swrast/s_texfetch.h", - "src/src/mesa/swrast/s_texfilter.c", - "src/src/mesa/swrast/s_texfilter.h", - "src/src/mesa/swrast/s_texrender.c", - "src/src/mesa/swrast/s_texture.c", - "src/src/mesa/swrast/s_triangle.c", - "src/src/mesa/swrast/s_triangle.h", - "src/src/mesa/swrast/s_zoom.c", - "src/src/mesa/swrast/s_zoom.h", - "src/src/mesa/swrast_setup/ss_context.c", - "src/src/mesa/swrast_setup/ss_context.h", - "src/src/mesa/swrast_setup/ss_triangle.c", - "src/src/mesa/swrast_setup/ss_triangle.h", - "src/src/mesa/tnl/t_context.c", - "src/src/mesa/tnl/t_context.h", - "src/src/mesa/tnl/t_draw.c", - "src/src/mesa/tnl/t_pipeline.c", - "src/src/mesa/tnl/t_pipeline.h", - "src/src/mesa/tnl/t_rasterpos.c", - "src/src/mesa/tnl/t_vb_fog.c", - "src/src/mesa/tnl/t_vb_light.c", - "src/src/mesa/tnl/t_vb_normals.c", - "src/src/mesa/tnl/t_vb_points.c", - "src/src/mesa/tnl/t_vb_program.c", - "src/src/mesa/tnl/t_vb_render.c", - "src/src/mesa/tnl/t_vb_texgen.c", - "src/src/mesa/tnl/t_vb_texmat.c", - "src/src/mesa/tnl/t_vb_vertex.c", - "src/src/mesa/tnl/t_vertex.c", - "src/src/mesa/tnl/t_vertex.h", - "src/src/mesa/tnl/t_vertex_generic.c", - "src/src/mesa/tnl/t_vertex_sse.c", - "src/src/mesa/tnl/t_vp_build.c", - "src/src/mesa/tnl/t_vp_build.h", - "src/src/mesa/vbo/vbo_context.c", - "src/src/mesa/vbo/vbo_context.h", - "src/src/mesa/vbo/vbo_exec.c", - "src/src/mesa/vbo/vbo_exec.h", - "src/src/mesa/vbo/vbo_exec_api.c", - "src/src/mesa/vbo/vbo_exec_array.c", - "src/src/mesa/vbo/vbo_exec_draw.c", - "src/src/mesa/vbo/vbo_exec_eval.c", - "src/src/mesa/vbo/vbo_noop.c", - "src/src/mesa/vbo/vbo_noop.h", - "src/src/mesa/vbo/vbo_primitive_restart.c", - "src/src/mesa/vbo/vbo_rebase.c", - "src/src/mesa/vbo/vbo_save.c", - "src/src/mesa/vbo/vbo_save.h", - "src/src/mesa/vbo/vbo_save_api.c", - "src/src/mesa/vbo/vbo_save_draw.c", - "src/src/mesa/vbo/vbo_save_loopback.c", - "src/src/mesa/vbo/vbo_split.c", - "src/src/mesa/vbo/vbo_split.h", - "src/src/mesa/vbo/vbo_split_copy.c", - "src/src/mesa/vbo/vbo_split_inplace.c", - "src/src/mesa/x86-64/x86-64.c", - "src/src/mesa/x86-64/x86-64.h", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ "//build/config/compiler:no_chromium_code" ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + - [ ":mesa_internal_warnings" ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - cflags = [] - - if (is_android && !is_clang) { - # Disable sincos() optimization to avoid a linker error - # since Android's math library doesn't have sincos(). - # Either -fno-builtin-sin or -fno-builtin-cos works. - cflags += [ "-fno-builtin-sin" ] - } - - if (is_win) { - defines = [ - # Because we're building as a static library - "_GLAPI_NO_EXPORTS", - ] - } - - deps = [ - ":mesa_headers", - ] -} - -if (!is_android) { # TODO(GYP) enable for Android. - # Building this target will hide the native OpenGL shared library and - # replace it with a slow software renderer. - # TODO(GYP) http://crbug.com/380327 need support for loadable_module. - #loadable_module("osmesa") { - shared_library("osmesa") { - sources = [ - "src/src/mesa/drivers/common/driverfuncs.c", - "src/src/mesa/drivers/common/driverfuncs.h", - "src/src/mesa/drivers/common/meta.c", - "src/src/mesa/drivers/common/meta.h", - "src/src/mesa/drivers/osmesa/osmesa.c", - ] - - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - ":mesa_headers_config", - "//build/config/compiler:no_chromium_code", - ] - previous_configs = configs - configs = [] - configs = [ ":mesa_internal_config" ] + previous_configs + - [ ":mesa_internal_warnings" ] - - include_dirs = [ "src/src/mesa/drivers" ] - - if (is_clang) { - # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] - } - - if (is_win) { - ldflags = - [ "/DEF:" + rebase_path("src/src/mesa/drivers/osmesa/osmesa.def", - root_build_dir) ] - } - - deps = [ - ":mesa_headers", - ":mesa", - ":mesa_libglslcommon", - ] - - if (is_win) { - defines = [ - "BUILD_GL32", - "KEYWORD1=GLAPI", - "KEYWORD2=GLAPIENTRY", - ] - } - } -} else { - # Placeholder to allow targets to unconditionally depend on this. - group("osmesa") { - } -} # !is_android -# TODO(GYP) Android osmesa_in_lib_dir target. diff --git a/third_party/mesa/LICENSE b/third_party/mesa/LICENSE deleted file mode 100644 index 792c6fe50e0b69b86459d93d926a7bd6effd109a..0000000000000000000000000000000000000000 --- a/third_party/mesa/LICENSE +++ /dev/null @@ -1,512 +0,0 @@ -The default Mesa license is as follows: - -Copyright (C) 1999-2007 Brian Paul All Rights Reserved. - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS -OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL -BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN -CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -Some parts of Mesa are copyrighted under the GNU LGPL. See the -Mesa/docs/COPYRIGHT file for details. - -The following is the standard GNU copyright file. ----------------------------------------------------------------------- - - - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; either - version 2 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! - diff --git a/third_party/mesa/OWNERS b/third_party/mesa/OWNERS deleted file mode 100644 index 9f0c3e71432d8a010dacfa188ba9025d39f46001..0000000000000000000000000000000000000000 --- a/third_party/mesa/OWNERS +++ /dev/null @@ -1,4 +0,0 @@ -kbr@chromium.org -senorblanco@chromium.org -piman@chromium.org -marcheu@chromium.org diff --git a/third_party/mesa/README.chromium b/third_party/mesa/README.chromium deleted file mode 100644 index 1a1862ff2ed63e917420f0670e550351157475ad..0000000000000000000000000000000000000000 --- a/third_party/mesa/README.chromium +++ /dev/null @@ -1,59 +0,0 @@ -Name: mesa -Version: 9.0.3 -URL: http://www.mesa3d.org/ -License: MIT and LGPL v2 -Security Critical: Yes - -Description: -This directory contains a copy of the Mesa sources with minor -modifications to work in Chromium's build infrastructure. - -The license file in this directory is derived from src/docs/license.html -and src/docs/COPYING. - -Modifications made: -- Added the file README.chromium (this file) - -- Disabled optimizations using #pragma optimize('', off) in the - following files: - - src/src/mesa/main/mipmap.c - - src/src/mesa/main/pack.c - - src/src/mesa/math/m_eval.c - - src/src/mesa/swrast/s_texcombine.c - -- Checked in sources normally autogenerated during Mesa's build - process under src/chromium_gensrc. - -- Modified _mesa_add_parameter to not read from uninitialized - memory - -- Added typedefs for EGLNative*Type in eglplatform.h, guarded by an - __APPLE__ define - -- Modified glsl_strtod in src/glsl/strtod.c to use strtod instead of - strtod_l on Android - -- Added an #include for at the top of - src/gallium/auxiliary/util/u_debug.h - -- Fix a bug with Multiple Render Targets, see - https://code.google.com/p/chromium/issues/detail?id=308715 - -- #ifdef out inline definitions of math functions that are present in - VS2013's standard library. - -- #pragma optimize off around _swrast_write_zoomed_z_span, ICEing on - VS2013: http://crbug.com/348350. - -- Disabled "#pragma export" usage in gl.h and osmesa.h, - https://bugs.freedesktop.org/show_bug.cgi?id=77749 - -- Porting to x64 Android. Remove redefinitions of log2 and log2f. - https://codereview.chromium.org/216773005/ - -- Excluded src/mapi/mapi/mapi.{h,c} from the build. - -- Backported f8e7aa2827e2bdb1ed238cbdd351be3c8a6e9b12 and - e20a2df4017ab10dd7199936948c6ac809bfacb6 to fix issues with - glGetIntegerv(GL_IMPLEMENTATION_COLOR_READ_FORMAT_OES) when no - framebuffer is bound diff --git a/third_party/mesa/README.txt b/third_party/mesa/README.txt deleted file mode 100644 index 30e4c8cc9c5f3cbeee3bc5bb4479a757fe696dde..0000000000000000000000000000000000000000 --- a/third_party/mesa/README.txt +++ /dev/null @@ -1,15 +0,0 @@ -Compilation has a few phases: - -1. Generate the header and dispatch source files that have to match the GL api. - These read in a description of the GL api in the form of XML files. In - addition, generate the GLSL parser and lexer using flex and bison. These - sources are needed for step 2 -2. Compile everything in src/glsl into a library. This step uses the parser and - lexer output. -3. Compile the compiler (executable) that can create the builtin functions' - source file. Note that this step uses builtin_stubs.cpp because we haven't - generated the actual builtin functions' source file yet. -4. Invoke the compiler that we just built to create - gen/mesa/builtin_function.cpp -5. Compile the rest of mesa, using the builtins that we created in step 4. In - addition, link in all the files that we've previously compiled in step 2. diff --git a/third_party/mesa/chromium.patch b/third_party/mesa/chromium.patch deleted file mode 100644 index 2d6642757969b690011fac2c5127a211faa0e759..0000000000000000000000000000000000000000 --- a/third_party/mesa/chromium.patch +++ /dev/null @@ -1,2107 +0,0 @@ -diff -c -r Mesa-7.9/include/GL/gl.h MesaLib/include/GL/gl.h -*** Mesa-7.9/include/GL/gl.h Tue Apr 27 14:41:21 2010 ---- MesaLib/include/GL/gl.h Thu Oct 14 14:41:53 2010 -*************** -*** 55,61 **** - # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ - # define GLAPI __declspec(dllexport) - # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -! # define GLAPI __declspec(dllimport) - # else /* for use with static link lib build of Win32 edition only */ - # define GLAPI extern - # endif /* _STATIC_MESA support */ ---- 55,65 ---- - # if (defined(_MSC_VER) || defined(__MINGW32__)) && defined(BUILD_GL32) /* tag specify we're building mesa as a DLL */ - # define GLAPI __declspec(dllexport) - # elif (defined(_MSC_VER) || defined(__MINGW32__)) && defined(_DLL) /* tag specifying we're building for DLL runtime support */ -! // We always retrieve the entry points dynamically via GetProcAddress or -! // OSMesaGetProcAddress. This works around an issue where using the MSVC -! // multi-threaded runtime library, which defines _DLL. -! //# define GLAPI __declspec(dllimport) -! # define GLAPI - # else /* for use with static link lib build of Win32 edition only */ - # define GLAPI extern - # endif /* _STATIC_MESA support */ -*************** -*** 72,80 **** - # define GLAPIENTRY - #endif /* WIN32 && !CYGWIN */ - -! #if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -! # define PRAGMA_EXPORT_SUPPORTED 1 -! #endif - - /* - * WINDOWS: Include windows.h here to define APIENTRY. ---- 76,86 ---- - # define GLAPIENTRY - #endif /* WIN32 && !CYGWIN */ - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if (defined(__BEOS__) && defined(__POWERPC__)) || defined(__QUICKDRAW__) -! //# define PRAGMA_EXPORT_SUPPORTED 1 -! //#endif - - /* - * WINDOWS: Include windows.h here to define APIENTRY. -diff -c -r Mesa-7.9/include/GL/glext.h MesaLib/include/GL/glext.h -*** Mesa-7.9/include/GL/glext.h Fri Oct 1 15:51:28 2010 ---- MesaLib/include/GL/glext.h Thu Oct 14 14:50:37 2010 -*************** -*** 5030,5043 **** - - #ifndef GL_VERSION_1_5 - /* GL types for handling large vertex buffer objects */ -! typedef ptrdiff_t GLintptr; -! typedef ptrdiff_t GLsizeiptr; - #endif - - #ifndef GL_ARB_vertex_buffer_object - /* GL types for handling large vertex buffer objects */ -! typedef ptrdiff_t GLintptrARB; -! typedef ptrdiff_t GLsizeiptrARB; - #endif - - #ifndef GL_ARB_shader_objects ---- 5030,5043 ---- - - #ifndef GL_VERSION_1_5 - /* GL types for handling large vertex buffer objects */ -! typedef signed long int GLintptr; -! typedef signed long int GLsizeiptr; - #endif - - #ifndef GL_ARB_vertex_buffer_object - /* GL types for handling large vertex buffer objects */ -! typedef signed long int GLintptrARB; -! typedef signed long int GLsizeiptrARB; - #endif - - #ifndef GL_ARB_shader_objects -diff -c -r Mesa-7.9/include/GL/osmesa.h MesaLib/include/GL/osmesa.h -*** Mesa-7.9/include/GL/osmesa.h Thu Feb 4 16:10:39 2010 ---- MesaLib/include/GL/osmesa.h Thu Oct 14 14:47:08 2010 -*************** -*** 101,109 **** - typedef struct osmesa_context *OSMesaContext; - - -! #if defined(__BEOS__) || defined(__QUICKDRAW__) -! #pragma export on -! #endif - - - /* ---- 101,111 ---- - typedef struct osmesa_context *OSMesaContext; - - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if defined(__BEOS__) || defined(__QUICKDRAW__) -! //#pragma export on -! //#endif - - - /* -*************** -*** 276,284 **** - OSMesaColorClamp(GLboolean enable); - - -! #if defined(__BEOS__) || defined(__QUICKDRAW__) -! #pragma export off -! #endif - - - #ifdef __cplusplus ---- 278,288 ---- - OSMesaColorClamp(GLboolean enable); - - -! // Disabled this because __QUICKDRAW__ is defined on Mac and gcc does not -! // support the pragma. -! //#if defined(__BEOS__) || defined(__QUICKDRAW__) -! //#pragma export off -! //#endif - - - #ifdef __cplusplus -diff -c -r Mesa-7.9/src/glsl/ast_to_hir.cpp MesaLib/src/glsl/ast_to_hir.cpp -*** Mesa-7.9/src/glsl/ast_to_hir.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ast_to_hir.cpp Fri Oct 22 15:28:47 2010 -*************** -*** 55,60 **** ---- 55,61 ---- - #include "ast.h" - #include "glsl_types.h" - #include "ir.h" -+ #include "safe_strcmp.h" - - void - _mesa_ast_to_hir(exec_list *instructions, struct _mesa_glsl_parse_state *state) -*************** -*** 1615,1621 **** - var->pixel_center_integer = qual->pixel_center_integer; - var->origin_upper_left = qual->origin_upper_left; - if ((qual->origin_upper_left || qual->pixel_center_integer) -! && (strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - ---- 1616,1622 ---- - var->pixel_center_integer = qual->pixel_center_integer; - var->origin_upper_left = qual->origin_upper_left; - if ((qual->origin_upper_left || qual->pixel_center_integer) -! && (safe_strcmp(var->name, "gl_FragCoord") != 0)) { - const char *const qual_string = (qual->origin_upper_left) - ? "origin_upper_left" : "pixel_center_integer"; - -*************** -*** 2003,2009 **** - * gl_MaxTextureCoords." - */ - const unsigned size = unsigned(var->type->array_size()); -! if ((strcmp("gl_TexCoord", var->name) == 0) - && (size > state->Const.MaxTextureCoords)) { - YYLTYPE loc = this->get_location(); - ---- 2004,2010 ---- - * gl_MaxTextureCoords." - */ - const unsigned size = unsigned(var->type->array_size()); -! if ((safe_strcmp("gl_TexCoord", var->name) == 0) - && (size > state->Const.MaxTextureCoords)) { - YYLTYPE loc = this->get_location(); - -*************** -*** 2022,2028 **** - delete var; - var = NULL; - } else if (state->extensions->ARB_fragment_coord_conventions -! && strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout ---- 2023,2029 ---- - delete var; - var = NULL; - } else if (state->extensions->ARB_fragment_coord_conventions -! && safe_strcmp(var->name, "gl_FragCoord") == 0 - && earlier->type == var->type - && earlier->mode == var->mode) { - /* Allow redeclaration of gl_FragCoord for ARB_fcc layout -*************** -*** 2336,2342 **** - } - - /* Verify the return type of main() */ -! if (strcmp(name, "main") == 0) { - if (! return_type->is_void()) { - YYLTYPE loc = this->get_location(); - ---- 2337,2343 ---- - } - - /* Verify the return type of main() */ -! if (safe_strcmp(name, "main") == 0) { - if (! return_type->is_void()) { - YYLTYPE loc = this->get_location(); - -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp-parse.c MesaLib/src/glsl/glcpp/glcpp-parse.c -*** Mesa-7.9/src/glsl/glcpp/glcpp-parse.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp-parse.c Fri Oct 22 15:30:59 2010 -*************** -*** 96,106 **** ---- 96,114 ---- - #include - #include - #include -+ /* The #include of inttypes.h causes problems on Windows */ -+ #ifndef _MSC_VER - #include -+ #endif -+ /* Windows headers do not define PRIiMAX */ -+ #ifdef _MSC_VER -+ #define PRIiMAX "I64i" -+ #endif - - #include "glcpp.h" - #include "main/core.h" /* for struct gl_extensions */ - #include "main/mtypes.h" /* for gl_api enum */ -+ #include "safe_strcmp.h" - - #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) - #define glcpp_printf(stream, fmt, args, ...) \ -*************** -*** 2915,2921 **** - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; ---- 2923,2929 ---- - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (safe_strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; -*************** -*** 2955,2961 **** - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (strcmp (node_a->str, node_b->str)) - return 0; - } - ---- 2963,2969 ---- - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (safe_strcmp (node_a->str, node_b->str)) - return 0; - } - -*************** -*** 3182,3189 **** - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } ---- 3190,3197 ---- - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (safe_strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } -*************** -*** 3832,3838 **** - return 0; - - for (node = list; node; node = node->next) -! if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; ---- 3840,3846 ---- - return 0; - - for (node = list; node; node = node->next) -! if (safe_strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp-parse.y MesaLib/src/glsl/glcpp/glcpp-parse.y -*** Mesa-7.9/src/glsl/glcpp/glcpp-parse.y Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp-parse.y Fri Oct 22 15:30:47 2010 -*************** -*** 26,36 **** ---- 26,44 ---- - #include - #include - #include -+ /* The #include of inttypes.h causes problems on Windows */ -+ #ifndef _MSC_VER - #include -+ #endif -+ /* Windows headers do not define PRIiMAX */ -+ #ifdef _MSC_VER -+ #define PRIiMAX "I64i" -+ #endif - - #include "glcpp.h" - #include "main/core.h" /* for struct gl_extensions */ - #include "main/mtypes.h" /* for gl_api enum */ -+ #include "safe_strcmp.h" - - #define glcpp_print(stream, str) stream = talloc_strdup_append(stream, str) - #define glcpp_printf(stream, fmt, args, ...) \ -*************** -*** 590,596 **** - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; ---- 598,604 ---- - return 0; - - for (i = 0, node = list->head; node; i++, node = node->next) { -! if (safe_strcmp (node->str, member) == 0) { - if (index) - *index = i; - return 1; -*************** -*** 630,636 **** - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (strcmp (node_a->str, node_b->str)) - return 0; - } - ---- 638,644 ---- - node_a && node_b; - node_a = node_a->next, node_b = node_b->next) - { -! if (safe_strcmp (node_a->str, node_b->str)) - return 0; - } - -*************** -*** 857,864 **** - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } ---- 865,872 ---- - case IDENTIFIER: - case INTEGER_STRING: - case OTHER: -! if (safe_strcmp (node_a->token->value.str, -! node_b->token->value.str)) - { - return 0; - } -*************** -*** 1507,1513 **** - return 0; - - for (node = list; node; node = node->next) -! if (strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; ---- 1515,1521 ---- - return 0; - - for (node = list; node; node = node->next) -! if (safe_strcmp (node->identifier, identifier) == 0) - return 1; - - return 0; -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp.c MesaLib/src/glsl/glcpp/glcpp.c -*** Mesa-7.9/src/glsl/glcpp/glcpp.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp.c Fri Oct 22 15:31:25 2010 -*************** -*** 29,34 **** ---- 29,35 ---- - #include - #include "glcpp.h" - #include "main/mtypes.h" -+ #include "safe_strcmp.h" - - extern int yydebug; - -*************** -*** 78,84 **** - char *text; - int fd; - -! if (filename == NULL || strcmp (filename, "-") == 0) - return load_text_fd (ctx, STDIN_FILENO); - - fd = open (filename, O_RDONLY); ---- 79,85 ---- - char *text; - int fd; - -! if (filename == NULL || safe_strcmp (filename, "-") == 0) - return load_text_fd (ctx, STDIN_FILENO); - - fd = open (filename, O_RDONLY); -diff -c -r Mesa-7.9/src/glsl/glcpp/glcpp.h MesaLib/src/glsl/glcpp/glcpp.h -*** Mesa-7.9/src/glsl/glcpp/glcpp.h Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glcpp/glcpp.h Fri Oct 22 15:32:43 2010 -*************** -*** 24,30 **** ---- 24,33 ---- - #ifndef GLCPP_H - #define GLCPP_H - -+ /* Windows does not currently have stdint.h. */ -+ #ifndef _MSC_VER - #include -+ #endif - - #include - -*************** -*** 49,55 **** ---- 52,62 ---- - - typedef union YYSTYPE - { -+ #ifndef _MSC_VER - intmax_t ival; -+ #else -+ __int64 ival; -+ #endif - char *str; - string_list_t *string_list; - token_t *token; -diff -c -r Mesa-7.9/src/glsl/glsl_parser.cpp MesaLib/src/glsl/glsl_parser.cpp -*** Mesa-7.9/src/glsl/glsl_parser.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_parser.cpp Fri Oct 22 15:33:24 2010 -*************** -*** 107,112 **** ---- 107,113 ---- - #include "ast.h" - #include "glsl_parser_extras.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - #define YYLEX_PARAM state->scanner - -*************** -*** 3966,3975 **** - if (state->ARB_fragment_coord_conventions_enable) { - bool got_one = false; - -! if (strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).q.origin_upper_left = 1; -! } else if (strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).q.pixel_center_integer = 1; - } ---- 3967,3976 ---- - if (state->ARB_fragment_coord_conventions_enable) { - bool got_one = false; - -! if (safe_strcmp((yyvsp[(1) - (1)].identifier), "origin_upper_left") == 0) { - got_one = true; - (yyval.type_qualifier).q.origin_upper_left = 1; -! } else if (safe_strcmp((yyvsp[(1) - (1)].identifier), "pixel_center_integer") == 0) { - got_one = true; - (yyval.type_qualifier).q.pixel_center_integer = 1; - } -diff -c -r Mesa-7.9/src/glsl/glsl_parser_extras.cpp MesaLib/src/glsl/glsl_parser_extras.cpp -*** Mesa-7.9/src/glsl/glsl_parser_extras.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_parser_extras.cpp Fri Oct 22 15:33:37 2010 -*************** -*** 35,40 **** ---- 35,41 ---- - #include "glsl_parser.h" - #include "ir_optimization.h" - #include "loop_analysis.h" -+ #include "safe_strcmp.h" - - _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct __GLcontextRec *ctx, - GLenum target, void *mem_ctx) -*************** -*** 148,160 **** - extension_warn - } ext_mode; - -! if (strcmp(behavior, "warn") == 0) { - ext_mode = extension_warn; -! } else if (strcmp(behavior, "require") == 0) { - ext_mode = extension_require; -! } else if (strcmp(behavior, "enable") == 0) { - ext_mode = extension_enable; -! } else if (strcmp(behavior, "disable") == 0) { - ext_mode = extension_disable; - } else { - _mesa_glsl_error(behavior_locp, state, ---- 149,161 ---- - extension_warn - } ext_mode; - -! if (safe_strcmp(behavior, "warn") == 0) { - ext_mode = extension_warn; -! } else if (safe_strcmp(behavior, "require") == 0) { - ext_mode = extension_require; -! } else if (safe_strcmp(behavior, "enable") == 0) { - ext_mode = extension_enable; -! } else if (safe_strcmp(behavior, "disable") == 0) { - ext_mode = extension_disable; - } else { - _mesa_glsl_error(behavior_locp, state, -*************** -*** 165,178 **** - - bool unsupported = false; - -! if (strcmp(name, "all") == 0) { - if ((ext_mode == extension_enable) || (ext_mode == extension_require)) { - _mesa_glsl_error(name_locp, state, "Cannot %s all extensions", - (ext_mode == extension_enable) - ? "enable" : "require"); - return false; - } -! } else if (strcmp(name, "GL_ARB_draw_buffers") == 0) { - /* This extension is only supported in fragment shaders. - */ - if (state->target != fragment_shader) { ---- 166,179 ---- - - bool unsupported = false; - -! if (safe_strcmp(name, "all") == 0) { - if ((ext_mode == extension_enable) || (ext_mode == extension_require)) { - _mesa_glsl_error(name_locp, state, "Cannot %s all extensions", - (ext_mode == extension_enable) - ? "enable" : "require"); - return false; - } -! } else if (safe_strcmp(name, "GL_ARB_draw_buffers") == 0) { - /* This extension is only supported in fragment shaders. - */ - if (state->target != fragment_shader) { -*************** -*** 181,197 **** - state->ARB_draw_buffers_enable = (ext_mode != extension_disable); - state->ARB_draw_buffers_warn = (ext_mode == extension_warn); - } -! } else if (strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) { - state->ARB_fragment_coord_conventions_enable = - (ext_mode != extension_disable); - state->ARB_fragment_coord_conventions_warn = - (ext_mode == extension_warn); - - unsupported = !state->extensions->ARB_fragment_coord_conventions; -! } else if (strcmp(name, "GL_ARB_texture_rectangle") == 0) { - state->ARB_texture_rectangle_enable = (ext_mode != extension_disable); - state->ARB_texture_rectangle_warn = (ext_mode == extension_warn); -! } else if (strcmp(name, "GL_EXT_texture_array") == 0) { - state->EXT_texture_array_enable = (ext_mode != extension_disable); - state->EXT_texture_array_warn = (ext_mode == extension_warn); - ---- 182,198 ---- - state->ARB_draw_buffers_enable = (ext_mode != extension_disable); - state->ARB_draw_buffers_warn = (ext_mode == extension_warn); - } -! } else if (safe_strcmp(name, "GL_ARB_fragment_coord_conventions") == 0) { - state->ARB_fragment_coord_conventions_enable = - (ext_mode != extension_disable); - state->ARB_fragment_coord_conventions_warn = - (ext_mode == extension_warn); - - unsupported = !state->extensions->ARB_fragment_coord_conventions; -! } else if (safe_strcmp(name, "GL_ARB_texture_rectangle") == 0) { - state->ARB_texture_rectangle_enable = (ext_mode != extension_disable); - state->ARB_texture_rectangle_warn = (ext_mode == extension_warn); -! } else if (safe_strcmp(name, "GL_EXT_texture_array") == 0) { - state->EXT_texture_array_enable = (ext_mode != extension_disable); - state->EXT_texture_array_warn = (ext_mode == extension_warn); - -diff -c -r Mesa-7.9/src/glsl/glsl_types.cpp MesaLib/src/glsl/glsl_types.cpp -*** Mesa-7.9/src/glsl/glsl_types.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/glsl_types.cpp Fri Oct 22 15:33:51 2010 -*************** -*** 27,32 **** ---- 27,33 ---- - #include "glsl_symbol_table.h" - #include "glsl_parser_extras.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - #include "builtin_types.h" - extern "C" { - #include "program/hash_table.h" -*************** -*** 374,380 **** - /* Return zero is the types match (there is zero difference) or non-zero - * otherwise. - */ -! if (strcmp(key1->name, key2->name) != 0) - return 1; - - if (key1->length != key2->length) ---- 375,381 ---- - /* Return zero is the types match (there is zero difference) or non-zero - * otherwise. - */ -! if (safe_strcmp(key1->name, key2->name) != 0) - return 1; - - if (key1->length != key2->length) -*************** -*** 383,389 **** - for (unsigned i = 0; i < key1->length; i++) { - if (key1->fields.structure[i].type != key2->fields.structure[i].type) - return 1; -! if (strcmp(key1->fields.structure[i].name, - key2->fields.structure[i].name) != 0) - return 1; - } ---- 384,390 ---- - for (unsigned i = 0; i < key1->length; i++) { - if (key1->fields.structure[i].type != key2->fields.structure[i].type) - return 1; -! if (safe_strcmp(key1->fields.structure[i].name, - key2->fields.structure[i].name) != 0) - return 1; - } -*************** -*** 433,439 **** - - assert(t->base_type == GLSL_TYPE_STRUCT); - assert(t->length == num_fields); -! assert(strcmp(t->name, name) == 0); - - return t; - } ---- 434,440 ---- - - assert(t->base_type == GLSL_TYPE_STRUCT); - assert(t->length == num_fields); -! assert(safe_strcmp(t->name, name) == 0); - - return t; - } -*************** -*** 446,452 **** - return error_type; - - for (unsigned i = 0; i < this->length; i++) { -! if (strcmp(name, this->fields.structure[i].name) == 0) - return this->fields.structure[i].type; - } - ---- 447,453 ---- - return error_type; - - for (unsigned i = 0; i < this->length; i++) { -! if (safe_strcmp(name, this->fields.structure[i].name) == 0) - return this->fields.structure[i].type; - } - -*************** -*** 461,467 **** - return -1; - - for (unsigned i = 0; i < this->length; i++) { -! if (strcmp(name, this->fields.structure[i].name) == 0) - return i; - } - ---- 462,468 ---- - return -1; - - for (unsigned i = 0; i < this->length; i++) { -! if (safe_strcmp(name, this->fields.structure[i].name) == 0) - return i; - } - -diff -c -r Mesa-7.9/src/glsl/hir_field_selection.cpp MesaLib/src/glsl/hir_field_selection.cpp -*** Mesa-7.9/src/glsl/hir_field_selection.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/hir_field_selection.cpp Fri Oct 22 15:34:11 2010 -*************** -*** 26,31 **** ---- 26,32 ---- - #include "glsl_parser_extras.h" - #include "ast.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - ir_rvalue * - _mesa_ast_field_selection_to_hir(const ast_expression *expr, -*************** -*** 81,87 **** - const char *method; - method = call->subexpressions[0]->primary_expression.identifier; - -! if (op->type->is_array() && strcmp(method, "length") == 0) { - if (!call->expressions.is_empty()) - _mesa_glsl_error(&loc, state, "length method takes no arguments."); - ---- 82,88 ---- - const char *method; - method = call->subexpressions[0]->primary_expression.identifier; - -! if (op->type->is_array() && safe_strcmp(method, "length") == 0) { - if (!call->expressions.is_empty()) - _mesa_glsl_error(&loc, state, "length method takes no arguments."); - -diff -c -r Mesa-7.9/src/glsl/ir.cpp MesaLib/src/glsl/ir.cpp -*** Mesa-7.9/src/glsl/ir.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir.cpp Fri Oct 22 15:34:20 2010 -*************** -*** 25,30 **** ---- 25,31 ---- - #include "ir.h" - #include "ir_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - ir_rvalue::ir_rvalue() - { -*************** -*** 338,344 **** - { - const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]); - for (int op = 0; op < operator_count; op++) { -! if (strcmp(str, operator_strs[op]) == 0) - return (ir_expression_operation) op; - } - return (ir_expression_operation) -1; ---- 339,345 ---- - { - const int operator_count = sizeof(operator_strs) / sizeof(operator_strs[0]); - for (int op = 0; op < operator_count; op++) { -! if (safe_strcmp(str, operator_strs[op]) == 0) - return (ir_expression_operation) op; - } - return (ir_expression_operation) -1; -*************** -*** 878,884 **** - { - const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]); - for (int op = 0; op < count; op++) { -! if (strcmp(str, tex_opcode_strs[op]) == 0) - return (ir_texture_opcode) op; - } - return (ir_texture_opcode) -1; ---- 879,885 ---- - { - const int count = sizeof(tex_opcode_strs) / sizeof(tex_opcode_strs[0]); - for (int op = 0; op < count; op++) { -! if (safe_strcmp(str, tex_opcode_strs[op]) == 0) - return (ir_texture_opcode) op; - } - return (ir_texture_opcode) -1; -diff -c -r Mesa-7.9/src/glsl/ir_constant_expression.cpp MesaLib/src/glsl/ir_constant_expression.cpp -*** Mesa-7.9/src/glsl/ir_constant_expression.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_constant_expression.cpp Fri Oct 22 15:34:40 2010 -*************** -*** 38,43 **** ---- 38,44 ---- - #include "ir.h" - #include "ir_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - static float - dot(ir_constant *op0, ir_constant *op1) -*************** -*** 850,880 **** - memset(&data, 0, sizeof(data)); - - const char *callee = this->callee_name(); -! if (strcmp(callee, "abs") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL); -! } else if (strcmp(callee, "all") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (!op[0]->value.b[c]) - return new(mem_ctx) ir_constant(false); - } - return new(mem_ctx) ir_constant(true); -! } else if (strcmp(callee, "any") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - return new(mem_ctx) ir_constant(true); - } - return new(mem_ctx) ir_constant(false); -! } else if (strcmp(callee, "acos") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acosf(op[0]->value.f[c]); -! } else if (strcmp(callee, "asin") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinf(op[0]->value.f[c]); -! } else if (strcmp(callee, "atan") == 0) { - assert(op[0]->type->is_float()); - if (num_parameters == 2) { - assert(op[1]->type->is_float()); ---- 851,881 ---- - memset(&data, 0, sizeof(data)); - - const char *callee = this->callee_name(); -! if (safe_strcmp(callee, "abs") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_abs, type, op[0], NULL); -! } else if (safe_strcmp(callee, "all") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (!op[0]->value.b[c]) - return new(mem_ctx) ir_constant(false); - } - return new(mem_ctx) ir_constant(true); -! } else if (safe_strcmp(callee, "any") == 0) { - assert(op[0]->type->is_boolean()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - if (op[0]->value.b[c]) - return new(mem_ctx) ir_constant(true); - } - return new(mem_ctx) ir_constant(false); -! } else if (safe_strcmp(callee, "acos") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = acosf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "asin") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = asinf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "atan") == 0) { - assert(op[0]->type->is_float()); - if (num_parameters == 2) { - assert(op[1]->type->is_float()); -*************** -*** 884,894 **** - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanf(op[0]->value.f[c]); - } -! } else if (strcmp(callee, "dFdx") == 0 || strcmp(callee, "dFdy") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (strcmp(callee, "ceil") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL); -! } else if (strcmp(callee, "clamp") == 0) { - assert(num_parameters == 3); - unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1; - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; ---- 885,895 ---- - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = atanf(op[0]->value.f[c]); - } -! } else if (safe_strcmp(callee, "dFdx") == 0 || safe_strcmp(callee, "dFdy") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (safe_strcmp(callee, "ceil") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_ceil, type, op[0], NULL); -! } else if (safe_strcmp(callee, "clamp") == 0) { - assert(num_parameters == 3); - unsigned c1_inc = op[1]->type->is_scalar() ? 0 : 1; - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; -*************** -*** 913,931 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "cos") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL); -! } else if (strcmp(callee, "cosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = coshf(op[0]->value.f[c]); -! } else if (strcmp(callee, "cross") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_cross, type, op[0], op[1]); -! } else if (strcmp(callee, "degrees") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = 180.0/M_PI * op[0]->value.f[c]; -! } else if (strcmp(callee, "distance") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - float length_squared = 0.0; - for (unsigned c = 0; c < op[0]->type->components(); c++) { ---- 914,932 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "cos") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_cos, type, op[0], NULL); -! } else if (safe_strcmp(callee, "cosh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = coshf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "cross") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_cross, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "degrees") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = 180.0/M_PI * op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "distance") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - float length_squared = 0.0; - for (unsigned c = 0; c < op[0]->type->components(); c++) { -*************** -*** 933,941 **** - length_squared += t * t; - } - return new(mem_ctx) ir_constant(sqrtf(length_squared)); -! } else if (strcmp(callee, "dot") == 0) { - return new(mem_ctx) ir_constant(dot(op[0], op[1])); -! } else if (strcmp(callee, "equal") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 934,942 ---- - length_squared += t * t; - } - return new(mem_ctx) ir_constant(sqrtf(length_squared)); -! } else if (safe_strcmp(callee, "dot") == 0) { - return new(mem_ctx) ir_constant(dot(op[0], op[1])); -! } else if (safe_strcmp(callee, "equal") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 955,976 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "exp") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL); -! } else if (strcmp(callee, "exp2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL); -! } else if (strcmp(callee, "faceforward") == 0) { - if (dot(op[2], op[1]) < 0) - return op[0]; - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = -op[0]->value.f[c]; -! } else if (strcmp(callee, "floor") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL); -! } else if (strcmp(callee, "fract") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL); -! } else if (strcmp(callee, "fwidth") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (strcmp(callee, "greaterThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 956,977 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "exp") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp, type, op[0], NULL); -! } else if (safe_strcmp(callee, "exp2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_exp2, type, op[0], NULL); -! } else if (safe_strcmp(callee, "faceforward") == 0) { - if (dot(op[2], op[1]) < 0) - return op[0]; - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = -op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "floor") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_floor, type, op[0], NULL); -! } else if (safe_strcmp(callee, "fract") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_fract, type, op[0], NULL); -! } else if (safe_strcmp(callee, "fwidth") == 0) { - return ir_constant::zero(mem_ctx, this->type); -! } else if (safe_strcmp(callee, "greaterThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 987,993 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "greaterThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 988,994 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "greaterThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1004,1014 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "inversesqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL); -! } else if (strcmp(callee, "length") == 0) { - return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0]))); -! } else if (strcmp(callee, "lessThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1005,1015 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "inversesqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_rsq, type, op[0], NULL); -! } else if (safe_strcmp(callee, "length") == 0) { - return new(mem_ctx) ir_constant(sqrtf(dot(op[0], op[0]))); -! } else if (safe_strcmp(callee, "lessThan") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1025,1031 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "lessThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1026,1032 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "lessThanEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1042,1060 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "log") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL); -! } else if (strcmp(callee, "log2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL); -! } else if (strcmp(callee, "matrixCompMult") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] * op[1]->value.f[c]; -! } else if (strcmp(callee, "max") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]); -! } else if (strcmp(callee, "min") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]); -! } else if (strcmp(callee, "mix") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - if (op[2]->type->is_float()) { - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; ---- 1043,1061 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "log") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log, type, op[0], NULL); -! } else if (safe_strcmp(callee, "log2") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_log2, type, op[0], NULL); -! } else if (safe_strcmp(callee, "matrixCompMult") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] * op[1]->value.f[c]; -! } else if (safe_strcmp(callee, "max") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_max, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "min") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_min, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "mix") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - if (op[2]->type->is_float()) { - unsigned c2_inc = op[2]->type->is_scalar() ? 0 : 1; -*************** -*** 1068,1076 **** - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c]; - } -! } else if (strcmp(callee, "mod") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]); -! } else if (strcmp(callee, "normalize") == 0) { - assert(op[0]->type->is_float()); - float length = sqrtf(dot(op[0], op[0])); - ---- 1069,1077 ---- - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[op[2]->value.b[c] ? 1 : 0]->value.f[c]; - } -! } else if (safe_strcmp(callee, "mod") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_mod, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "normalize") == 0) { - assert(op[0]->type->is_float()); - float length = sqrtf(dot(op[0], op[0])); - -*************** -*** 1079,1087 **** - - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] / length; -! } else if (strcmp(callee, "not") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL); -! } else if (strcmp(callee, "notEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { ---- 1080,1088 ---- - - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] / length; -! } else if (safe_strcmp(callee, "not") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_logic_not, type, op[0], NULL); -! } else if (safe_strcmp(callee, "notEqual") == 0) { - assert(op[0]->type->is_vector() && op[1] && op[1]->type->is_vector()); - for (unsigned c = 0; c < op[0]->type->components(); c++) { - switch (op[0]->type->base_type) { -*************** -*** 1101,1107 **** - assert(!"Should not get here."); - } - } -! } else if (strcmp(callee, "outerProduct") == 0) { - assert(op[0]->type->is_vector() && op[1]->type->is_vector()); - const unsigned m = op[0]->type->vector_elements; - const unsigned n = op[1]->type->vector_elements; ---- 1102,1108 ---- - assert(!"Should not get here."); - } - } -! } else if (safe_strcmp(callee, "outerProduct") == 0) { - assert(op[0]->type->is_vector() && op[1]->type->is_vector()); - const unsigned m = op[0]->type->vector_elements; - const unsigned n = op[1]->type->vector_elements; -*************** -*** 1110,1127 **** - data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j]; - } - } -! } else if (strcmp(callee, "pow") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]); -! } else if (strcmp(callee, "radians") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = M_PI/180.0 * op[0]->value.f[c]; -! } else if (strcmp(callee, "reflect") == 0) { - assert(op[0]->type->is_float()); - float dot_NI = dot(op[1], op[0]); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c]; -! } else if (strcmp(callee, "refract") == 0) { - const float eta = op[2]->value.f[0]; - const float dot_NI = dot(op[1], op[0]); - const float k = 1.0 - eta * eta * (1.0 - dot_NI * dot_NI); ---- 1111,1128 ---- - data.f[i+m*j] = op[0]->value.f[i] * op[1]->value.f[j]; - } - } -! } else if (safe_strcmp(callee, "pow") == 0) { - expr = new(mem_ctx) ir_expression(ir_binop_pow, type, op[0], op[1]); -! } else if (safe_strcmp(callee, "radians") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = M_PI/180.0 * op[0]->value.f[c]; -! } else if (safe_strcmp(callee, "reflect") == 0) { - assert(op[0]->type->is_float()); - float dot_NI = dot(op[1], op[0]); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = op[0]->value.f[c] - 2 * dot_NI * op[1]->value.f[c]; -! } else if (safe_strcmp(callee, "refract") == 0) { - const float eta = op[2]->value.f[0]; - const float dot_NI = dot(op[1], op[0]); - const float k = 1.0 - eta * eta * (1.0 - dot_NI * dot_NI); -*************** -*** 1133,1147 **** - * op[1]->value.f[c]; - } - } -! } else if (strcmp(callee, "sign") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL); -! } else if (strcmp(callee, "sin") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL); -! } else if (strcmp(callee, "sinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = sinhf(op[0]->value.f[c]); -! } else if (strcmp(callee, "smoothstep") == 0) { - assert(num_parameters == 3); - assert(op[1]->type == op[0]->type); - unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1; ---- 1134,1148 ---- - * op[1]->value.f[c]; - } - } -! } else if (safe_strcmp(callee, "sign") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sign, type, op[0], NULL); -! } else if (safe_strcmp(callee, "sin") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sin, type, op[0], NULL); -! } else if (safe_strcmp(callee, "sinh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = sinhf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "smoothstep") == 0) { - assert(num_parameters == 3); - assert(op[1]->type == op[0]->type); - unsigned edge_inc = op[0]->type->is_scalar() ? 0 : 1; -*************** -*** 1157,1179 **** - data.f[c] = t * t * (3 - 2 * t); - } - } -! } else if (strcmp(callee, "sqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL); -! } else if (strcmp(callee, "step") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - /* op[0] (edge) may be either a scalar or a vector */ - const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++) - data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0 : 1.0; -! } else if (strcmp(callee, "tan") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanf(op[0]->value.f[c]); -! } else if (strcmp(callee, "tanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanhf(op[0]->value.f[c]); -! } else if (strcmp(callee, "transpose") == 0) { - assert(op[0]->type->is_matrix()); - const unsigned n = op[0]->type->vector_elements; - const unsigned m = op[0]->type->matrix_columns; ---- 1158,1180 ---- - data.f[c] = t * t * (3 - 2 * t); - } - } -! } else if (safe_strcmp(callee, "sqrt") == 0) { - expr = new(mem_ctx) ir_expression(ir_unop_sqrt, type, op[0], NULL); -! } else if (safe_strcmp(callee, "step") == 0) { - assert(op[0]->type->is_float() && op[1]->type->is_float()); - /* op[0] (edge) may be either a scalar or a vector */ - const unsigned c0_inc = op[0]->type->is_scalar() ? 0 : 1; - for (unsigned c = 0, c0 = 0; c < type->components(); c0 += c0_inc, c++) - data.f[c] = (op[1]->value.f[c] < op[0]->value.f[c0]) ? 0.0 : 1.0; -! } else if (safe_strcmp(callee, "tan") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "tanh") == 0) { - assert(op[0]->type->is_float()); - for (unsigned c = 0; c < op[0]->type->components(); c++) - data.f[c] = tanhf(op[0]->value.f[c]); -! } else if (safe_strcmp(callee, "transpose") == 0) { - assert(op[0]->type->is_matrix()); - const unsigned n = op[0]->type->vector_elements; - const unsigned m = op[0]->type->matrix_columns; -diff -c -r Mesa-7.9/src/glsl/ir_dead_functions.cpp MesaLib/src/glsl/ir_dead_functions.cpp -*** Mesa-7.9/src/glsl/ir_dead_functions.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_dead_functions.cpp Fri Oct 22 15:34:54 2010 -*************** -*** 31,36 **** ---- 31,37 ---- - #include "ir_visitor.h" - #include "ir_expression_flattening.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - class signature_entry : public exec_node - { -*************** -*** 90,96 **** - { - signature_entry *entry = this->get_signature_entry(ir); - -! if (strcmp(ir->function_name(), "main") == 0) { - entry->used = true; - } - ---- 91,97 ---- - { - signature_entry *entry = this->get_signature_entry(ir); - -! if (safe_strcmp(ir->function_name(), "main") == 0) { - entry->used = true; - } - -diff -c -r Mesa-7.9/src/glsl/ir_function_inlining.cpp MesaLib/src/glsl/ir_function_inlining.cpp -*** Mesa-7.9/src/glsl/ir_function_inlining.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_function_inlining.cpp Fri Oct 22 15:35:58 2010 -*************** -*** 27,33 **** - * Replaces calls to functions with the body of the function. - */ - -! #include - #include "ir.h" - #include "ir_visitor.h" - #include "ir_function_inlining.h" ---- 27,34 ---- - * Replaces calls to functions with the body of the function. - */ - -! /* The use of inttypes.h seems to be unnecessary and causes problems on Windows. */ -! /* #include */ - #include "ir.h" - #include "ir_visitor.h" - #include "ir_function_inlining.h" -diff -c -r Mesa-7.9/src/glsl/ir_lower_jumps.cpp MesaLib/src/glsl/ir_lower_jumps.cpp -*** Mesa-7.9/src/glsl/ir_lower_jumps.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_lower_jumps.cpp Fri Oct 22 15:36:16 2010 -*************** -*** 28,33 **** ---- 28,34 ---- - #include "glsl_types.h" - #include - #include "ir.h" -+ #include "safe_strcmp.h" - - enum jump_strength - { -*************** -*** 125,131 **** - this->return_flag = 0; - this->return_value = 0; - this->nesting_depth = 0; -! this->is_main = this->signature && (strcmp(this->signature->function_name(), "main") == 0); - } - - ir_variable* get_return_flag() ---- 126,132 ---- - this->return_flag = 0; - this->return_value = 0; - this->nesting_depth = 0; -! this->is_main = this->signature && (safe_strcmp(this->signature->function_name(), "main") == 0); - } - - ir_variable* get_return_flag() -diff -c -r Mesa-7.9/src/glsl/ir_reader.cpp MesaLib/src/glsl/ir_reader.cpp -*** Mesa-7.9/src/glsl/ir_reader.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_reader.cpp Fri Oct 22 15:36:27 2010 -*************** -*** 31,36 **** ---- 31,37 ---- - #include "glsl_parser_extras.h" - #include "glsl_types.h" - #include "s_expression.h" -+ #include "safe_strcmp.h" - - const static bool debug = false; - -*************** -*** 128,134 **** - ir_read_error(st, expr, "expected type (array ...) or (struct ...)"); - return NULL; - } -! if (strcmp(type_sym->value(), "array") == 0) { - if (list->length() != 3) { - ir_read_error(st, expr, "expected type (array )"); - return NULL; ---- 129,135 ---- - ir_read_error(st, expr, "expected type (array ...) or (struct ...)"); - return NULL; - } -! if (safe_strcmp(type_sym->value(), "array") == 0) { - if (list->length() != 3) { - ir_read_error(st, expr, "expected type (array )"); - return NULL; -*************** -*** 150,156 **** - } - - return glsl_type::get_array_instance(base_type, size->value()); -! } else if (strcmp(type_sym->value(), "struct") == 0) { - assert(false); // FINISHME - } else { - ir_read_error(st, expr, "expected (array ...) or (struct ...); " ---- 151,157 ---- - } - - return glsl_type::get_array_instance(base_type, size->value()); -! } else if (safe_strcmp(type_sym->value(), "struct") == 0) { - assert(false); // FINISHME - } else { - ir_read_error(st, expr, "expected (array ...) or (struct ...); " -*************** -*** 189,195 **** - continue; // not a (function ...); ignore it. - - s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); -! if (tag == NULL || strcmp(tag->value(), "function") != 0) - continue; // not a (function ...); ignore it. - - ir_function *f = read_function(st, sub, true); ---- 190,196 ---- - continue; // not a (function ...); ignore it. - - s_symbol *tag = SX_AS_SYMBOL(sub->subexpressions.get_head()); -! if (tag == NULL || safe_strcmp(tag->value(), "function") != 0) - continue; // not a (function ...); ignore it. - - ir_function *f = read_function(st, sub, true); -*************** -*** 233,239 **** - } - - s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head()); -! if (tag == NULL || strcmp(tag->value(), "signature") != 0) { - ir_read_error(st, siglist, "Expected (signature ...)"); - return NULL; - } ---- 234,240 ---- - } - - s_symbol *tag = SX_AS_SYMBOL(siglist->subexpressions.get_head()); -! if (tag == NULL || safe_strcmp(tag->value(), "signature") != 0) { - ir_read_error(st, siglist, "Expected (signature ...)"); - return NULL; - } -*************** -*** 267,273 **** - return; - } - s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head()); -! if (paramtag == NULL || strcmp(paramtag->value(), "parameters") != 0) { - ir_read_error(st, paramlist, "Expected (parameters ...)"); - return; - } ---- 268,274 ---- - return; - } - s_symbol *paramtag = SX_AS_SYMBOL(paramlist->subexpressions.get_head()); -! if (paramtag == NULL || safe_strcmp(paramtag->value(), "parameters") != 0) { - ir_read_error(st, paramlist, "Expected (parameters ...)"); - return; - } -*************** -*** 364,372 **** - void *ctx = st; - s_symbol *symbol = SX_AS_SYMBOL(expr); - if (symbol != NULL) { -! if (strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_break); -! if (strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue); - } - ---- 365,373 ---- - void *ctx = st; - s_symbol *symbol = SX_AS_SYMBOL(expr); - if (symbol != NULL) { -! if (safe_strcmp(symbol->value(), "break") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_break); -! if (safe_strcmp(symbol->value(), "continue") == 0 && loop_ctx != NULL) - return new(ctx) ir_loop_jump(ir_loop_jump::jump_continue); - } - -*************** -*** 383,399 **** - } - - ir_instruction *inst = NULL; -! if (strcmp(tag->value(), "declare") == 0) { - inst = read_declaration(st, list); -! } else if (strcmp(tag->value(), "assign") == 0) { - inst = read_assignment(st, list); -! } else if (strcmp(tag->value(), "if") == 0) { - inst = read_if(st, list, loop_ctx); -! } else if (strcmp(tag->value(), "loop") == 0) { - inst = read_loop(st, list); -! } else if (strcmp(tag->value(), "return") == 0) { - inst = read_return(st, list); -! } else if (strcmp(tag->value(), "function") == 0) { - inst = read_function(st, list, false); - } else { - inst = read_rvalue(st, list); ---- 384,400 ---- - } - - ir_instruction *inst = NULL; -! if (safe_strcmp(tag->value(), "declare") == 0) { - inst = read_declaration(st, list); -! } else if (safe_strcmp(tag->value(), "assign") == 0) { - inst = read_assignment(st, list); -! } else if (safe_strcmp(tag->value(), "if") == 0) { - inst = read_if(st, list, loop_ctx); -! } else if (safe_strcmp(tag->value(), "loop") == 0) { - inst = read_loop(st, list); -! } else if (safe_strcmp(tag->value(), "return") == 0) { - inst = read_return(st, list); -! } else if (safe_strcmp(tag->value(), "function") == 0) { - inst = read_function(st, list, false); - } else { - inst = read_rvalue(st, list); -*************** -*** 443,467 **** - } - - // FINISHME: Check for duplicate/conflicting qualifiers. -! if (strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; -! } else if (strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; -! } else if (strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; -! } else if (strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; -! } else if (strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_in; -! } else if (strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_out; -! } else if (strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_inout; -! } else if (strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = ir_var_smooth; -! } else if (strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = ir_var_flat; -! } else if (strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = ir_var_noperspective; - } else { - ir_read_error(st, list, "unknown qualifier: %s", qualifier->value()); ---- 444,468 ---- - } - - // FINISHME: Check for duplicate/conflicting qualifiers. -! if (safe_strcmp(qualifier->value(), "centroid") == 0) { - var->centroid = 1; -! } else if (safe_strcmp(qualifier->value(), "invariant") == 0) { - var->invariant = 1; -! } else if (safe_strcmp(qualifier->value(), "uniform") == 0) { - var->mode = ir_var_uniform; -! } else if (safe_strcmp(qualifier->value(), "auto") == 0) { - var->mode = ir_var_auto; -! } else if (safe_strcmp(qualifier->value(), "in") == 0) { - var->mode = ir_var_in; -! } else if (safe_strcmp(qualifier->value(), "out") == 0) { - var->mode = ir_var_out; -! } else if (safe_strcmp(qualifier->value(), "inout") == 0) { - var->mode = ir_var_inout; -! } else if (safe_strcmp(qualifier->value(), "smooth") == 0) { - var->interpolation = ir_var_smooth; -! } else if (safe_strcmp(qualifier->value(), "flat") == 0) { - var->interpolation = ir_var_flat; -! } else if (safe_strcmp(qualifier->value(), "noperspective") == 0) { - var->interpolation = ir_var_noperspective; - } else { - ir_read_error(st, list, "unknown qualifier: %s", qualifier->value()); -*************** -*** 574,586 **** - ir_rvalue *rvalue = read_dereference(st, list); - if (rvalue != NULL || st->error) - return rvalue; -! else if (strcmp(tag->value(), "swiz") == 0) { - rvalue = read_swizzle(st, list); -! } else if (strcmp(tag->value(), "expression") == 0) { - rvalue = read_expression(st, list); -! } else if (strcmp(tag->value(), "call") == 0) { - rvalue = read_call(st, list); -! } else if (strcmp(tag->value(), "constant") == 0) { - rvalue = read_constant(st, list); - } else { - rvalue = read_texture(st, list); ---- 575,587 ---- - ir_rvalue *rvalue = read_dereference(st, list); - if (rvalue != NULL || st->error) - return rvalue; -! else if (safe_strcmp(tag->value(), "swiz") == 0) { - rvalue = read_swizzle(st, list); -! } else if (safe_strcmp(tag->value(), "expression") == 0) { - rvalue = read_expression(st, list); -! } else if (safe_strcmp(tag->value(), "call") == 0) { - rvalue = read_call(st, list); -! } else if (safe_strcmp(tag->value(), "constant") == 0) { - rvalue = read_constant(st, list); - } else { - rvalue = read_texture(st, list); -*************** -*** 921,931 **** - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head); - assert(tag != NULL); - -! if (strcmp(tag->value(), "var_ref") == 0) - return read_var_ref(st, list); -! if (strcmp(tag->value(), "array_ref") == 0) - return read_array_ref(st, list); -! if (strcmp(tag->value(), "record_ref") == 0) - return read_record_ref(st, list); - return NULL; - } ---- 922,932 ---- - s_symbol *tag = SX_AS_SYMBOL(list->subexpressions.head); - assert(tag != NULL); - -! if (safe_strcmp(tag->value(), "var_ref") == 0) - return read_var_ref(st, list); -! if (safe_strcmp(tag->value(), "array_ref") == 0) - return read_array_ref(st, list); -! if (safe_strcmp(tag->value(), "record_ref") == 0) - return read_record_ref(st, list); - return NULL; - } -diff -c -r Mesa-7.9/src/glsl/ir_structure_splitting.cpp MesaLib/src/glsl/ir_structure_splitting.cpp -*** Mesa-7.9/src/glsl/ir_structure_splitting.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/ir_structure_splitting.cpp Fri Oct 22 15:36:52 2010 -*************** -*** 37,42 **** ---- 37,43 ---- - #include "ir_print_visitor.h" - #include "ir_rvalue_visitor.h" - #include "glsl_types.h" -+ #include "safe_strcmp.h" - - static bool debug = false; - -*************** -*** 228,235 **** - - unsigned int i; - for (i = 0; i < entry->var->type->length; i++) { -! if (strcmp(deref_record->field, -! entry->var->type->fields.structure[i].name) == 0) - break; - } - assert(i != entry->var->type->length); ---- 229,236 ---- - - unsigned int i; - for (i = 0; i < entry->var->type->length; i++) { -! if (safe_strcmp(deref_record->field, -! entry->var->type->fields.structure[i].name) == 0) - break; - } - assert(i != entry->var->type->length); -diff -c -r Mesa-7.9/src/glsl/ir_validate.cpp MesaLib/src/glsl/ir_validate.cpp -*** Mesa-7.9/src/glsl/ir_validate.cpp Mon Oct 4 18:58:00 2010 ---- MesaLib/src/glsl/ir_validate.cpp Fri Oct 22 15:37:24 2010 -*************** -*** 33,39 **** - * a dereference chain. - */ - -! #include - #include "ir.h" - #include "ir_hierarchical_visitor.h" - #include "program/hash_table.h" ---- 33,40 ---- - * a dereference chain. - */ - -! /* The use of inttypes.h seems to be unnecessary and causes problems on Windows. */ -! /* #include */ - #include "ir.h" - #include "ir_hierarchical_visitor.h" - #include "program/hash_table.h" -diff -c -r Mesa-7.9/src/glsl/linker.cpp MesaLib/src/glsl/linker.cpp -*** Mesa-7.9/src/glsl/linker.cpp Fri Oct 1 15:51:28 2010 ---- MesaLib/src/glsl/linker.cpp Fri Oct 22 15:38:08 2010 -*************** -*** 79,84 **** ---- 79,85 ---- - #include "program/hash_table.h" - #include "linker.h" - #include "ir_optimization.h" -+ #include "safe_strcmp.h" - - /** - * Visitor that determines whether or not a variable is ever written. -*************** -*** 95,101 **** - { - ir_variable *const var = ir->lhs->variable_referenced(); - -! if (strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } ---- 96,102 ---- - { - ir_variable *const var = ir->lhs->variable_referenced(); - -! if (safe_strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } -*************** -*** 113,119 **** - if (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); -! if (var && strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } ---- 114,120 ---- - if (sig_param->mode == ir_var_out || - sig_param->mode == ir_var_inout) { - ir_variable *var = param_rval->variable_referenced(); -! if (var && safe_strcmp(name, var->name) == 0) { - found = true; - return visit_stop; - } -*************** -*** 148,154 **** - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { -! if (strcmp(this->name, ir->var->name) == 0) { - this->found = true; - return visit_stop; - } ---- 149,155 ---- - - virtual ir_visitor_status visit(ir_dereference_variable *ir) - { -! if (safe_strcmp(this->name, ir->var->name) == 0) { - this->found = true; - return visit_stop; - } -*************** -*** 876,882 **** - if (!other_var) - continue; - -! if (strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; - } ---- 877,883 ---- - if (!other_var) - continue; - -! if (safe_strcmp(var->name, other_var->name) == 0 && - other_var->max_array_access > size) { - size = other_var->max_array_access; - } -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_nop.c MesaLib/src/mapi/glapi/glapi_nop.c -*** Mesa-7.9/src/mapi/glapi/glapi_nop.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mapi/glapi/glapi_nop.c Fri Oct 22 15:41:35 2010 -*************** -*** 107,113 **** - return 0; - } - -! #define TABLE_ENTRY(name) (_glapi_proc) NoOpGeneric - - #endif - ---- 107,138 ---- - return 0; - } - -! /** -! * This is called if the user somehow calls an unassigned GL dispatch function. -! */ -! static GLint -! NoOpUnused(void) -! { -! return NoOpGeneric(); -! } -! -! /* -! * It is necessary to generate custom no-op entry points at least on -! * Windows, where the __stdcall calling convention is used (callee -! * cleans the stack). This calling convention can not tolerate a -! * mismatch between the numbers of arguments in caller and callee. -! */ -! #define KEYWORD1 static -! #define KEYWORD1_ALT static -! #define KEYWORD2 GLAPIENTRY -! #define NAME(func) NoOp##func -! #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(func, args, msg) return NoOpGeneric(); -! -! /* -! * Defines for the table of no-op entry points. -! */ -! #define TABLE_ENTRY(name) (_glapi_proc) NoOp##name - - #endif - -diff -c -r Mesa-7.9/src/mesa/main/compiler.h MesaLib/src/mesa/main/compiler.h -*** Mesa-7.9/src/mesa/main/compiler.h Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/main/compiler.h Fri Oct 22 15:44:23 2010 -*************** -*** 175,181 **** ---- 175,183 ---- - # define PUBLIC __attribute__((visibility("default"))) - # define USED __attribute__((used)) - #else -+ # ifndef PUBLIC - # define PUBLIC -+ # endif - # define USED - #endif - -diff -c -r Mesa-7.9/src/mesa/main/histogram.c MesaLib/src/mesa/main/histogram.c -*** Mesa-7.9/src/mesa/main/histogram.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/histogram.c Tue Oct 26 11:17:37 2010 -*************** -*** 32,37 **** ---- 32,40 ---- - #include "macros.h" - #include "main/dispatch.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - #if FEATURE_histogram - -diff -c -r Mesa-7.9/src/mesa/main/image.c MesaLib/src/mesa/main/image.c -*** Mesa-7.9/src/mesa/main/image.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/image.c Tue Oct 26 11:17:45 2010 -*************** -*** 37,42 **** ---- 37,45 ---- - #include "imports.h" - #include "macros.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - /** - * NOTE: -diff -c -r Mesa-7.9/src/mesa/main/mipmap.c MesaLib/src/mesa/main/mipmap.c -*** Mesa-7.9/src/mesa/main/mipmap.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/main/mipmap.c Tue Oct 26 11:17:52 2010 -*************** -*** 34,40 **** - #include "texstore.h" - #include "image.h" - -! - - static GLint - bytes_per_pixel(GLenum datatype, GLuint comps) ---- 34,42 ---- - #include "texstore.h" - #include "image.h" - -! #if defined(_MSC_VER) -! #pragma optimize("", off) -! #endif - - static GLint - bytes_per_pixel(GLenum datatype, GLuint comps) -diff -c -r Mesa-7.9/src/mesa/main/querymatrix.c MesaLib/src/mesa/main/querymatrix.c -*** Mesa-7.9/src/mesa/main/querymatrix.c Mon Oct 4 18:58:00 2010 ---- MesaLib/src/mesa/main/querymatrix.c Wed Oct 6 16:36:08 2010 -*************** -*** 73,79 **** - #elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \ - (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \ -! (defined(__sun) && defined(__GNUC__)) - - /* fpclassify is available. */ - ---- 73,80 ---- - #elif defined(__APPLE__) || defined(__CYGWIN__) || defined(__FreeBSD__) || \ - defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__) || \ - (defined(__sun) && defined(__C99FEATURES__)) || defined(__MINGW32__) || \ -! (defined(__sun) && defined(__GNUC__)) || \ -! (defined(__linux) && defined(__GNUC__)) - - /* fpclassify is available. */ - -diff -c -r Mesa-7.9/src/mesa/math/m_eval.c MesaLib/src/mesa/math/m_eval.c -*** Mesa-7.9/src/mesa/math/m_eval.c Thu Feb 4 16:10:40 2010 ---- MesaLib/src/mesa/math/m_eval.c Tue Oct 26 11:18:00 2010 -*************** -*** 41,46 **** ---- 41,50 ---- - #include "main/config.h" - #include "m_eval.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif -+ - static GLfloat inv_tab[MAX_EVAL_ORDER]; - - -diff -c -r Mesa-7.9/src/mesa/swrast/s_texcombine.c MesaLib/src/mesa/swrast/s_texcombine.c -*** Mesa-7.9/src/mesa/swrast/s_texcombine.c Fri Oct 1 15:51:28 2010 ---- MesaLib/src/mesa/swrast/s_texcombine.c Tue Oct 26 11:01:39 2010 -*************** -*** 34,39 **** ---- 34,42 ---- - #include "s_context.h" - #include "s_texcombine.h" - -+ #if defined(_MSC_VER) -+ #pragma optimize("", off) -+ #endif - - /** - * Pointer to array of float[4] -diff -c -r Mesa-7.9/src/mapi/glapi/gen/gl_apitemp.py MesaLib/src/mapi/glapi/gen/gl_apitemp.py -*** Mesa-7.9/src/mapi/glapi/gen/gl_apitemp.py Mon Aug 15 09:14:29 2011 ---- MesaLib/src/mapi/glapi/gen/gl_apitemp.py Thu Aug 11 21:23:47 2011 -*************** -*** 79,89 **** - comma = ", " - - -- if f.return_type != 'void': -- dispatch = "RETURN_DISPATCH" -- else: -- dispatch = "DISPATCH" -- - need_proto = False - if not f.is_static_entry_point(name): - need_proto = True ---- 79,84 ---- -*************** -*** 97,108 **** - - print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '{' -! if p_string == "": -! print ' %s(%s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.name, name) - else: -! print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.name, p_string, name, t_string, o_string) - print '}' - print '' - return ---- 92,113 ---- - - print '%s %s KEYWORD2 NAME(%s)(%s)' % (keyword, f.return_type, n, f.get_parameter_string(name)) - print '{' -! if f.return_type != 'void': -! dispatch = "RETURN_DISPATCH" -! if p_string == "": -! print ' %s(%s, %s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.return_type, f.name, name) -! else: -! print ' %s(%s, %s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.return_type, f.name, p_string, name, t_string, o_string) - else: -! dispatch = "DISPATCH" -! if p_string == "": -! print ' %s(%s, (), (F, "gl%s();\\n"));' \ -! % (dispatch, f.name, name) -! else: -! print ' %s(%s, (%s), (F, "gl%s(%s);\\n", %s));' \ -! % (dispatch, f.name, p_string, name, t_string, o_string) - print '}' - print '' - return -*************** -*** 120,126 **** - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. -! * RETURN_DISPATCH(func, args, msg) - code to do dispatch with a return value - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 ---- 125,132 ---- - * NAME(n) - builds the final function name (usually add "gl" prefix) - * DISPATCH(func, args, msg) - code to do dispatch of named function. - * msg is a printf-style debug message. -! * RETURN_DISPATCH(type, func, args, msg) - code to do dispatch with a -! * return value of type. - * - * Here is an example which generates the usual OpenGL functions: - * #define KEYWORD1 -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_dispatch.c MesaLib/src/mapi/glapi/glapi_dispatch.c -*** Mesa-7.9/src/mapi/glapi/glapi_dispatch.c Mon Aug 15 09:14:30 2011 ---- MesaLib/src/mapi/glapi/glapi_dispatch.c Thu Aug 11 21:25:55 2011 -*************** -*** 65,71 **** - fprintf MESSAGE; \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - ---- 65,71 ---- - fprintf MESSAGE; \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(TYPE, FUNC, ARGS, MESSAGE) \ - fprintf MESSAGE; \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -*************** -*** 74,80 **** - #define DISPATCH(FUNC, ARGS, MESSAGE) \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(FUNC, ARGS, MESSAGE) \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - - #endif /* logging */ ---- 74,80 ---- - #define DISPATCH(FUNC, ARGS, MESSAGE) \ - CALL_ ## FUNC(GET_DISPATCH(), ARGS); - -! #define RETURN_DISPATCH(TYPE, FUNC, ARGS, MESSAGE) \ - return CALL_ ## FUNC(GET_DISPATCH(), ARGS); - - #endif /* logging */ -diff -c -r Mesa-7.9/src/mapi/glapi/glapi_nop.c MesaLib/src/mapi/glapi/glapi_nop.c -*** Mesa-7.9/src/mapi/glapi/glapi_nop.c Mon Aug 15 09:14:30 2011 ---- MesaLib/src/mapi/glapi/glapi_nop.c Thu Aug 11 21:29:46 2011 -*************** -*** 86,92 **** - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) Warn(#func); -! #define RETURN_DISPATCH(func, args, msg) Warn(#func); return 0 - - - /* ---- 86,92 ---- - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) Warn(#func); -! #define RETURN_DISPATCH(type, func, args, msg) Warn(#func); return (type)0 - - - /* -*************** -*** 96,102 **** - - #else - -! static int - NoOpGeneric(void) - { - #if !defined(_WIN32_WCE) ---- 96,102 ---- - - #else - -! void - NoOpGeneric(void) - { - #if !defined(_WIN32_WCE) -*************** -*** 104,110 **** - fprintf(stderr, "GL User Error: calling GL function without a rendering context\n"); - } - #endif -- return 0; - } - - /** ---- 104,109 ---- -*************** -*** 113,119 **** - static GLint - NoOpUnused(void) - { -! return NoOpGeneric(); - } - - /* ---- 112,119 ---- - static GLint - NoOpUnused(void) - { -! NoOpGeneric(); -! return 0; - } - - /* -*************** -*** 127,133 **** - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(func, args, msg) return NoOpGeneric(); - - /* - * Defines for the table of no-op entry points. ---- 127,133 ---- - #define KEYWORD2 GLAPIENTRY - #define NAME(func) NoOp##func - #define DISPATCH(func, args, msg) NoOpGeneric(); -! #define RETURN_DISPATCH(type, func, args, msg) NoOpGeneric(); return (type)0 - - /* - * Defines for the table of no-op entry points. diff --git a/third_party/mesa/generate_git_sha1.py b/third_party/mesa/generate_git_sha1.py deleted file mode 100644 index 5e41c852ab123591bc11abc01ff6ec3ad6e4c7a5..0000000000000000000000000000000000000000 --- a/third_party/mesa/generate_git_sha1.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import os.path -import sys - -output = sys.argv[1] -parentdir = os.path.abspath(os.path.join(output, os.pardir)) - -#The original body of this file is generated by this bash script: -# -#touch "${DIR}/git_sha1.h.tmp" -#if test -d .git; then \ -# if which git > /dev/null; then \ -# git log -n 1 --oneline | \ -# sed 's/^\([^ ]*\) .*/#define MESA_GIT_SHA1 "git-\1"/' \ -# > "${DIR}/git_sha1.h.tmp" ; \ -# fi \ -# fi -#if ! cmp -s "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h"; then \ -# mv "${DIR}/git_sha1.h.tmp" "${DIR}/git_sha1.h" ;\ -# else \ -# rm "${DIR}/git_sha1.h.tmp" ;\ -# fi -# -#However, Chromium shouldn't depend on Bash, and this preprocessor macro isn't -#neccessary in the first place - -if not os.path.isdir(parentdir): - os.makedirs(parentdir) - -with open(output, "w") as f: - pass diff --git a/third_party/mesa/mesa.gyp b/third_party/mesa/mesa.gyp deleted file mode 100644 index 4cb1012c3869789062ee64ba7cbd542bc8e2c25e..0000000000000000000000000000000000000000 --- a/third_party/mesa/mesa.gyp +++ /dev/null @@ -1,752 +0,0 @@ -# Copyright (c) 2012 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'generated_src_dir': 'src/chromium_gensrc', - }, - 'target_defaults': { - 'defines': [ - 'MAPI_ABI_HEADER="glapi_mapi_tmp_shared.h"', - "PACKAGE_NAME=\"Mesa\"", - "PACKAGE_TARNAME=\"mesa\"", - "PACKAGE_VERSION=\"9.0.3\"", - "PACKAGE_STRING=\"Mesa\ 9.0.3\"", - "PACKAGE_BUGREPORT=\"https://bugs.freedesktop.org/enter_bug.cgi\?product=Mesa\"", - "PACKAGE_URL=\"\"", - "PACKAGE=\"mesa\"", - "VERSION=\"9.0.3\"", - "STDC_HEADERS=1", - "HAVE_SYS_TYPES_H=1", - "HAVE_SYS_STAT_H=1", - "HAVE_STDLIB_H=1", - "HAVE_STRING_H=1", - "HAVE_MEMORY_H=1", - "HAVE_STRINGS_H=1", - "HAVE_INTTYPES_H=1", - "HAVE_STDINT_H=1", - "HAVE_DLFCN_H=1", - "LT_OBJDIR=\".libs/\"", - "YYTEXT_POINTER=1", - "HAVE_LIBEXPAT=1", - "HAVE_LIBXCB_DRI2=1", - "FEATURE_GL=1", - 'MAPI_MODE_GLAPI', - #"USE_X86_64_ASM", - "IN_DRI_DRIVER", - "USE_XCB", - "GLX_INDIRECT_RENDERING", - "GLX_DIRECT_RENDERING", - "USE_EXTERNAL_DXTN_LIB=1", - "IN_DRI_DRIVER", - "HAVE_ALIAS", - "HAVE_MINCORE", - "HAVE_LIBUDEV", - "_GLAPI_NO_EXPORTS", - ], - 'conditions': [ - ['OS=="android" or OS=="linux"', { - 'defines': [ - '_GNU_SOURCE', - ], - }], - ['OS=="win"', { - 'defines': [ - # Generated files use const only if __cplusplus or __STDC__ is - # defined. On Windows, neither is defined, so define YY_USE_CONST - # to explicitly enable const. - 'YY_USE_CONST', - ], - }], - ['os_posix == 1', { - 'defines': [ - 'HAVE_DLOPEN', - 'HAVE_PTHREAD=1', - 'HAVE_UNISTD_H=1', - ], - }], - ['os_posix == 1 and OS != "android"', { - 'defines': [ - 'HAVE_POSIX_MEMALIGN', - ], - }], - ['os_posix == 1 and OS != "mac" and OS != "android"', { - 'cflags': [ - '-fPIC', - ], - }], - ['ubsan_vptr == 1', { - 'cflags!': [ - # UBsan's vptr is not compatible with -fno-rtti, - # which is used by gallium/auxiliary/Makefile. - '-fsanitize=null', - '-fsanitize=vptr', - '-fsanitize-coverage=<(sanitizer_coverage)', - ], - }], - ], - }, - 'targets': [ - { - 'target_name': 'mesa_headers', - 'type': 'none', - 'direct_dependent_settings': { - 'include_dirs': [ - 'src/include', - ], - }, - 'conditions': [ - ['use_x11==0', { - 'direct_dependent_settings': { - 'defines': [ - 'MESA_EGL_NO_X11_HEADERS', - ], - }, - }], - ], - }, - { - 'target_name': 'mesa_libglslcommon', - 'type': 'static_library', - 'include_dirs': [ - 'src/src/gallium/auxiliary', - 'src/src/gallium/include', - 'src/src/glsl', - 'src/src/glsl/glcpp', - 'src/src/mapi', - 'src/src/mapi/glapi', - 'src/src/mesa', - 'src/src/mesa/main', - 'src/include', - '<(generated_src_dir)/mesa/', - '<(generated_src_dir)/mesa/main', - '<(generated_src_dir)/mesa/program', - '<(generated_src_dir)/mesa/glapi', - ], - 'dependencies': [ - 'mesa_headers', - ], - # TODO(scottmg): http://crbug.com/143877 These should be removed if - # Mesa is ever rolled and the warnings are fixed. - 'msvs_disabled_warnings': [ - 4005, 4018, 4065, 4090, 4099, 4291, 4345, 4267, - ], - 'variables': { - 'clang_warning_flags': [ - '-Wno-tautological-constant-out-of-range-compare', - '-Wno-mismatched-tags', # Fixed upstream. - ], - 'clang_warning_flags_unset': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - 'sources': [ - '<(generated_src_dir)/mesa/main/dispatch.h', - 'src/src/glsl/ast_expr.cpp', - 'src/src/glsl/ast_function.cpp', - 'src/src/glsl/ast_to_hir.cpp', - 'src/src/glsl/ast_type.cpp', - 'src/src/glsl/builtin_variables.cpp', - '<(generated_src_dir)/mesa/glcpp-lex.c', - '<(generated_src_dir)/mesa/glcpp-parse.c', - '<(generated_src_dir)/mesa/glcpp-parse.h', - 'src/src/glsl/glcpp/glcpp.h', - 'src/src/glsl/glcpp/pp.c', - '<(generated_src_dir)/mesa/glsl_lexer.cc', - '<(generated_src_dir)/mesa/glsl_parser.cc', - 'src/src/glsl/glsl_parser_extras.cpp', - 'src/src/glsl/glsl_parser_extras.h', - 'src/src/glsl/glsl_symbol_table.cpp', - 'src/src/glsl/glsl_symbol_table.h', - 'src/src/glsl/glsl_types.cpp', - 'src/src/glsl/glsl_types.h', - 'src/src/glsl/hir_field_selection.cpp', - 'src/src/glsl/ir.cpp', - 'src/src/glsl/ir.h', - 'src/src/glsl/ir_basic_block.cpp', - 'src/src/glsl/ir_basic_block.h', - 'src/src/glsl/ir_builder.cpp', - 'src/src/glsl/ir_builder.h', - 'src/src/glsl/ir_clone.cpp', - 'src/src/glsl/ir_constant_expression.cpp', - 'src/src/glsl/ir_expression_flattening.cpp', - 'src/src/glsl/ir_expression_flattening.h', - 'src/src/glsl/ir_function.cpp', - 'src/src/glsl/ir_function_can_inline.cpp', - 'src/src/glsl/ir_function_detect_recursion.cpp', - 'src/src/glsl/ir_hierarchical_visitor.cpp', - 'src/src/glsl/ir_hierarchical_visitor.h', - 'src/src/glsl/ir_hv_accept.cpp', - 'src/src/glsl/ir_import_prototypes.cpp', - 'src/src/glsl/ir_print_visitor.cpp', - 'src/src/glsl/ir_print_visitor.h', - 'src/src/glsl/ir_reader.cpp', - 'src/src/glsl/ir_reader.h', - 'src/src/glsl/ir_rvalue_visitor.cpp', - 'src/src/glsl/ir_rvalue_visitor.h', - 'src/src/glsl/ir_set_program_inouts.cpp', - 'src/src/glsl/ir_validate.cpp', - 'src/src/glsl/ir_variable_refcount.cpp', - 'src/src/glsl/ir_variable_refcount.h', - 'src/src/glsl/link_functions.cpp', - 'src/src/glsl/link_uniform_initializers.cpp', - 'src/src/glsl/link_uniforms.cpp', - 'src/src/glsl/linker.cpp', - 'src/src/glsl/linker.h', - 'src/src/glsl/loop_analysis.cpp', - 'src/src/glsl/loop_analysis.h', - 'src/src/glsl/loop_controls.cpp', - 'src/src/glsl/loop_unroll.cpp', - 'src/src/glsl/lower_clip_distance.cpp', - 'src/src/glsl/lower_discard.cpp', - 'src/src/glsl/lower_discard_flow.cpp', - 'src/src/glsl/lower_if_to_cond_assign.cpp', - 'src/src/glsl/lower_instructions.cpp', - 'src/src/glsl/lower_jumps.cpp', - 'src/src/glsl/lower_mat_op_to_vec.cpp', - 'src/src/glsl/lower_noise.cpp', - 'src/src/glsl/lower_output_reads.cpp', - 'src/src/glsl/lower_texture_projection.cpp', - 'src/src/glsl/lower_ubo_reference.cpp', - 'src/src/glsl/lower_variable_index_to_cond_assign.cpp', - 'src/src/glsl/lower_vec_index_to_cond_assign.cpp', - 'src/src/glsl/lower_vec_index_to_swizzle.cpp', - 'src/src/glsl/lower_vector.cpp', - 'src/src/glsl/opt_algebraic.cpp', - 'src/src/glsl/opt_array_splitting.cpp', - 'src/src/glsl/opt_constant_folding.cpp', - 'src/src/glsl/opt_constant_propagation.cpp', - 'src/src/glsl/opt_constant_variable.cpp', - 'src/src/glsl/opt_copy_propagation.cpp', - 'src/src/glsl/opt_copy_propagation_elements.cpp', - 'src/src/glsl/opt_dead_code.cpp', - 'src/src/glsl/opt_dead_code_local.cpp', - 'src/src/glsl/opt_dead_functions.cpp', - 'src/src/glsl/opt_function_inlining.cpp', - 'src/src/glsl/opt_if_simplification.cpp', - 'src/src/glsl/opt_noop_swizzle.cpp', - 'src/src/glsl/opt_redundant_jumps.cpp', - 'src/src/glsl/opt_structure_splitting.cpp', - 'src/src/glsl/opt_swizzle_swizzle.cpp', - 'src/src/glsl/opt_tree_grafting.cpp', - 'src/src/glsl/program.h', - 'src/src/glsl/ralloc.c', - 'src/src/glsl/ralloc.h', - 'src/src/glsl/s_expression.cpp', - 'src/src/glsl/s_expression.h', - # This file is not needed and has duplicate symbols (although it - # happens to link because of static library link ordering). - #'src/src/glsl/standalone_scaffolding.cpp', - #'src/src/glsl/standalone_scaffolding.h', - 'src/src/glsl/strtod.c', - 'src/src/glsl/strtod.h', - ], - }, - { - 'target_name': 'mesa', - 'type': 'static_library', - 'include_dirs': [ - 'src/src/gallium/auxiliary', - 'src/src/gallium/include', - 'src/src/glsl', - 'src/src/glsl/glcpp', - 'src/src/mapi', - 'src/src/mapi/glapi', - 'src/src/mesa', - 'src/src/mesa/main', - '<(generated_src_dir)/mesa/', - '<(generated_src_dir)/mesa/main', - '<(generated_src_dir)/mesa/program', - '<(generated_src_dir)/mesa/glapi', - ], - 'dependencies': [ - 'mesa_headers', - 'mesa_libglslcommon', - ], - # TODO(scottmg): http://crbug.com/143877 These should be removed if - # Mesa is ever rolled and the warnings are fixed. - 'msvs_disabled_warnings': [ - 4005, 4018, 4090, 4099, 4146, 4291, 4305, 4334, 4748, 4267, - ], - 'variables': { - 'clang_warning_flags': [ - '-Wno-tautological-constant-out-of-range-compare', - '-Wno-absolute-value', # Fires on st_atom_array.c, might be a bug - '-Wno-mismatched-tags', # Fixed upstream. - ], - 'clang_warning_flags_unset': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - 'sources': [ - '<(generated_src_dir)/mesa/builtin_function.cpp', - '<(generated_src_dir)/mesa/glapi_mapi_tmp_shared.h', - 'src/src/mapi/mapi/entry.c', - 'src/src/mapi/mapi/entry.h', - 'src/src/mapi/mapi/mapi_glapi.c', - 'src/src/mapi/mapi/stub.c', - 'src/src/mapi/mapi/stub.h', - 'src/src/mapi/mapi/table.c', - 'src/src/mapi/mapi/table.h', - 'src/src/mapi/mapi/u_current.c', - 'src/src/mapi/mapi/u_current.h', - 'src/src/mapi/mapi/u_execmem.c', - 'src/src/mapi/mapi/u_execmem.h', - 'src/src/mesa/main/accum.c', - 'src/src/mesa/main/accum.h', - 'src/src/mesa/main/api_arrayelt.c', - 'src/src/mesa/main/api_arrayelt.h', - 'src/src/mesa/main/api_exec.c', - 'src/src/mesa/main/api_exec.h', - 'src/src/mesa/main/api_loopback.c', - 'src/src/mesa/main/api_loopback.h', - 'src/src/mesa/main/api_validate.c', - 'src/src/mesa/main/api_validate.h', - 'src/src/mesa/main/arbprogram.c', - 'src/src/mesa/main/arbprogram.h', - 'src/src/mesa/main/arrayobj.c', - 'src/src/mesa/main/arrayobj.h', - 'src/src/mesa/main/atifragshader.c', - 'src/src/mesa/main/atifragshader.h', - 'src/src/mesa/main/attrib.c', - 'src/src/mesa/main/attrib.h', - 'src/src/mesa/main/blend.c', - 'src/src/mesa/main/blend.h', - 'src/src/mesa/main/bufferobj.c', - 'src/src/mesa/main/bufferobj.h', - 'src/src/mesa/main/buffers.c', - 'src/src/mesa/main/buffers.h', - 'src/src/mesa/main/clear.c', - 'src/src/mesa/main/clear.h', - 'src/src/mesa/main/clip.c', - 'src/src/mesa/main/clip.h', - 'src/src/mesa/main/colortab.c', - 'src/src/mesa/main/colortab.h', - 'src/src/mesa/main/condrender.c', - 'src/src/mesa/main/condrender.h', - 'src/src/mesa/main/context.c', - 'src/src/mesa/main/context.h', - 'src/src/mesa/main/convolve.c', - 'src/src/mesa/main/convolve.h', - 'src/src/mesa/main/cpuinfo.c', - 'src/src/mesa/main/cpuinfo.h', - 'src/src/mesa/main/debug.c', - 'src/src/mesa/main/debug.h', - 'src/src/mesa/main/depth.c', - 'src/src/mesa/main/depth.h', - 'src/src/mesa/main/dlist.c', - 'src/src/mesa/main/dlist.h', - 'src/src/mesa/main/drawpix.c', - 'src/src/mesa/main/drawpix.h', - 'src/src/mesa/main/drawtex.c', - 'src/src/mesa/main/drawtex.h', - 'src/src/mesa/main/enable.c', - 'src/src/mesa/main/enable.h', - '<(generated_src_dir)/mesa/enums.c', - 'src/src/mesa/main/enums.h', - 'src/src/mesa/main/errors.c', - 'src/src/mesa/main/errors.h', - 'src/src/mesa/main/eval.c', - 'src/src/mesa/main/eval.h', - 'src/src/mesa/main/execmem.c', - 'src/src/mesa/main/extensions.c', - 'src/src/mesa/main/extensions.h', - 'src/src/mesa/main/fbobject.c', - 'src/src/mesa/main/fbobject.h', - 'src/src/mesa/main/feedback.c', - 'src/src/mesa/main/feedback.h', - 'src/src/mesa/main/ff_fragment_shader.cpp', - 'src/src/mesa/main/ffvertex_prog.c', - 'src/src/mesa/main/ffvertex_prog.h', - 'src/src/mesa/main/fog.c', - 'src/src/mesa/main/fog.h', - 'src/src/mesa/main/format_pack.c', - 'src/src/mesa/main/format_pack.h', - 'src/src/mesa/main/format_unpack.c', - 'src/src/mesa/main/format_unpack.h', - 'src/src/mesa/main/formats.c', - 'src/src/mesa/main/formats.h', - 'src/src/mesa/main/framebuffer.c', - 'src/src/mesa/main/framebuffer.h', - 'src/src/mesa/main/get.c', - 'src/src/mesa/main/get.h', - 'src/src/mesa/main/getstring.c', - 'src/src/mesa/main/glformats.c', - 'src/src/mesa/main/glformats.h', - 'src/src/mesa/main/hash.c', - 'src/src/mesa/main/hash.h', - 'src/src/mesa/main/hint.c', - 'src/src/mesa/main/hint.h', - 'src/src/mesa/main/histogram.c', - 'src/src/mesa/main/histogram.h', - 'src/src/mesa/main/image.c', - 'src/src/mesa/main/image.h', - 'src/src/mesa/main/imports.c', - 'src/src/mesa/main/imports.h', - 'src/src/mesa/main/light.c', - 'src/src/mesa/main/light.h', - 'src/src/mesa/main/lines.c', - 'src/src/mesa/main/lines.h', - 'src/src/mesa/main/matrix.c', - 'src/src/mesa/main/matrix.h', - 'src/src/mesa/main/mipmap.c', - 'src/src/mesa/main/mipmap.h', - 'src/src/mesa/main/mm.c', - 'src/src/mesa/main/mm.h', - 'src/src/mesa/main/multisample.c', - 'src/src/mesa/main/multisample.h', - 'src/src/mesa/main/nvprogram.c', - 'src/src/mesa/main/nvprogram.h', - 'src/src/mesa/main/pack.c', - 'src/src/mesa/main/pack.h', - 'src/src/mesa/main/pbo.c', - 'src/src/mesa/main/pbo.h', - 'src/src/mesa/main/pixel.c', - 'src/src/mesa/main/pixel.h', - 'src/src/mesa/main/pixelstore.c', - 'src/src/mesa/main/pixelstore.h', - 'src/src/mesa/main/pixeltransfer.c', - 'src/src/mesa/main/pixeltransfer.h', - 'src/src/mesa/main/points.c', - 'src/src/mesa/main/points.h', - 'src/src/mesa/main/polygon.c', - 'src/src/mesa/main/polygon.h', - 'src/src/mesa/main/queryobj.c', - 'src/src/mesa/main/queryobj.h', - 'src/src/mesa/main/rastpos.c', - 'src/src/mesa/main/rastpos.h', - 'src/src/mesa/main/readpix.c', - 'src/src/mesa/main/readpix.h', - 'src/src/mesa/main/remap.c', - 'src/src/mesa/main/remap.h', - 'src/src/mesa/main/renderbuffer.c', - 'src/src/mesa/main/renderbuffer.h', - 'src/src/mesa/main/samplerobj.c', - 'src/src/mesa/main/samplerobj.h', - 'src/src/mesa/main/scissor.c', - 'src/src/mesa/main/scissor.h', - 'src/src/mesa/main/shader_query.cpp', - 'src/src/mesa/main/shaderapi.c', - 'src/src/mesa/main/shaderapi.h', - 'src/src/mesa/main/shaderobj.c', - 'src/src/mesa/main/shaderobj.h', - 'src/src/mesa/main/shared.c', - 'src/src/mesa/main/shared.h', - 'src/src/mesa/main/state.c', - 'src/src/mesa/main/state.h', - 'src/src/mesa/main/stencil.c', - 'src/src/mesa/main/stencil.h', - 'src/src/mesa/main/syncobj.c', - 'src/src/mesa/main/syncobj.h', - 'src/src/mesa/main/texcompress.c', - 'src/src/mesa/main/texcompress.h', - 'src/src/mesa/main/texcompress_cpal.c', - 'src/src/mesa/main/texcompress_cpal.h', - 'src/src/mesa/main/texcompress_etc.c', - 'src/src/mesa/main/texcompress_etc.h', - 'src/src/mesa/main/texcompress_fxt1.c', - 'src/src/mesa/main/texcompress_fxt1.h', - 'src/src/mesa/main/texcompress_rgtc.c', - 'src/src/mesa/main/texcompress_rgtc.h', - 'src/src/mesa/main/texcompress_s3tc.c', - 'src/src/mesa/main/texcompress_s3tc.h', - 'src/src/mesa/main/texenv.c', - 'src/src/mesa/main/texenv.h', - 'src/src/mesa/main/texformat.c', - 'src/src/mesa/main/texformat.h', - 'src/src/mesa/main/texgen.c', - 'src/src/mesa/main/texgen.h', - 'src/src/mesa/main/texgetimage.c', - 'src/src/mesa/main/texgetimage.h', - 'src/src/mesa/main/teximage.c', - 'src/src/mesa/main/teximage.h', - 'src/src/mesa/main/texobj.c', - 'src/src/mesa/main/texobj.h', - 'src/src/mesa/main/texparam.c', - 'src/src/mesa/main/texparam.h', - 'src/src/mesa/main/texstate.c', - 'src/src/mesa/main/texstate.h', - 'src/src/mesa/main/texstorage.c', - 'src/src/mesa/main/texstorage.h', - 'src/src/mesa/main/texstore.c', - 'src/src/mesa/main/texstore.h', - 'src/src/mesa/main/texturebarrier.c', - 'src/src/mesa/main/texturebarrier.h', - 'src/src/mesa/main/transformfeedback.c', - 'src/src/mesa/main/transformfeedback.h', - 'src/src/mesa/main/uniform_query.cpp', - 'src/src/mesa/main/uniforms.c', - 'src/src/mesa/main/uniforms.h', - 'src/src/mesa/main/varray.c', - 'src/src/mesa/main/varray.h', - 'src/src/mesa/main/version.c', - 'src/src/mesa/main/version.h', - 'src/src/mesa/main/viewport.c', - 'src/src/mesa/main/viewport.h', - 'src/src/mesa/main/vtxfmt.c', - 'src/src/mesa/main/vtxfmt.h', - 'src/src/mesa/math/m_debug_clip.c', - 'src/src/mesa/math/m_debug_norm.c', - 'src/src/mesa/math/m_debug_xform.c', - 'src/src/mesa/math/m_eval.c', - 'src/src/mesa/math/m_eval.h', - 'src/src/mesa/math/m_matrix.c', - 'src/src/mesa/math/m_matrix.h', - 'src/src/mesa/math/m_translate.c', - 'src/src/mesa/math/m_translate.h', - 'src/src/mesa/math/m_vector.c', - 'src/src/mesa/math/m_vector.h', - 'src/src/mesa/math/m_xform.c', - 'src/src/mesa/math/m_xform.h', - 'src/src/mesa/program/arbprogparse.c', - 'src/src/mesa/program/arbprogparse.h', - 'src/src/mesa/program/hash_table.c', - 'src/src/mesa/program/hash_table.h', - 'src/src/mesa/program/ir_to_mesa.cpp', - 'src/src/mesa/program/ir_to_mesa.h', - '<(generated_src_dir)/mesa/lex.yy.c', - 'src/src/mesa/program/nvfragparse.c', - 'src/src/mesa/program/nvfragparse.h', - 'src/src/mesa/program/nvvertparse.c', - 'src/src/mesa/program/nvvertparse.h', - 'src/src/mesa/program/prog_cache.c', - 'src/src/mesa/program/prog_cache.h', - 'src/src/mesa/program/prog_execute.c', - 'src/src/mesa/program/prog_execute.h', - 'src/src/mesa/program/prog_instruction.c', - 'src/src/mesa/program/prog_instruction.h', - 'src/src/mesa/program/prog_noise.c', - 'src/src/mesa/program/prog_noise.h', - 'src/src/mesa/program/prog_opt_constant_fold.c', - 'src/src/mesa/program/prog_optimize.c', - 'src/src/mesa/program/prog_optimize.h', - 'src/src/mesa/program/prog_parameter.c', - 'src/src/mesa/program/prog_parameter.h', - 'src/src/mesa/program/prog_parameter_layout.c', - 'src/src/mesa/program/prog_parameter_layout.h', - 'src/src/mesa/program/prog_print.c', - 'src/src/mesa/program/prog_print.h', - 'src/src/mesa/program/prog_statevars.c', - 'src/src/mesa/program/prog_statevars.h', - 'src/src/mesa/program/program.c', - 'src/src/mesa/program/program.h', - '<(generated_src_dir)/mesa/program/program_parse.tab.c', - '<(generated_src_dir)/mesa/program/program_parse.tab.h', - 'src/src/mesa/program/program_parse_extra.c', - 'src/src/mesa/program/programopt.c', - 'src/src/mesa/program/programopt.h', - 'src/src/mesa/program/register_allocate.c', - 'src/src/mesa/program/register_allocate.h', - 'src/src/mesa/program/sampler.cpp', - 'src/src/mesa/program/sampler.h', - 'src/src/mesa/program/string_to_uint_map.cpp', - 'src/src/mesa/program/symbol_table.c', - 'src/src/mesa/program/symbol_table.h', - 'src/src/mesa/swrast/s_aaline.c', - 'src/src/mesa/swrast/s_aaline.h', - 'src/src/mesa/swrast/s_aatriangle.c', - 'src/src/mesa/swrast/s_aatriangle.h', - 'src/src/mesa/swrast/s_alpha.c', - 'src/src/mesa/swrast/s_alpha.h', - 'src/src/mesa/swrast/s_atifragshader.c', - 'src/src/mesa/swrast/s_atifragshader.h', - 'src/src/mesa/swrast/s_bitmap.c', - 'src/src/mesa/swrast/s_blend.c', - 'src/src/mesa/swrast/s_blend.h', - 'src/src/mesa/swrast/s_blit.c', - 'src/src/mesa/swrast/s_clear.c', - 'src/src/mesa/swrast/s_context.c', - 'src/src/mesa/swrast/s_context.h', - 'src/src/mesa/swrast/s_copypix.c', - 'src/src/mesa/swrast/s_depth.c', - 'src/src/mesa/swrast/s_depth.h', - 'src/src/mesa/swrast/s_drawpix.c', - 'src/src/mesa/swrast/s_feedback.c', - 'src/src/mesa/swrast/s_feedback.h', - 'src/src/mesa/swrast/s_fog.c', - 'src/src/mesa/swrast/s_fog.h', - 'src/src/mesa/swrast/s_fragprog.c', - 'src/src/mesa/swrast/s_fragprog.h', - 'src/src/mesa/swrast/s_lines.c', - 'src/src/mesa/swrast/s_lines.h', - 'src/src/mesa/swrast/s_logic.c', - 'src/src/mesa/swrast/s_logic.h', - 'src/src/mesa/swrast/s_masking.c', - 'src/src/mesa/swrast/s_masking.h', - 'src/src/mesa/swrast/s_points.c', - 'src/src/mesa/swrast/s_points.h', - 'src/src/mesa/swrast/s_renderbuffer.c', - 'src/src/mesa/swrast/s_renderbuffer.h', - 'src/src/mesa/swrast/s_span.c', - 'src/src/mesa/swrast/s_span.h', - 'src/src/mesa/swrast/s_stencil.c', - 'src/src/mesa/swrast/s_stencil.h', - 'src/src/mesa/swrast/s_texcombine.c', - 'src/src/mesa/swrast/s_texcombine.h', - 'src/src/mesa/swrast/s_texfetch.c', - 'src/src/mesa/swrast/s_texfetch.h', - 'src/src/mesa/swrast/s_texfilter.c', - 'src/src/mesa/swrast/s_texfilter.h', - 'src/src/mesa/swrast/s_texrender.c', - 'src/src/mesa/swrast/s_texture.c', - 'src/src/mesa/swrast/s_triangle.c', - 'src/src/mesa/swrast/s_triangle.h', - 'src/src/mesa/swrast/s_zoom.c', - 'src/src/mesa/swrast/s_zoom.h', - 'src/src/mesa/swrast_setup/ss_context.c', - 'src/src/mesa/swrast_setup/ss_context.h', - 'src/src/mesa/swrast_setup/ss_triangle.c', - 'src/src/mesa/swrast_setup/ss_triangle.h', - 'src/src/mesa/tnl/t_context.c', - 'src/src/mesa/tnl/t_context.h', - 'src/src/mesa/tnl/t_draw.c', - 'src/src/mesa/tnl/t_pipeline.c', - 'src/src/mesa/tnl/t_pipeline.h', - 'src/src/mesa/tnl/t_rasterpos.c', - 'src/src/mesa/tnl/t_vb_fog.c', - 'src/src/mesa/tnl/t_vb_light.c', - 'src/src/mesa/tnl/t_vb_normals.c', - 'src/src/mesa/tnl/t_vb_points.c', - 'src/src/mesa/tnl/t_vb_program.c', - 'src/src/mesa/tnl/t_vb_render.c', - 'src/src/mesa/tnl/t_vb_texgen.c', - 'src/src/mesa/tnl/t_vb_texmat.c', - 'src/src/mesa/tnl/t_vb_vertex.c', - 'src/src/mesa/tnl/t_vertex.c', - 'src/src/mesa/tnl/t_vertex.h', - 'src/src/mesa/tnl/t_vertex_generic.c', - 'src/src/mesa/tnl/t_vertex_sse.c', - 'src/src/mesa/tnl/t_vp_build.c', - 'src/src/mesa/tnl/t_vp_build.h', - 'src/src/mesa/vbo/vbo_context.c', - 'src/src/mesa/vbo/vbo_context.h', - 'src/src/mesa/vbo/vbo_exec.c', - 'src/src/mesa/vbo/vbo_exec.h', - 'src/src/mesa/vbo/vbo_exec_api.c', - 'src/src/mesa/vbo/vbo_exec_array.c', - 'src/src/mesa/vbo/vbo_exec_draw.c', - 'src/src/mesa/vbo/vbo_exec_eval.c', - 'src/src/mesa/vbo/vbo_noop.c', - 'src/src/mesa/vbo/vbo_noop.h', - 'src/src/mesa/vbo/vbo_primitive_restart.c', - 'src/src/mesa/vbo/vbo_rebase.c', - 'src/src/mesa/vbo/vbo_save.c', - 'src/src/mesa/vbo/vbo_save.h', - 'src/src/mesa/vbo/vbo_save_api.c', - 'src/src/mesa/vbo/vbo_save_draw.c', - 'src/src/mesa/vbo/vbo_save_loopback.c', - 'src/src/mesa/vbo/vbo_split.c', - 'src/src/mesa/vbo/vbo_split.h', - 'src/src/mesa/vbo/vbo_split_copy.c', - 'src/src/mesa/vbo/vbo_split_inplace.c', - 'src/src/mesa/x86-64/x86-64.c', - 'src/src/mesa/x86-64/x86-64.h', - ], - 'conditions': [ - ['OS=="android" and clang==0', { - # Disable sincos() optimization to avoid a linker error - # since Android's math library doesn't have sincos(). - # Either -fno-builtin-sin or -fno-builtin-cos works. - 'cflags': [ - '-fno-builtin-sin', - ], - }], - ['OS=="win"', { - 'defines': [ - # Because we're building as a static library - '_GLAPI_NO_EXPORTS', - ], - }], - ], - }, - # Building this target will hide the native OpenGL shared library and - # replace it with a slow software renderer. - { - 'target_name': 'osmesa', - 'type': 'loadable_module', - 'mac_bundle': 0, - 'dependencies': [ - 'mesa_headers', - 'mesa', - ], - 'xcode_settings': { - 'OTHER_LDFLAGS': [ - '-lstdc++', - ], - }, - 'conditions': [ - ['OS=="win"', { - 'defines': [ - 'BUILD_GL32', - 'KEYWORD1=GLAPI', - 'KEYWORD2=GLAPIENTRY', - ], - }], - ['OS=="linux"', { - 'link_settings': { - 'libraries': [ - '-ldl', - '-lm', - '-lstdc++', - ], - }, - }], - ], - 'include_dirs': [ - 'src/src/mapi', - 'src/src/mesa', - 'src/src/mesa/drivers', - '<(generated_src_dir)/mesa', - ], - 'msvs_disabled_warnings': [ - 4005, 4018, 4065, 4090, 4099, 4291, 4345, 4267, - ], - 'sources': [ - 'src/src/mesa/drivers/common/driverfuncs.c', - 'src/src/mesa/drivers/common/driverfuncs.h', - 'src/src/mesa/drivers/common/meta.c', - 'src/src/mesa/drivers/common/meta.h', - 'src/src/mesa/drivers/osmesa/osmesa.c', - 'src/src/mesa/drivers/osmesa/osmesa.def', - ], - 'variables': { - 'clang_warning_flags_unset': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - }, - ], - 'conditions': [ - ['OS=="android"', { - 'targets': [ - { - # Copies libosmesa.so to the out/$BUILDTYPE/lib/ directory so that - # the write_ordered_libraries.py script won't assume it to be a - # system library. This will cause the library to be stripped allowing - # targets to embed it in the to-be-generated APK. - 'target_name': 'osmesa_in_lib_dir', - 'type': 'none', - 'dependencies': [ - 'osmesa', - ], - 'actions': [ - { - 'action_name': 'copy_libosmesa', - 'inputs': ['<(PRODUCT_DIR)/libosmesa.so'], - 'outputs': ['<(SHARED_LIB_DIR)/libosmesa.so'], - 'action': [ - 'cp', - '<(PRODUCT_DIR)/libosmesa.so', - '<(SHARED_LIB_DIR)/libosmesa.so', - ], - }, - ], - }, - ], - }], - ], -} diff --git a/third_party/mesa/mesa_gensrc.gypi b/third_party/mesa/mesa_gensrc.gypi deleted file mode 100644 index f35c23e0031aac7d6c123d8324dc2888bf0a8543..0000000000000000000000000000000000000000 --- a/third_party/mesa/mesa_gensrc.gypi +++ /dev/null @@ -1,604 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'variables': { - 'xmlfiles': [ - 'src/src/mapi/glapi/gen/EXT_draw_buffers2.xml', - 'src/src/mapi/glapi/gen/NV_texture_barrier.xml', - 'src/src/mapi/glapi/gen/NV_primitive_restart.xml', - 'src/src/mapi/glapi/gen/ARB_base_instance.xml', - 'src/src/mapi/glapi/gen/EXT_packed_depth_stencil.xml', - 'src/src/mapi/glapi/gen/ARB_sync.xml', - 'src/src/mapi/glapi/gen/ARB_draw_buffers.xml', - 'src/src/mapi/glapi/gen/ARB_geometry_shader4.xml', - 'src/src/mapi/glapi/gen/ARB_draw_buffers_blend.xml', - 'src/src/mapi/glapi/gen/GL3x.xml', - 'src/src/mapi/glapi/gen/ARB_blend_func_extended.xml', - 'src/src/mapi/glapi/gen/EXT_gpu_shader4.xml', - 'src/src/mapi/glapi/gen/ARB_robustness.xml', - 'src/src/mapi/glapi/gen/ARB_ES2_compatibility.xml', - 'src/src/mapi/glapi/gen/ARB_map_buffer_range.xml', - 'src/src/mapi/glapi/gen/OES_single_precision.xml', - 'src/src/mapi/glapi/gen/ARB_debug_output.xml', - 'src/src/mapi/glapi/gen/ARB_draw_instanced.xml', - 'src/src/mapi/glapi/gen/ARB_copy_buffer.xml', - 'src/src/mapi/glapi/gen/glX_API.xml', - 'src/src/mapi/glapi/gen/ARB_framebuffer_object.xml', - 'src/src/mapi/glapi/gen/OES_EGL_image.xml', - 'src/src/mapi/glapi/gen/gl_and_es_API.xml', - 'src/src/mapi/glapi/gen/ARB_color_buffer_float.xml', - 'src/src/mapi/glapi/gen/ARB_instanced_arrays.xml', - 'src/src/mapi/glapi/gen/APPLE_object_purgeable.xml', - 'src/src/mapi/glapi/gen/APPLE_vertex_array_object.xml', - 'src/src/mapi/glapi/gen/ARB_texture_rgb10_a2ui.xml', - 'src/src/mapi/glapi/gen/ARB_sampler_objects.xml', - 'src/src/mapi/glapi/gen/OES_fixed_point.xml', - 'src/src/mapi/glapi/gen/EXT_provoking_vertex.xml', - 'src/src/mapi/glapi/gen/ARB_texture_float.xml', - 'src/src/mapi/glapi/gen/EXT_texture_integer.xml', - 'src/src/mapi/glapi/gen/es_EXT.xml', - 'src/src/mapi/glapi/gen/gl_and_glX_API.xml', - 'src/src/mapi/glapi/gen/EXT_transform_feedback.xml', - 'src/src/mapi/glapi/gen/ARB_texture_buffer_object.xml', - 'src/src/mapi/glapi/gen/EXT_framebuffer_object.xml', - 'src/src/mapi/glapi/gen/ARB_uniform_buffer_object.xml', - 'src/src/mapi/glapi/gen/ARB_texture_rg.xml', - 'src/src/mapi/glapi/gen/ARB_vertex_type_2_10_10_10_rev.xml', - 'src/src/mapi/glapi/gen/ARB_seamless_cube_map.xml', - 'src/src/mapi/glapi/gen/EXT_texture_array.xml', - 'src/src/mapi/glapi/gen/ARB_vertex_array_object.xml', - 'src/src/mapi/glapi/gen/ARB_invalidate_subdata.xml', - 'src/src/mapi/glapi/gen/ARB_draw_elements_base_vertex.xml', - 'src/src/mapi/glapi/gen/AMD_draw_buffers_blend.xml', - 'src/src/mapi/glapi/gen/ARB_get_program_binary.xml', - 'src/src/mapi/glapi/gen/gl_API.xml', - 'src/src/mapi/glapi/gen/ARB_depth_clamp.xml', - 'src/src/mapi/glapi/gen/ARB_texture_storage.xml', - 'src/src/mapi/glapi/gen/ARB_depth_buffer_float.xml', - 'src/src/mapi/glapi/gen/EXT_separate_shader_objects.xml', - 'src/src/mapi/glapi/gen/ARB_texture_compression_rgtc.xml', - 'src/src/mapi/glapi/gen/NV_conditional_render.xml', - 'src/src/mesa/main/APIspec.xml', - ], - }, - - 'targets': [ - # The targets below generate all of the sources Mesa generates - # during its build process. Mesa's XML processors like gl_XML.py - # rely heavily on Python's libxml2 bindings. Specifically, the - # processors require validation against the DTD for default values - # for attributes, and none of Python's built-in XML parsers support - # validation. It's infeasible to use any third-party XML parser for - # Python which relies on native code due to the large number of - # host platforms Chromium must build on, and pure Python validators - # are in short supply. - - # The main target is generate_mesa_sources, which must be run - # manually on a host platform with libxml2's Python bindings - # installed. (Most Linux distributions should fulfill this - # requirement.) - { - 'target_name': 'mesa_builtin_compiler', - 'type': 'executable', - 'include_dirs': [ - 'src/src/gallium/auxiliary', - 'src/src/gallium/include', - 'src/src/glsl', - 'src/src/glsl/glcpp', - 'src/src/mapi', - 'src/src/mapi/glapi', - 'src/src/mesa', - 'src/src/mesa/main', - '<(generated_src_dir)/mesa/', - '<(generated_src_dir)/mesa/main', - '<(generated_src_dir)/mesa/program', - '<(generated_src_dir)/mesa/glapi', - ], - 'dependencies': [ - 'generate_main_mesa_sources', - 'mesa_headers', - 'mesa_libglslcommon', # implicit dependency on generate_main_mesa_sources - ], - 'variables': { - 'clang_warning_flags': [ - '-Wno-tautological-constant-out-of-range-compare', - ], - 'clang_warning_flags_unset': [ - # Don't warn about string->bool used in asserts. - '-Wstring-conversion', - ], - }, - 'sources': [ - 'src/src/mesa/program/hash_table.c', - 'src/src/mesa/program/symbol_table.c', - 'src/src/glsl/standalone_scaffolding.cpp', - 'src/src/glsl/main.cpp', - 'src/src/glsl/builtin_stubs.cpp', - ], - }, - { - 'target_name': 'generate_mesa_sources', - 'type': 'none', - 'dependencies': [ - 'mesa_builtin_compiler', - ], - 'actions': [ - { - 'action_name': 'generateBuiltins', - 'inputs': [ - '<(PRODUCT_DIR)/mesa_builtin_compiler', - 'src/src/glsl/builtins/tools/generate_builtins.py' - ], - 'outputs': [ - '<(generated_src_dir)/mesa/builtin_function.cpp', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/builtin_function.cpp', - 'src/src/glsl/builtins/tools/generate_builtins.py', - '<(PRODUCT_DIR)/mesa_builtin_compiler', - ], - 'message': "Generating Mesa builtins ...", - } - ], - }, - { - 'target_name': 'generate_main_mesa_sources', - 'type': 'none', - 'actions': [ - { - 'action_name': 'glsl_parser_cc', - 'inputs': [ - 'src/src/glsl/glsl_parser.yy', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glsl_parser.cc', - '<(generated_src_dir)/mesa/glsl_parser.h', - ], - 'action': [ - 'bison', - '-y', - '-v', - '-o', - '<(generated_src_dir)/mesa/glsl_parser.cc', - '-p', - '_mesa_glsl_', - '--defines=<(generated_src_dir)/mesa/glsl_parser.h', - 'src/src/glsl/glsl_parser.yy' - ], - 'message': "Generating glsl parser ...", - }, - { - 'action_name': 'lex_yy_c', - 'inputs': [ - 'src/src/mesa/program/program_lexer.l', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/lex.yy.c', - ], - 'action': [ - 'flex', - '--never-interactive', - '--outfile=<(generated_src_dir)/mesa/lex.yy.c', - 'src/src/mesa/program/program_lexer.l' - ], - 'message': "Generating lex.yy.c ...", - }, - { - 'action_name': 'glsl_lexer_cc', - 'inputs': [ - 'src/src/glsl/glsl_lexer.ll', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glsl_lexer.cc', - ], - 'action': [ - 'flex', - '--nounistd', - '--outfile=<(generated_src_dir)/mesa/glsl_lexer.cc', - 'src/src/glsl/glsl_lexer.ll', - ], - 'message': "Generating glsl lexer ...", - }, - { - 'action_name': 'glcpp_lex_c', - 'inputs': [ - 'src/src/glsl/glcpp/glcpp-lex.l', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glcpp-lex.c', - ], - 'action': [ - 'flex', - '--nounistd', - '--outfile=<(generated_src_dir)/mesa/glcpp-lex.c', - 'src/src/glsl/glcpp/glcpp-lex.l', - ], - 'message': "Generating glcpp-lex.c ...", - }, - { - 'action_name': 'glcpp_parse_c', - 'inputs': [ - 'src/src/glsl/glcpp/glcpp-parse.y', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glcpp-parse.c', - '<(generated_src_dir)/mesa/glcpp-parse.h', - ], - 'action': [ - 'bison', - '-y', - '-v', - '-d', - '-p', - 'glcpp_parser_', - '-o', - '<(generated_src_dir)/mesa/glcpp-parse.c', - '--defines=<(generated_src_dir)/mesa/glcpp-parse.h', - 'src/src/glsl/glcpp/glcpp-parse.y', - ], - 'message': "Generating glcpp parser ...", - }, - { - 'action_name': 'program_parse_tab_c', - 'inputs': [ - 'src/src/mesa/program/program_parse.y', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/program/program_parse.tab.c', - ], - 'action': [ - 'bison', - '-y', - '-v', - '-d', - '-p', - '_mesa_program_', - '--output=<(generated_src_dir)/mesa/program/program_parse.tab.c', - 'src/src/mesa/program/program_parse.y', - ], - 'message': "Generating program_parse.y ...", - }, - { - 'action_name': 'glapi_mapi_tmp_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/mapi/mapi_abi.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi_mapi_tmp.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi_mapi_tmp.h', - 'src/src/mapi/mapi/mapi_abi.py', - '--printer', - 'glapi', - '--mode', - 'lib', - 'src/src/mapi/glapi/gen/gl_and_es_API.xml', - ], - 'message': "Generating glapi_mapi_tmp.h ...", - }, - { - 'action_name': 'glapi_mapi_tmp_shared_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/mapi/mapi_abi.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi_mapi_tmp_shared.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi_mapi_tmp_shared.h', - 'src/src/mapi/mapi/mapi_abi.py', - '--printer', - 'shared-glapi', - '--mode', - 'lib', - 'src/src/mapi/glapi/gen/gl_and_es_API.xml', - ], - 'message': "Generating glapi_mapi_tmp_shared.h ...", - }, - { - 'action_name': 'glprocs_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_procs.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glprocs.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glprocs.h', - 'src/src/mapi/glapi/gen/gl_procs.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating glprocs.h ...", - }, - { - 'action_name': 'glapitemp_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_apitemp.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi/glapitemp.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi/glapitemp.h', - 'src/src/mapi/glapi/gen/gl_apitemp.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating glapitemp.h ...", - }, - { - 'action_name': 'glapitable_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_table.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi/glapitable.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi/glapitable.h', - 'src/src/mapi/glapi/gen/gl_table.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating glapitable.h ...", - }, - { - 'action_name': 'glapi_gentable_c', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_gentable.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi_gentable.c', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi_gentable.c', - 'src/src/mapi/glapi/gen/gl_gentable.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating glapi_gentable.c ...", - }, - { - 'action_name': 'glapi_x86_64_S', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_x86-64_asm.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/glapi_x86-64.S', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/glapi_x86-64.S', - 'src/src/mapi/glapi/gen/gl_x86-64_asm.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating glapi_x86-64.S ...", - }, - { - 'action_name': 'enums_c', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_enums.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/enums.c', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/enums.c', - 'src/src/mapi/glapi/gen/gl_enums.py', - '-f', - 'src/src/mapi/glapi/gen/gl_and_es_API.xml', - ], - 'message': "Generating enums.c ...", - }, - { - 'action_name': 'dispatch_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/gl_table.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/main/dispatch.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/main/dispatch.h', - 'src/src/mapi/glapi/gen/gl_table.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'remap_table', - ], - 'message': "Generating dispatch.h ...", - }, - { - 'action_name': 'remap_helper_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/remap_helper.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/main/remap_helper.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/main/remap_helper.h', - 'src/src/mapi/glapi/gen/remap_helper.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - ], - 'message': "Generating remap_helper.h ...", - }, - { - 'action_name': 'indirect_c', - 'inputs': [ - '<@(xmlfiles)', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - 'redirectoutput.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/indirect.c', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/indirect.c', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'proto', - ], - 'message': "Generating indirect.c ...", - }, - { - 'action_name': 'indirect_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/indirect.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/indirect.h', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'init_h', - ], - 'message': "Generating indirect.h ...", - }, - { - 'action_name': 'indirect_init_c', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/indirect_init.c', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/indirect_init.c', - 'src/src/mapi/glapi/gen/glX_proto_send.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'init_c', - ], - 'message': "Generating indirect_init.c ...", - }, - { - 'action_name': 'indirect_size_h', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/glX_proto_size.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/indirect_size.h', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/indirect_size.h', - 'src/src/mapi/glapi/gen/glX_proto_size.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'size_h', - '--only-set', - '-h', - '_INDIRECT_SIZE_H_', - ], - 'message': "Generating indirect_size.h ...", - }, - { - 'action_name': 'indirect_size_c', - 'inputs': [ - '<@(xmlfiles)', - 'redirectoutput.py', - 'src/src/mapi/glapi/gen/glX_proto_size.py', - ], - 'outputs': [ - '<(generated_src_dir)/mesa/indirect_size.c', - ], - 'action': [ - 'python', - 'redirectoutput.py', - '<(generated_src_dir)/mesa/indirect_size.c', - 'src/src/mapi/glapi/gen/glX_proto_size.py', - '-f', - 'src/src/mapi/glapi/gen/gl_API.xml', - '-m', - 'size_c', - '--only-set', - ], - 'message': "Generating indirect_size.c ...", - }, - { - 'action_name': 'git_sha1_h', - 'inputs': [ - ], - 'outputs': [ - '<(generated_src_dir)/mesa/git_sha1.h', - ], - 'action': [ - 'python', - 'generate_git_sha1.py', - '<(generated_src_dir)/mesa/git_sha1.h', - ], - 'message': "Generating Mesa sources ...", - }, - ], - }, - ], -} diff --git a/third_party/mesa/redirectoutput.py b/third_party/mesa/redirectoutput.py deleted file mode 100644 index bcd235552d09fd4db3a48f89666dfb68814185e9..0000000000000000000000000000000000000000 --- a/third_party/mesa/redirectoutput.py +++ /dev/null @@ -1,29 +0,0 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -import os -import os.path -import subprocess -import sys - -if len(sys.argv) < 3: - print "Usage: %s OUTPUTFILE SCRIPTNAME ARGUMENTS" % sys.argv[0] - print "Re-execs the python interpreter against SCRIPTNAME with ARGS," - print "redirecting output to OUTPUTFILE." - sys.exit(1) - -abs_outputfile = os.path.abspath(sys.argv[1]) -abs_outputdir = os.path.dirname(abs_outputfile) - -if not os.path.isdir(abs_outputdir): - os.makedirs(abs_outputdir) - -ret = 0 - -with open(abs_outputfile, "w") as f: - ret = subprocess.Popen([sys.executable] + sys.argv[2:], stdout=f).wait() - -if ret: - os.remove(abs_outputfile) - sys.exit(ret)