Skip to content
Snippets Groups Projects
  1. Jul 19, 2011
    • Ian Romanick's avatar
      mesa: Bump version to 7.11-rc2 · 73b68316
      Ian Romanick authored
      mesa-7.11-rc2
      73b68316
    • Brian Paul's avatar
      7ba75319
    • Kenneth Graunke's avatar
      glsl: Correctly handle function matching when there are multiple inexact matches · 2826e3a0
      Kenneth Graunke authored
      
      This is a squash cherry pick commit of:
      
          glsl: Find the "closest" signature when there are multiple matches.
      
          Previously, ir_function::matching_signature had a fatal bug: if a
          function had more than one non-exact match, it would simply return NULL.
      
          This occured, for example, when looking for max(uvec3, uvec3):
          - max(vec3, vec3)   -> score 1 (found first)
          - max(ivec3, ivec3) -> score 1 (found second...used to return NULL here)
          - max(uvec3, uvec3) -> score 0 (exact match...the right answer)
      
          This did not occur for max(ivec3, ivec3) since the second match found
          was an exact match.
      
          The new behavior is to return a match with the lowest score.  If there
          is an exact match, that will be returned.  Otherwise, a match with the
          least number of implicit conversions is chosen.
      
          Fixes piglit tests max-uvec3.vert and glsl-inexact-overloads.shader_test.
      
          NOTE: This is a candidate for the 7.10 and 7.11 branches.
      
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
          (cherry picked from commit 60eb63a8)
      
          glsl: Suppress warning from matching_signature change.
      
          gcc isn't smart enough to see that we only look at matched_score after
          we've initialized it (because match != NULL happens at the same time)
          (cherry picked from commit b043409a)
      
          glsl: Reject ambiguous function calls (multiple inexact matches).
      
          According to the GLSL 1.20 specification, "it is a semantic error if
          there are multiple ways to apply [implicit] conversions [...] such that
          the call can be made to match multiple signatures."
      
          Fixes a regression caused by 60eb63a8,
          which implemented the wrong policy of finding a "closest" match.
          However, this is not a revert, since the original code failed to
          continue looking for an exact match once it found two inexact matches.
      
          It's OK to have multiple inexact matches if there's also an exact match.
      
          NOTE: This is a candidate for the 7.10 and 7.11 branches.
      
          Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38971
      
      
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
          (cherry picked from commit 7304909d)
      2826e3a0
    • Paul Berry's avatar
      glsl: Ensure that sampler declarations are always uniform or "in" parameters. · f80ae99c
      Paul Berry authored
      This brings us into compliance with page 17 (page 22 of the PDF) of
      the GLSL 1.20 spec:
      
          "[Sampler types] can only be declared as function parameters or
          uniform variables (see Section 4.3.5 "Uniform"). ... [Samplers]
          cannot be used as out or inout function parameters."
      
      The spec isn't explicit about whether this rule applies to
      structs/arrays containing shaders, but the intent seems to be to
      ensure that it can always be determined at compile time which sampler
      is being used in each texture lookup.  So to avoid creating a
      loophole, the rule needs to apply to structs/arrays containing shaders
      as well.
      
      Fixes piglit tests spec/glsl-1.10/compiler/samplers/*.frag, and fixes
      bug 38987.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38987
      
      
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      (cherry picked from commit f0722105)
      f80ae99c
    • Paul Berry's avatar
      glsl: Move type_contains_sampler() into glsl_type for later reuse. · ae11fb02
      Paul Berry authored
      The new location, as a member function of glsl_type, is more
      consistent with queries like is_sampler(), is_boolean(), is_float(),
      etc.  Placing the function inside glsl_type also makes it available to
      any code that uses glsl_types.
      (cherry picked from commit ddc1c963)
      ae11fb02
    • Ian Romanick's avatar
      linker: Only over-ride built-ins when a prototype has been seen · a90b88f3
      Ian Romanick authored
      The GLSL spec says:
      
          "If a built-in function is redeclared in a shader (i.e., a
          prototype is visible) before a call to it, then the linker will
          only attempt to resolve that call within the set of shaders that
          are linked with it."
      
      This patch enforces this behavior.  When a function call is processed
      a flag is set in the ir_call to indicate whether the previously seen
      prototype is the built-in or not.  At link time a call will only bind
      to an instance of a function that matches the "want built-in" setting
      in the ir_call.
      
      This has the odd side effect that first call to abs() in the shader
      below will call the built-in and the second will not:
      
      float foo(float x) { return abs(x); }
      float abs(float x) { return -x; }
      float bar(float x) { return abs(x); }
      
      This seems insane, but it matches what the spec says.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=31744
      (cherry picked from commit 66f4ac98)
      a90b88f3
    • Ian Romanick's avatar
      configure.ac: Make --{without,with}-gallium-drivers work as expected · 0e699cc0
      Ian Romanick authored
      
      This version is mostly Dan's post to the mesa-dev mailing list on
      6/22/2011.
      
      NOTE: This is a candidate for the 7.10 and 7.11 branches.
      
      Signed-off-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Reviewed-by: default avatarDan Nicholson <dbn.lists@gmail.com>
      (cherry picked from commit db311b45)
      0e699cc0
    • Kenneth Graunke's avatar
      i965/gen7: Add support for gl_PointCoord. · e6e7c456
      Kenneth Graunke authored
      
      This is exactly analogous to Eric's Gen6 change in commit
      6861a701.  His explanation:
      
      "This is just like PointSprite overrides, but it's always on for that
       attribute."
      
      Fixes glsl-fs-pointcoord and gtf/point_sprites.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      
      (cherry-picked from commit 186e37c7)
      e6e7c456
    • Kenneth Graunke's avatar
      i965/gen7: Fix point sprite texture coordinate overrides. · 31f4ab79
      Kenneth Graunke authored
      
      This is exactly analogous to Eric's Gen6 change in commit
      f304bb8a.  His explanation:
      
      "We were assuming that the input attribute n to the FS was
       FRAG_ATTRIB_TEXn, which happened to be true often enough for our
       testcases."
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      
      (cherry-picked from commit 147d0102)
      31f4ab79
    • Kenneth Graunke's avatar
      i965/gen7: Refactor SF setup a bit to handle overrides in one place. · 9f978104
      Kenneth Graunke authored
      
      This is exactly analogous to Eric's Gen6 change in commit
      e7280b16.
      
      Signed-off-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      
      (cherry-picked from commit 5edb3ddf)
      9f978104
    • Kenneth Graunke's avatar
      i965/gen7: Remove gratuitous dirty flags from WM and PS state. · 9d789351
      Kenneth Graunke authored
      
      Commit b46dc45c claimed that
      NEW_POLYGONSTIPPLE is gratuitous, but somehow just changed comments
      and whitespace instead of actually removing the flag.
      
      While we're at it, 3DSTATE_PS doesn't appear to need NEW_LINE or
      NEW_POLYGON either (those are in 3DSTATE_WM).  Also, 3DSTATE_WM
      doesn't appear to need BRW_NEW_NR_WM_SURFACES or BRW_NEW_CURBE_OFFSETS
      either (those are in 3DSTATE_PS).
      
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      
      (cherry-picked from commit 57b57f6d)
      9d789351
    • Henri Verbeet's avatar
      glx: Avoid calling __glXInitialize() in driReleaseDrawables(). · d469ebaa
      Henri Verbeet authored
      
      This fixes a regression introduced by commit
      a26121f3 (fd.o bug #39219).
      
      Since the __glXInitialize() call should be unnecessary anyway, this is
      probably a nicer fix for the original problem too.
      
      NOTE: This is a candidate for the 7.10 and 7.11 branches.
      
      Signed-off-by: default avatarHenri Verbeet <hverbeet@gmail.com>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Tested-by: default avatar <padfoot@exemail.com.au>
      (cherry picked from commit 0f20e2e1)
      d469ebaa
    • Lina Versace's avatar
      intel: Fix stencil buffer to be W tiled · f5fa4606
      Lina Versace authored
      
      Until now, the stencil buffer was allocated as a Y tiled buffer, because
      in several locations the PRM states that it is. However, it is actually
      W tiled. From the PRM, 2011 Sandy Bridge, Volume 1, Part 2, Section
      4.5.2.1 W-Major Format:
          W-Major Tile Format is used for separate stencil.
      
      The GTT is incapable of W fencing, so we allocate the stencil buffer with
      I915_TILING_NONE and decode the tile's layout in software.
      
      This fix touches the following portions of code:
          - In intel_allocate_renderbuffer_storage(), allocate the stencil
            buffer with I915_TILING_NONE.
          - In intel_verify_dri2_has_hiz(), verify that the stencil buffer is
            not tiled.
          - In the stencil buffer's span functions, the tile's layout must be
            decoded in software.
      
      This commit mutually depends on the xf86-video-intel commit
          dri: Do not tile stencil buffer
          Author: Chad Versace <chad@chad-versace.us>
          Date:   Mon Jul 18 00:38:00 2011 -0700
      
      On Gen6 with separate stencil enabled, fixes the following Piglit tests:
          bugs/fdo23670-drawpix_stencil
          general/stencil-drawpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-copypixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-drawpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX16-readpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-copypixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-drawpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX1-readpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-copypixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-drawpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX4-readpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-copypixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-drawpixels
          spec/EXT_framebuffer_object/fbo-stencil-GL_STENCIL_INDEX8-readpixels
          spec/EXT_packed_depth_stencil/fbo-stencil-GL_DEPTH24_STENCIL8-copypixels
          spec/EXT_packed_depth_stencil/fbo-stencil-GL_DEPTH24_STENCIL8-readpixels
          spec/EXT_packed_depth_stencil/readpixels-24_8
      
      Note: This is a candidate for the 7.11 branch.
      
      Signed-off-by: default avatarChad Versace <chad@chad-versace.us>
      Reviewed-by: default avatarEric Anholt <eric@anholt.net>
      Reviewed-by: default avatarIan Romanick <ian.d.romanick@intel.com>
      Acked-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      (cherry picked from commit f7dbcba2)
      f5fa4606
  2. Jul 18, 2011
  3. Jul 15, 2011
  4. Jul 14, 2011
  5. Jul 13, 2011
  6. Jul 12, 2011
  7. Jul 11, 2011
Loading