1. 10 Sep, 2015 14 commits
    • Jon TURNEY's avatar
      Use IMP_LIB_EXT when checking for LLVM shared libraries · adeba943
      Jon TURNEY authored
      When checking for LLVM shared libraries, use IMP_LIB_EXT for the extension for
      shared libraries appropriate to the target, rather than hardcoding '.so'
      
      Also add some comments to explain why we have this circus of pain.
      Signed-off-by: default avatarJon TURNEY <jon.turney@dronecode.org.uk>
      Reviewed-by: default avatarTom Stellard <thomas.stellard@amd.com>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      adeba943
    • Rhys Kidd's avatar
      i965: Resolve GCC sign-compare warning. · 2c300765
      Rhys Kidd authored
      mesa/src/mesa/drivers/dri/i965/brw_eu_compact.c: In function 'set_3src_control_index':
      mesa/src/mesa/drivers/dri/i965/brw_eu_compact.c:805:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int i = 0; i < ARRAY_SIZE(gen8_3src_control_index_table); i++) {
                            ^
      mesa/src/mesa/drivers/dri/i965/brw_eu_compact.c: In function 'set_3src_source_index':
      mesa/src/mesa/drivers/dri/i965/brw_eu_compact.c:839:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int i = 0; i < ARRAY_SIZE(gen8_3src_source_index_table); i++) {
                            ^
      mesa/src/mesa/drivers/dri/i965/brw_state_dump.c: In function 'dump_sampler_state':
      mesa/src/mesa/drivers/dri/i965/brw_state_dump.c:382:18: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (i = 0; i < size / 16; i++) {
                        ^
      mesa/src/mesa/drivers/dri/i965/brw_state_upload.c: In function 'brw_pipeline_state_finished':
      mesa/src/mesa/drivers/dri/i965/brw_state_upload.c:801:13: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (i != pipeline) {
                   ^
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c: In function 'intel_gen7_hiz_buf_create':
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1544:47: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int level = mt->first_level; level <= mt->last_level; ++level) {
                                                     ^
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c: In function 'intel_gen8_hiz_buf_create':
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1638:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int level = mt->first_level; level <= mt->last_level; ++level) {
                                                  ^
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c: In function 'intel_miptree_alloc_hiz':
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1771:44: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int level = mt->first_level; level <= mt->last_level; ++level) {
                                                  ^
      mesa/src/mesa/drivers/dri/i965/intel_mipmap_tree.c:1775:33: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int layer = 0; layer < mt->level[level].depth; ++layer) {
                                       ^
      Signed-off-by: default avatarRhys Kidd <rhyskidd@gmail.com>
      Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      2c300765
    • Rhys Kidd's avatar
      mesa: Resolve GCC sign-compare warning. · 1c194840
      Rhys Kidd authored
      mesa/src/mesa/program/prog_to_nir.c: In function 'setup_registers_and_variables':
      /mesa/src/mesa/program/prog_to_nir.c:1059:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int i = 0; i < c->prog->NumTemporaries; i++) {
                            ^
      Signed-off-by: default avatarRhys Kidd <rhyskidd@gmail.com>
      Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
      Reviewed-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      1c194840
    • Rhys Kidd's avatar
      glsl: Resolve GCC sign-compare warning. · 32cdb49f
      Rhys Kidd authored
      mesa/src/glsl/nir/nir_lower_tex_projector.c: In function 'nir_lower_tex_projector_block':
      mesa/src/glsl/nir/nir_lower_tex_projector.c:63:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = 0; i < tex->num_srcs; i++) {
                               ^
      mesa/src/glsl/nir/nir_lower_tex_projector.c: In function 'nir_lower_tex_projector_block':
      mesa/src/glsl/nir/nir_lower_tex_projector.c:114:38: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (int i = proj_index + 1; i < tex->num_srcs; i++) {
                                            ^
      mesa/src/glsl/nir/nir_lower_tex_projector.c: In function 'nir_lower_tex_projector_block':
      mesa/src/glsl/nir/nir_lower_tex_projector.c:53:39: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             for (proj_index = 0; proj_index < tex->num_srcs; proj_index++) {
                                             ^
      mesa/src/glsl/nir/nir_lower_tex_projector.c:57:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
             if (proj_index == tex->num_srcs)
                            ^
      mesa/src/glsl/nir/nir_search.c: In function 'match_value':
      mesa/src/glsl/nir/nir_search.c:84:22: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (int i = 0; i < num_components; ++i)
                            ^
      mesa/src/glsl/nir/nir_search.c: In function 'match_value':
      mesa/src/glsl/nir/nir_search.c:110:28: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                for (int i = 0; i < num_components; ++i) {
                                  ^
      mesa/src/glsl/nir/nir_search.c: In function 'match_value':
      mesa/src/glsl/nir/nir_search.c:139:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
                   if (i < num_components)
                         ^
      mesa/src/glsl/nir/nir_opt_peephole_ffma.c: In function 'get_mul_for_src':
      mesa/src/glsl/nir/nir_opt_peephole_ffma.c:130:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
          for (unsigned i = 0; i < num_components; i++)
                                 ^
      Signed-off-by: default avatarRhys Kidd <rhyskidd@gmail.com>
      Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
      Reviewed-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      32cdb49f
    • Rhys Kidd's avatar
      mesa: Resolve GCC missing field initializer warning. · 548bf70f
      Rhys Kidd authored
      Resolve a series of missing field initializer warnings within get_hash_params.py
      
      Of the form:
      In file included from mesa/src/mesa/main/get.c:495:0:
      mesa/src/mesa/main/get_hash.h:180:5: warning: missing initializer for field
      'extra' of 'const struct value_desc' [-Wmissing-field-initializers]
           { GL_POINT_SIZE_ARRAY_BUFFER_BINDING_OES, LOC_CUSTOM, TYPE_INT, 0 },
           ^
      mesa/src/mesa/main/get.c:165:15: note: 'extra' declared here
          const int *extra;
                     ^
      
      This patch addresses some likely code rot around the *extra field, where the
      initialization is via C code generated indirectly from a Python script.
      It resolves a number of warnings reported by GCC when configured to be pedantic.
      
      $ gcc --version
      gcc (Ubuntu 4.9.2-10ubuntu13) 4.9.2
      
      No piglit regressions on Ironlake.
      
      v2:
      - Squash series into a single patch.
      Signed-off-by: default avatarRhys Kidd <rhyskidd@gmail.com>
      Reviewed-by: default avatarIago Toral Quiroga <itoral@igalia.com>
      Reviewed-by: default avatarJan Vesely <jan.vesely@rutgers.edu>
      Reviewed-by: default avatarThomas Helland <thomashelland90@gmail.com>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      548bf70f
    • Albert Freeman's avatar
      clover: Avoid using typename to allow compilation of clover by clang · 1691ead1
      Albert Freeman authored
      When parsing an variable declaration qualified with the typename
      keyword, clang attempted to declare a variable with the type of non
      type member "enum type type" of module::argument (within the header
      file clover/core/module.hpp) instead of the typed member of
      module::argument "enum type".
      
      Replaced "typename" with "enum" to force clang to declare the variable
      marg_type with type "enum type" of module::argument.
      
      CC: "11.0" <mesa-stable@lists.freedesktop.org>
      Reviewed-by: default avatarFrancisco Jerez <currojerez@riseup.net>
      Reviewed-by: default avatarEmil Velikov <emil.l.velikov@gmail.com>
      Signed-off-by: default avatarAlbert Freeman <albertwdfreeman@gmail.com>
      1691ead1
    • Kenneth Graunke's avatar
      i965: Advertise 65536 for GL_MAX_UNIFORM_BLOCK_SIZE. · bf58a2c3
      Kenneth Graunke authored
      Our old value of 16384 is the minimum value.  DirectX apparently
      requires 65536 at a minimum; that's also what nVidia and the Intel
      Windows driver advertise.  AMD advertises MAX_INT.
      
      Ilia Mirkin noticed that "Shadow Warrior" uses UBOs larger than 16k
      on Nouveau, which advertises 65536 bytes for this limit.  Traces
      captured on Nouveau don't work on i965 because our lower limit causes
      the GLSL linker to reject the captured shaders.  While this isn't
      important in and of itself, it does suggest that raising the limit
      would be beneficial.
      
      We can read linear buffers up to 2^27 bytes in size, so raising this
      should be safe; we could probably even go larger.  For now, matching
      nVidia and Intel/Windows seems like a good plan.
      
      We have to reinitialize MaxCombinedUniformComponents as core Mesa will
      have set it based on a stale value for MaxUniformBlockSize.
      
      According to Tapani, there's an unreleased game that asserts on this.
      Signed-off-by: default avatarKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: default avatarTapani Pälli <tapani.palli@intel.com>
      Cc: "11.0" <mesa-stable@lists.freedesktop.org>
      bf58a2c3
    • Ilia Mirkin's avatar
      nv50/ir: don't fold immediate into mad if registers are too high · 74b86b97
      Ilia Mirkin authored
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91551Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Cc: "11.0" <mesa-stable@lists.freedesktop.org>
      74b86b97
    • Ilia Mirkin's avatar
      nv50/ir: fix emission of 8-byte wide interp instruction · ce28ca71
      Ilia Mirkin authored
      This can come up if the target register number is > 63, which is fairly
      rare.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91551Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Cc: "11.0" <mesa-stable@lists.freedesktop.org>
      ce28ca71
    • Ilia Mirkin's avatar
      nv50/ir: r63 is only 0 if we are using less than 63 registers · 641eda0c
      Ilia Mirkin authored
      It is advantageous to use r63 instead of r127 since r63 can fit into the
      shorter encoding. However if we've RA'd over 63 registers, we must use
      r127 as the replacement instead.
      Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Cc: "11.0" <mesa-stable@lists.freedesktop.org>
      641eda0c
    • Ilia Mirkin's avatar
      nv50/ir: make edge splitting fix up phi node sources · a072ef87
      Ilia Mirkin authored
      Unfortunately nv50_ir phi nodes aren't directly connected to the CFG, so
      the mapping between source and the actual BB is by inbound edge order.
      So when manipulating edges one has to be extremely careful. We were
      insufficiently careful when splitting critical edges which resulted in
      the phi nodes being confused as to where their sources were coming from.
      
      This primarily manifests itself with the TXL-lowering logic on nv50,
      when it is inside of a conditional. I've been unable to trigger the
      issue anywhere else so far. This resolves rendering failures
      in a number of games like Two Worlds 2, Trine: Enchanted Edition, Trine 2,
      XCOM:Enemy Unknown, Stacking. It also improves the situation in
      Hearthstone, Sonic Generations, and The Raven: Legacy of a Master Thief.
      However more work needs to be done there (splitting a lot more edges
      solves it, so it's some other sort of RA-related issue).
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=90887Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Cc: "11.0" <mesa-stable@lists.freedesktop.org>
      a072ef87
    • Ian Romanick's avatar
      glsl: Remove ADD_VARYING macro · 13a974f9
      Ian Romanick authored
      The purpose of the macro was to create the name_as_gs_input from name.
      The previous commit removed the name_as_gs_input from add_varying, so
      the macro is unnecessary.
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      13a974f9
    • Ian Romanick's avatar
      glsl: Silence unused parameter warnings · bd0245b8
      Ian Romanick authored
      builtin_variables.cpp:1062:53: warning: unused parameter 'name_as_gs_input' [-Wunused-parameter]
                                               const char *name_as_gs_input)
                                                           ^
      builtin_functions.cpp:4774:47: warning: unused parameter 'intrinsic_name' [-Wunused-parameter]
                                         const char *intrinsic_name,
                                                     ^
      builtin_functions.cpp:4907:66: warning: unused parameter 'state' [-Wunused-parameter]
       _mesa_glsl_find_builtin_function_by_name(_mesa_glsl_parse_state *state,
                                                                        ^
      builtin_functions.cpp:4915:49: warning: unused parameter 'num_arguments' [-Wunused-parameter]
                                              unsigned num_arguments,
                                                       ^
      builtin_functions.cpp:4916:49: warning: unused parameter 'flags' [-Wunused-parameter]
                                              unsigned flags)
                                                       ^
      ir_print_visitor.cpp:589:37: warning: unused parameter 'ir' [-Wunused-parameter]
       ir_print_visitor::visit(ir_barrier *ir)
                                           ^
      linker.cpp:3212:48: warning: unused parameter 'ctx' [-Wunused-parameter]
       build_program_resource_list(struct gl_context *ctx,
                                                      ^
      standalone_scaffolding.cpp:65:57: warning: unused parameter ‘id’ [-Wunused-parameter]
       _mesa_shader_debug(struct gl_context *, GLenum, GLuint *id,
                                                               ^
      
      v2: Rebase on top of GL_ARB_shader_image_size work (especially
      58a86897).  Silence more warnings added by that work.
      
      v3: Remove mention of the removed parameter from comments.  Suggested by
      Iago.
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu> [v1]
      Reviewed-by: default avatarIago Toral Quiroga <itoral@igalia.com>
      Cc: "Martin Peres <martin.peres@linux.intel.com>"
      bd0245b8
    • Ilia Mirkin's avatar
      nvc0: remove BGRA4 format support · 342e68dc
      Ilia Mirkin authored
      Something is wrong with the support somewhere. I couldn't get the blob
      driver to use it either, although it happily used RGB5_A1.
      teximage-colors works, but WoW seems to fail in the menus for drawing
      text.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91526Signed-off-by: default avatarIlia Mirkin <imirkin@alum.mit.edu>
      Cc: "10.6 11.0" <mesa-stable@lists.freedesktop.org>
      342e68dc
  2. 09 Sep, 2015 26 commits