Mesa (7.11): 25 new commits

Ian Romanick idr at kemper.freedesktop.org
Sat Oct 15 04:30:12 UTC 2011


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=07210d5c777add2081b03b4a60af486769d73585
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Jul 9 02:46:03 2011 -0700

    intel: Depth format fixes
    
    This is a squash of:
    
        intel: Recognize all depth formats in get_teximage_readbuffer.
    
        The existing code was missing GL_DEPTH_COMPONENT32, resulting in it
        wrongly returning the color buffer instead of the depth buffer.
    
        Fixes an issue in PlaneShift 0.5.7 when casting spells.  The game calls
        CopyTexSubImage2D on buffers with a GL_DEPTH_COMPONENT32 internal
        format, which (prior to this patch) resulted in an attempt to copy
        ARGB8888 to X8_Z24.
    
        Instead of adding the missing enumeration directly, convert the code to
        use _mesa_is_depth_format() and _mesa_is_depthstencil_format() as these
        should catch any newly added depth formats in the future.
    
        Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
        Reviewed-by: Eric Anholt <eric at anholt.net>
        (cherry-picked from commit 440224ab73ba19a96629c34e21fe976d1395e483)
    
    And:
    
        i915: Fix depth texturing since 86e62b2357447b7c97f434be4834f4b50aa0764d
    
        The 965 driver already had the X8_Z24 case, but 915 was missing it.
    
        Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
        (cherry picked from commit 6aae729d6ec3cb2d5677120742c1180e38815482)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=57a6e6092fc8dd0ba85ceef6268623f84d44d013
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 15 12:02:12 2011 -0700

    intel: Mark MESA_FORMAT_X8_Z24 as always supported.
    
    This prevents developer surprise at seeing a GL_DEPTH_COMPONENT
    texture have stencil bits, and avoids the metaops path accidentally
    copying stencil bits around in glCopyTexImage(GL_DEPTH_COMPONENT) (and
    being broken because swrast's glReadPixels(GL_UNSIGNED_INT_24_8) is
    broken).
    
    Acked-by: Chad Versace <chad at chad-versace.us>
    
    (cherry-picked from commit 86e62b2357447b7c97f434be4834f4b50aa0764d)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5b09cf5c574d74ef362fcb32ecf0a72a746a16fb
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Fri Sep 30 22:10:33 2011 +0100

    i915: out-of-bounds write in calc_live_regs()
    
    From a Coverity defect report.
    
    src/mesa/drivers/dri/i915/i915_fragprog.c
       301  /*
       302   * TODO: consider moving this into core
       303   */
       304  static bool calc_live_regs( struct i915_fragment_program *p )
       305  {
       306      const struct gl_fragment_program *program = &p->FragProg;
       307      GLuint regsUsed = 0xffff0000;
    -> 308      uint8_t live_components[16] = { 0, };
       309      GLint i;
       310
       311      for (i = program->Base.NumInstructions - 1; i >= 0; i--) {
       312          struct prog_instruction *inst =
    &program->Base.Instructions[i];
       313          int opArgs = _mesa_num_inst_src_regs(inst->Opcode);
       314          int a;
       315
       316          /* Register is written to: unmark as live for this and
    preceeding ops */
       317          if (inst->DstReg.File == PROGRAM_TEMPORARY) {
    -> 318              if (inst->DstReg.Index > 16)
       319                 return false;
       320
    -> 321              live_components[inst->DstReg.Index] &= ~inst->DstReg.WriteMask;
       322              if (live_components[inst->DstReg.Index] == 0)
       323                  regsUsed &= ~(1 << inst->DstReg.Index);
       324          }
       325
       326          for (a = 0; a < opArgs; a++) {
       327              /* Register is read from: mark as live for this and preceeding ops */
       328              if (inst->SrcReg[a].File == PROGRAM_TEMPORARY) {
       329                  unsigned c;
       330
       331                  if (inst->SrcReg[a].Index > 16)
       332                     return false;
       333
       334                  regsUsed |= 1 << inst->SrcReg[a].Index;
       335
       336                  for (c = 0; c < 4; c++) {
       337                      const unsigned field = GET_SWZ(inst->SrcReg[a].Swizzle, c);
       338
       339                      if (field <= SWIZZLE_W)
       340                          live_components[inst->SrcReg[a].Index] |= (1U << field);
       341                  }
       342              }
       343          }
       344
       345          p->usedRegs[i] = regsUsed;
       346      }
    
    Reported-by: Vinson Lee <vlee at vmware.com>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=40022
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
    (cherry picked from commit 67582e6eef789324b527b4753065aea366145f4e)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eb0fd67f6acdd6990981c2322eab7d2fa229f66c
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Sep 29 22:24:18 2011 -0700

    glcpp: Add a test for #elif with an undefined macro.
    
    As written, this test correctly raises an error for #elif being used
    with an undefined macro (and not as an argument to "defined"). If the
    preceding #if were '#if 1' then this diagnositc would correctly be
    hidden. That allows code such as the following to not raise an error:
    
    	#ifndef MAYBE_UNDEFINED
    	#elif MAYBE_UNDEFINED < 5
    	...
    	#endif
    
    So this test case is working as expected already. We add it here just
    to improve test coverage.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Signed-off-by: Carl Worth <cworth at cworth.org>
    (cherry picked from commit 201485bae0fcba4db61ceb1e9d9916778b5bba74)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6dfde213630c3aacc42d2920dbe36ebdc33a78f
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Sep 29 21:44:52 2011 -0700

    glcpp: Raise error if defining any macro containing two consecutive underscores
    
    The specification reserves any macro name containing two consecutive
    underscores, (anywhere within the name). Previously, we only raised
    this error for macro names that started with two underscores.
    
    Fix the implementation to check for two underscores anywhere, and also
    update the corresponding 086-reserved-macro-names test.
    
    This also fixes the following two piglit tests:
    
    	spec/glsl-1.30/preprocessor/reserved/double-underscore-02.frag
    	spec/glsl-1.30/preprocessor/reserved/double-underscore-03.frag
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Carl Worth <cworth at cworth.org>
    (cherry picked from commit c4aaf7943c2cdff0e2148b5c05813356dc99696d)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=71bd5d424c81a0f476c132eb18c5a6bae0df1fa0
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Sep 29 17:04:47 2011 -0700

    glcpp: Implement token pasting for non-function-like macros
    
    This is as simple as abstracting one existing block of code into a
    function call and then adding a single call to that function for the
    case of a non-function-like macro.
    
    This fixes the recently-added 097-paste-with-non-function-macro test
    as well as the following piglit tests:
    
    	spec/glsl-1.30/preprocessor/concat/concat-01.frag
    	spec/glsl-1.30/preprocessor/concat/concat-02.frag
    
    Also, the concat-04.frag test now passes for the right reason. The
    test is intended to fail the compilation, but before this commit it
    was failing compilation (and hence passing the test) for the wrong
    reason.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Signed-off-by: Carl Worth <cworth at cworth.org>
    (cherry picked from commit 28842c2331e6df2cbe18c0be3487ece93680075d)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=33e1019d95bb7715f5238c85d17310aa8c142c7d
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Sep 29 17:04:09 2011 -0700

    glcpp: Test a non-function-like macro using the token paste operator
    
    Apparently we never implemented this, (but we've got a GLSL 1.30 test
    in piglit that is exercising this case).
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Signed-off-by: Carl Worth <cworth at cworth.org>
    (cherry picked from commit 7bb3403e0172a440b8100bcf1db8462f50a254cc)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ab94d6f902a8079c15e4e4b608e99f839f414a02
Author: Carl Worth <cworth at cworth.org>
Date:   Thu Sep 29 16:51:08 2011 -0700

    glcpp: Fix two (or more) successive applications of token pasting
    
    There was already a loop here to look for multiple token pastes, but
    it was mistakenly incrementing the iterator counter after performing
    one paste.
    
    Instead, leave the loop iterator in place to coalesce as many tokens
    as necessary into one.
    
    This fixes the recently add 096-paste-twice test as well as the
    following piglit test:
    
    	spec/glsl-1.30/preprocessor/concat/concat-03.frag
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Signed-off-by: Carl Worth <cworth at cworth.org>
    (cherry picked from commit 3c01a589448b92945f26bd7e3bfa75155c06f3cf)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5becf89a174dd9037af6c3f8b815cb7041b7db52
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Feb 10 13:20:26 2011 -0800

    i915: Only emit program errors when INTEL_DEBUG=wm or INTEL_DEBUG=fallbacks
    
    This makes piglit a lot more happy.  The errors are logged when
    INTEL_DEBUG=fallbacks because the application is about to hit a big
    software fallback.  We frequently ask people to run applications that
    are hitting software fallbacks with INTEL_DEBUG=fallbacks so the we
    can help them debug the reason for the software fallback.
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 0290a018a50bd4a3180af3233f145f4de7b63706)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13a2d4a985ab58348f81bc03de4e6ac08357705f
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jul 25 16:41:39 2011 -0700

    i915: Fail without crashing if a Mesa IR program uses too many registers
    
    This can only happen in GLSL shaders because assembly shaders that use
    too many temps are rejected by core Mesa.  It is easiest to make this
    happen with shaders that contain flow-control that could not be lowered.
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 3bb2f0dde1cd813a0b5e0b45be376f4d6606aeb8)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2d166583df2307404a6516aed6e9942f6c673ce
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jul 25 15:58:07 2011 -0700

    ir_to_mesa: Emit warnings instead of errors for IR that can't be lowered
    
    Rely on the driver to do the right thing.  This probably means falling
    back to software.  Page 88 of the OpenGL 2.1 spec specifically says:
    
        "A shader should not fail to compile, and a program object should
        not fail to link due to lack of instruction space or lack of
        temporary variables. Implementations should ensure that all valid
        shaders and program objects may be successfully compiled, linked
        and executed."
    
    There is no provision for saying "No" to a valid shader that is
    difficult for the hardware to handle, so stop doing that.
    
    On i915 this causes a large number of piglit tests to change from FAIL
    to WARN.  The warning is because the driver still emits messages to
    stderr like "i915_program_error: Unsupported opcode: BGNLOOP".
    
    It also fixes ES2 conformance CorrectFull_frag and CorrectParse1_frag
    on i915 (and probably other hardware that can't handle loops).
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 322c3bf9dc4c6edbf5a8793475ce1307e1c0186b)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=49d2c552a5a76e11730b113d0dfd7e507971b52a
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Mon Jul 25 15:55:59 2011 -0700

    ir_to_mesa: Use Add linker_error instead of fail_link
    
    The functions were almost identical.
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 8aadd89d07d750aadd10989fa9c81f8a2fdd98e2)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a864b15b83f6d4de5929438c625f938fc9c97511
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jul 28 15:10:17 2011 -0700

    mesa: Ensure that gl_shader_program::InfoLog is never NULL
    
    This prevents assertion failures in ralloc_strcat.  The ralloc_free in
    _mesa_free_shader_program_data can be omitted because freeing the
    gl_shader_program in _mesa_delete_shader_program will take care of
    this automatically.
    
    A bunch of this code could use a refactor to use ralloc a bit more
    effectively.  A bunch of the things that are allocated with malloc and
    owned by the gl_shader_program should be allocated with ralloc (using
    the gl_shader_program as the context).
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 89193933cbd322cd08fb54232411a8a9221fcca8)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e458c3ddbbd8713f78b75a73bd80f75311ebeca3
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jul 28 14:09:06 2011 -0700

    linker: Make linker_{error,warning} generally available
    
    linker_warning is a new function.  It's identical to linker_error
    except that it doesn't set LinkStatus=false and it prepends "warning: "
    on messages instead of "error: ".
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 379a32f42ebca9feeb024633f7774661619fd62e)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8a46f910d3f0b25471f0a38f7f0a9237c099400
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jul 28 14:04:09 2011 -0700

    linker: Make linker_error set LinkStatus to false
    
    Remove the other places that set LinkStatus to false since they all
    immediately follow a call to linker_error.  The function linker_error
    was previously known as linker_error_printf.  The name was changed
    because it may seem surprising that a printf function will set an
    error flag.
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 586e741ac1fa222d041990b265e820f5aa11344d)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=eca2a91a9bcb3c36c1ca55dbffdca9bcb30fae9c
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Oct 7 11:59:06 2011 -0700

    i965: Fix inconsistent indentation in brw_eu_emit.c.
    
    Most of these functions used three spaces for the first level of
    indentation, but four spaces for the next level.  One used tabs and then
    three spaces.  Some used 3/4 in a then block but 3/3 in the else block.
    
    Normally I try to avoid field days like this, but since the functions
    were so inconsistent, even internally, it was making it difficult to
    edit without introducing spurious whitespace changes.
    
    So, just get it over with.  git diff -b shows 0 lines changed.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit b861479f83ea140bfe24357d09f18a6d026d97b5)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1f083e183960af0f3e0ecf7df793fdb6c643aada
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Sep 26 23:57:40 2011 -0700

    i965: Allow SIMD16 color writes on Ivybridge.
    
    Again, the check was needlessly specific: this works fine on Gen7.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 7db874bf4c4273d2d46218b1490d312fe2654284)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9bbf2a343f18a728d88585072b4e0525941b31ef
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Sep 26 23:57:39 2011 -0700

    i965/fs: Allow SIMD16 with control flow on Ivybridge.
    
    The check was designed to forbid it on old generations (Gen5/Ironlake),
    not on new ones.  It just works on Gen7/Ivybridge.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit ae5da817e2aeb9f9447fdd6d2eb4b22d6f8f6a87)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=38dfedccb2a2b695a600350a75113e8c35683498
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Thu Sep 1 04:18:20 2011 -0700

    i965: Emit depth stalls and flushes before changing depth state on Gen6+.
    
    Fixes OpenArena on Gen7.  Technically, adding only the first depth stall
    fixes it, but the documentation says to do all three, and the Windows
    driver seems to do it.
    
    Not observed to fix anything on Gen6 yet.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=38863
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 02c4dc807e91640c69c8addc3c797300a3c536ad)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1e0e116d6d0f974805423fa322eaf07a62be4c88
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Fri Sep 23 23:32:56 2011 -0700

    i965: Fix incorrect maximum PS thread count shift on Ivybridge.
    
    At one point, the documentation said that max thread count in 3DSTATE_PS
    was at bit offset 23, but it's actually 24 on Ivybridge.  Not only did
    this halve our thread count, it caused us to write 1 into a bit 23, which
    is marked as MBZ (must be zero).  Furthermore, it made us write an even
    number into this field, which is apparently not allowed.  Apparently we
    were just lucky it worked.
    
    NOTE: This is a candidate for the 7.11 branch.
    
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    (cherry picked from commit 556e7eea80de778b44a37d51cb757ce32221d1e3)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aaadd4c1114b53b358d7dca81335a524cdb157c5
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Sep 19 09:26:50 2011 -0700

    i965: Fix polygon stipple offset state flagging.
    
    _NEW_WINDOW_POS wasn't a real Mesa state flag, but we were missing
    _NEW_BUFFERS to update the stipple offset when FBO binding or window
    size changed, and _NEW_POLYGON to update when stippling gets enabled.
    
    Fixes oglconform's tristrip test.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
    (cherry picked from commit d598851d401f7f34d623c9cfbd85d7f5faccd7c2)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0d31b130bb83b6e045444ae43af233130aa9d317
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Sep 19 09:25:49 2011 -0700

    i965: Add missing _NEW_POLYGON flag to polygon stipple upload.
    
    Because we skip the pattern upload when stippling is disabled, we need
    to check again when it might have been turned on.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Yuanhan Liu <yuanhan.liu at linux.intel.com>
    (cherry picked from commit e19541aa2ad05f687c859001b62713209787c9c8)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e4b1dce9ec7a42245c494d6f3b7dfe492f1cc896
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Mon Aug 15 12:04:37 2011 -0700

    i965: Use proper texture alignment units for cubemaps on Gen5+.
    
    In particular, S3TC compressed textures need align_h == 4.
    
    Fixes skybox errors in Quake 4 and FEAR.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34628
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit e0e688ca5441e2c8bc59ec7488bc1bc4ba196602)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f87fe948a4ed0e193328af6f0a029f19e3c8c93
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Sat Jul 30 16:44:49 2011 -0700

    i965/gen5+: Fix incorrect miptree layout for non-power-of-two cubemaps.
    
    For power-of-two sizes, h0 == mt->height0 since it's already a multiple
    of two.  However, for NPOT, they're different; h1 should be computed
    based on the original size.
    
    Fixes piglit test "cubemap npot" and oglconform test "textureNPOT".
    
    NOTE: This is a candidate for stable release branches.
    
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit bebc19448f45dbe8c3b016d440403f52e1036e15)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f484fc7476ae87bc0aca20a278ff00c7fd12cd2f
Author: Eric Anholt <eric at anholt.net>
Date:   Mon Jul 25 18:50:43 2011 -0700

    i965/fs: Respect ARB_color_buffer_float clamping.
    
    This was done in the old codegen path, but not the new one.  Caught by
    piglit fbo tests after the conversion to GLSL ff_fragment_shader.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit da53ca641106e47f1d74386d8dc0f7eebeec5225)




More information about the mesa-commit mailing list