Mesa (10.1): 33 new commits

Carl Worth cworth at kemper.freedesktop.org
Mon May 5 18:29:21 UTC 2014


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bde31357170e5cbf70795434e9725bb442f31137
Author: Carl Worth <cworth at cworth.org>
Date:   Mon May 5 10:53:53 2014 -0700

    docs: Add notes for the 10.1.2 release.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=75049062d5e81524941cac62cd3cd322df7fa85b
Author: Carl Worth <cworth at cworth.org>
Date:   Mon May 5 10:50:49 2014 -0700

    Update VERSION to 10.1.2
    
    In preparation for the 10.1.2 release.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d648f0f50c41ba63b3e871b35654ec5a96e5bd9
Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Feb 20 11:47:14 2014 -0800

    dri3: Enable GLX_MESA_query_renderer on DRI3 too
    
    This should have happend around the time of commit 4680d23, but Keith's
    DRI3 patches and my GLX_MESA_query_renderer patches crossed in the mail.
    
    I don't have a working DRI3 setup, so I haven't been able to actually
    verify this.  I'm hoping that someone can piglit this for me on DRI3...
    It's also unfortunate the DRI2 and DRI3 can't share more code.
    
    Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
    Cc: Keith Packard <keithp at keithp.com>
    Cc: "10.1" <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    (cherry picked from commit 625bdd64e5ea3327d4459b1ccccff8dab89129d0)
    
    Conflicts:
    	src/glx/dri3_glx.c
    
    During the cherry-pick, the following commit was squashed in as well:
    
    glx: Conditionally compile GLX_MESA_query_renderer DRI3 support
    
    Missed out with commit 625bdd64e5ea3327d4459b1ccccff8dab89129d0.
    
    Cc: "10.1" <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    (cherry picked from commit 0b307afd57082f0d4a0e8ba19093d313c9fb46ad)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff117336b7a7bb3b2fae2788a215f0524bbd7357
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Thu May 1 15:45:04 2014 -0700

    glsl: Apply the link error conditions to GL_ARB_fragment_coord_conventions
    
    Link error conditions added in previous patch are equally applicable
    to GL_ARB_fragment_coord_conventions implementation. Extension's spec
    says:
       "If gl_FragCoord is redeclared in any fragment shader in a program,
        it must be redeclared in all the fragment shaders in that program
        that have a static use of gl_FragCoord. All redeclarations of
        gl_FragCoord in all fragment shaders in a single program must have
        the same set of qualifiers."
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 9bcb0a85321c128b6e5ff8fc6694c2eff613e65a with some
    manual backporting)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2cd8ce4c67b1966f1957e2710cd87b92d38d3122
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Thu May 1 15:43:17 2014 -0700

    glsl: Link error if fs defines conflicting qualifiers for gl_FragCoord
    
    GLSL 1.50 spec says:
       "If gl_FragCoord is redeclared in any fragment shader in a program,
        it must be redeclared in all the fragment shaders in that
        program that have a static use gl_FragCoord. All redeclarations of
        gl_FragCoord in all fragment shaders in a single program must
        have the same set of qualifiers."
    
    This patch causes the shader link to fail if we have multiple fragment
    shaders with conflicting layout qualifiers for gl_FragCoord.
    
    V2: Restructure the code and add conditions to correctly handle the
        following case:
    
    fragment shader 1:
    layout(origin_upper_left) in vec4 gl_FragCoord;
    void main()
    {
        foo();
        gl_FragColor = gl_FragData;
    }
    
    fragment shader 2:
    layout(pixel_center_integer) in vec4 gl_FragCoord;
    void foo()
    {
    }
    
    V3:
    Allow linking in the following case:
    fragment shader 1:
    void main()
    {
        foo();
        gl_FragColor = gl_FragCoord;
    }
    
    fragment shader 2:
    in vec4 gl_FragCoord;
    void foo()
    {
       ...
    }
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    
    (cherry picked from commit 35f11e85cbe82b4bb77535e84e5515a5c49f67a6 with some
    manual backporting)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ec70be5628b0941767964cff6135b5ba0bf20766
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Thu May 1 15:37:48 2014 -0700

    glsl: Use switch to allow adding more shader types
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: <mesa-stable at lists.freedesktop.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2d9bfe4bf424ed234c276d7ca80348e9d10a6e43
Author: Carl Worth <cworth at cworth.org>
Date:   Thu May 1 15:00:24 2014 -0700

    cherry-ignore: Drop an ignored patch now that piglit has been updated.
    
    This patch was ignored when we saw it causing a piglit test to regress. That
    piglit test has been determined to have been incorrect. It has been fixed so
    that this patch is now clearly a bug fix, not a regression.

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=efba496d03c597be4838aa9ed22b914ad3931df2
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Apr 4 16:49:19 2014 -0700

    i965: Add glBlitFramebuffer to commands affected by conditional rendering
    
    Fixes failures in Khronos OpenGL CTS test conditional_render_test9
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit 1d350b9e228462390b1883abace24c15d4741932)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=853c313ce3c9fe82b6500320ecaecf75202935d6
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 21 11:19:42 2014 -0700

    mesa: Allow FLOAT_32_UNSIGNED_INT_24_8_REV in get_tex_depth_stencil()
    
    Fixes a crash in Khronos OpenGL CTS packed_pixels tests.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit c1743707a1286a71eb4e82b976eb3f1815f2ecf4)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2981bc9ff8511e2277bcaae7a22c23f64d67bf18
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 21 11:16:00 2014 -0700

    mesa: Add support to unpack depth-stencil texture in to FLOAT_32_UNSIGNED_INT_24_8_REV
    
    V2: Follow the new naming convention for unpack functions.
        Use double precision for converting Z24 to a float.
    V3: Unpack stencil value to most significant byte.
        Use 'struct z32f_x24s8' type.
    V4: Unpack stencil value to least significant byte.
        Add a comment to clarify stencil packing.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Brian Paul <brianp at vmware.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 29b8e894d15cf960c624189fad7d0cf1fdc9c405)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=18e6cd5e6172aaeef377290c262c3a685ec9e66d
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 21 11:05:55 2014 -0700

    mesa: Add new helper function _mesa_unpack_depth_stencil_row()
    
    This patch makes non-functional changes in the code. New helper
    function added here will make it easier to support more data
    types in the following patches.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 7a8045d2f7b7f749a555dbe5f51c327ab0cd6cc8)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=4ee60a14df5c04991f9b7d3f4902828ec68d8d5c
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 21 13:07:13 2014 -0700

    mesa: Allow srcFormat=GL_DEPTH_STENCIL in _mesa_texstore_xx_xx() functions
    
    _mesa_texstore_z24_s8() and _mesa_texstore_z32f_x24s8() are capable of
    handling GL_DEPTH_STENCIL format. So, allow it in both the functions.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 1a8f9ba9b3aa8bed2047ff7c0b5816edb9c9cb62)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2b5ad9baa149917c076dab75657163b25718b83d
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 21 12:55:19 2014 -0700

    mesa: Add missing types in _mesa_texstore_xx_xx() functions
    
    Depth-stencil teture targets are allowed to use source data of type
    GL_UNSIGNED_INT_24_8_EXT and GL_FLOAT_32_UNSIGNED_INT_24_8_REV.
    
    Fixes few crashes in Khronos OpenGL CTS packed_pixels tests.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit aeb9d4495dc32bcb457045b4ea8f4e5f0d4fc8c8)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87173023b285c45c27deac70aae7792e3c75b895
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Wed Mar 19 11:55:50 2014 -0700

    i965: Fix crash in do_blit_readpixels()
    
    Fixes a crash in Khronos CTS packed_pixels tests.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit d714b20eb4617f24b496a09028a90fdd8c19b5bd)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=51e80d1a8b02438b6f9fe85370ca1a434ac1bc13
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Mar 18 16:52:24 2014 -0700

    mesa: Add error condition for format=STENCIL_INDEX in glGetTexImage()
    
    From OpenGL 4.0 spec, page 306:
       "Calling GetTexImage with a format of STENCIL_INDEX
        causes the error INVALID_ENUM."
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 5388fc157e2b78d67a05dc923b98857e6449cf1e)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=755bf62c2eb255d438ed992860b85ee72d99c46b
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Mar 18 16:49:03 2014 -0700

    mesa: Add entry for extension ARB_texture_stencil8
    
    V2: Alphabetize the new entry
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 340658e44f87c98e840b98029c9b5a81d1bed837)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=81f98ffb61a60525d991ba8b9b702b141b2192de
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Thu Feb 20 18:32:25 2014 -0800

    glsl: Compile error if fs uses gl_FragCoord before first redeclaration
    
    Section 4.3.8.1, page 39 of GLSL 1.50 spec says:
      "Within any shader, the first redeclarations of gl_FragCoord
       must appear before any use of gl_FragCoord."
    
    GLSL compiler should generate an error in following case:
    
    vec4 p = gl_FragCoord;
    layout(origin_upper_left) in vec4 gl_FragCoord;
    
    void main()
    {
    }
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit a751adf07117ec4b3659fe60d0a833ebfcd4f840)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=072a79b18893a09a2ffc44cc9ce7898a26af14f9
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Feb 4 10:38:18 2014 -0800

    glsl: Compile error if fs defines conflicting qualifiers for gl_FragCoord
    
    GLSL 1.50 spec says:
       "If gl_FragCoord is redeclared in any fragment shader in a program,
        it must be redeclared in all the fragment shaders in that
        program that have a static use gl_FragCoord. All redeclarations of
        gl_FragCoord in all fragment shaders in a single program must
        have the same set of qualifiers."
    
    This patch makes the glsl compiler to generate an error if we have a
    fragment shader defined with conflicting layout qualifier declarations
    for gl_FragCoord. For example:
    
    layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
    layout(pixel_center_integer) in vec4 gl_FragCoord;
    
    void main()
    {
    }
    
    V2: Some code refactoring for better readability.
        Add compiler error conditions for redeclarations like:
    
    layout(origin_upper_left) in vec4 gl_FragCoord;
    layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
    
    and
    
    in vec4 gl_FragCoord;
    layout(origin_upper_left, pixel_center_integer) in vec4 gl_FragCoord;
    
    V3: Simplify function is_conflicting_fragcoord_redeclaration()
    V4: Check for null pointer before doing strcmp(var->name, "gl_FragCoord").
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 581e4acb0d68eb1063df3919e19e0ef9d86eebff)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=87655f18051e19a5fac9d551c1a6013d4d9916e7
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Fri Mar 28 17:44:59 2014 -0700

    mesa: Use location VERT_ATTRIB_GENERIC0 for vertex attribute 0
    
    In OpenGL 3.1 attribute 0 becomes non-magic, just like in
    OpenGL ES 2.0. Earlier versions of OpenGL used attribute 0
    exclusively for vertex position.
    
    V2: Add a utility function _mesa_attr_zero_aliases_vertex() in
        varray.h
    
    Fixes 4 Khronos OpenGL CTS failures:
    glGetVertexAttrib
    depth24_basic
    depth24_precision
    rgb8_rgba8_rgb
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 49c71050de1e0df451e29621558b4adfefb7e098)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3c6c42b86d5c4f1dbc7c6d36c3429598ac851ebc
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Wed Apr 2 13:01:43 2014 -0700

    mesa: Fix querying location of nth element of an array variable
    
    This patch makes changes to the behavior of glGetAttribLocation(),
    glGetFragDataLocation() and glGetFragDataIndex() functions.
    
    Code changes handle a case described in following example:
    
    shader program:
    layout(location = 1)in vec4[4] a;
    void main()
    {
    }
    
    Currently, glGetAttribLocation("a") returns 1.
    glGetAttribLocation("a[i]"), where i = {0, 1, 2, 3}, returns -1.
    But the expected locations for array elements are: 1, 2, 3 and 4
    respectively.
    
    This clarification came up with the addition of
    ARB_program_interface_query to OpenGL 4.3.
    
    From Page 326 (page 347 of the PDF) of OpenGL 4.3 spec:
       "Otherwise, the command is equivalent to
    
        GetProgramResourceLocation(program, PROGRAM_INPUT, name);"
    
    And, From Page 101 (page 122 of the PDF) of OpenGL 4.3 spec:
    
       "A string provided to GetProgramResourceLocation or
        GetProgramResourceLocationIndex is considered to match an active
        variable if
    
        • the string exactly matches the name of the active variable;
        • if the string identifies the base name of an active array, where
          the string would exactly match the name of the variable if the
          suffix "[0]" were appended to the string; or
        • if the string identifies an active element of the array, where
          the string ends with the concatenation of the "[" character, an
          integer (with no "+" sign, extra leading zeroes, or whitespace)
          identifying an array element, and the "]" character, the integer
          is less than the number of active elements of the array variable,
          and where the string would exactly match the enumerated name of
          the array if the decimal integer were replaced with zero."
    
    V2: Simplify get_matching_index() function.
        Add relevant text from OpenGL spec in commit message.
    
    Fixes failures in Khronos OpenGL CTS tests:
    explicit_attrib_location_room
    draw_instanced_max_vertex_attribs
    
    Proprietary linux drivers of NVIDIA (331.49) matches the behavior
    expected by OpenGL 4.3 spec.
    
    Cc: <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit dc75479b7a7b9207d9d7c9487085ad14fa5d26cc)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8792eda0eb01053136d351d51943e7f465ab2fe9
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date:   Tue Mar 4 17:03:28 2014 -0800

    glsl: Allow overlapping locations for vertex input attributes
    
    Currently overlapping locations of input variables are not allowed for all
    the shader types in OpenGL and OpenGL ES.
    
    From OpenGL ES 3.0 spec, page 56:
       "Binding more than one attribute name to the same location is referred
        to as aliasing, and is not permitted in OpenGL ES Shading Language
        3.00 vertex shaders. LinkProgram will fail when this condition exists.
        However, aliasing is possible in OpenGL ES Shading Language 1.00 vertex
        shaders."
    
    Taking in to account what different versions of OpenGL and OpenGL ES specs
    say about aliasing:
       - It is allowed only on vertex shader input attributes in OpenGL (2.0 and
         above) and OpenGL ES 2.0.
       - It is explictly disallowed in OpenGL ES 3.0.
    
    Fixes Khronos CTS failing test:
    explicit_attrib_location_vertex_input_aliased.test
    See more details about this at below mentioned khronos bug.
    
    V2: Fix the case where location exceeds the maximum allowed attribute
        location.
    V3: Simplify the condition added in V2.
    
    Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
    Cc: "9.2 10.0 10.1" <mesa-stable at lists.freedesktop.org>
    Bugzilla: Khronos #9609
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    (cherry picked from commit 8c61b6a99b221439a8109c5a5cd03b7bf065d373)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0860c95d5c1bab676095e28f3a4afab5fd50d817
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Tue Apr 29 14:29:28 2014 -0700

    i965: Actually emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS.
    
    For platforms using hardware contexts (currently Gen6+), we failed to
    emit PIPELINE_SELECT and 3DSTATE_VF_STATISTICS, instead emitting MI_NOOP
    for both.
    
    During one of the context initialization reordering patches, we
    accidentally moved brw_init_state before we set brw->CMD_PIPELINE_SELECT
    and brw->CMD_VF_STATISTICS.  So, when brw_init_state uploaded initial
    GPU state (brw_init_state -> brw_upload_initial_gpu_state ->
    brw_upload_invariant_state), these would be 0 (MI_NOOP).
    
    Storing the commands in the context is not worthwhile.  We have many
    generation checks in our state upload code, and for platforms with
    hardware contexts, this only gets called once per GL context anyway.
    The cost is negligable, and it's easy to botch context creation
    ordering.
    
    This may fix hangs on Gen6+ when using the media pipeline.
    
    Cc: "10.0 10.1" <mesa-stable at lists.freedesktop.org>
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Eric Anholt <eric at anholt.net>
    Reviewed-by: Ben Widawsky <ben at bwidawsk.net>
    (cherry picked from commit ac30e1adb49ec6947f740b47d90f8403fe416314)
    
    Conflicts:
    	src/mesa/drivers/dri/i965/brw_context.h

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f4b0b3a40293b782d4759cfff34e3cf13b7ed339
Author: Kenneth Graunke <kenneth at whitecape.org>
Date:   Wed Mar 12 01:43:40 2014 -0700

    i965: Don't enable reset notification support on Gen4-5.
    
    arekm reported that using Chrome with GPU acceleration enabled on GM45
    triggered the hw_ctx != NULL assertion in brw_get_graphics_reset_status.
    
    We definitely do not want to advertise reset notification support on
    Gen4-5 systems, since it needs hardware contexts, and we never even
    request a hardware context on those systems.
    
    Cc: "10.1" <mesa-stable at lists.freedesktop.org>
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=75723
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    (cherry picked from commit 0380ec467d78f40b5c8134158ca48b4c5378b282)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f9f10f681ea6f4e82df40e52f1466e4ca38b012c
Author: Eric Anholt <eric at anholt.net>
Date:   Fri Apr 25 16:37:32 2014 -0600

    i965: Fix render-to-texture in non-FinishRenderTexture cases.
    
    We've had several problems now with FinishRenderTexture not getting called
    enough, and we're ready to just give up on it ever doing what we need.  In
    particular, an upcoming Steam title had rendering bugs that could be fixed
    by always_flush_cache=true.
    
    Instead of hoping Mesa core can figure out when we need to flush our
    caches, just track what BOs we've rendered to in a set, and when we render
    from a BO in that set, emit a flush and clear the set.
    
    There's some overhead to keeping this set, but most of that is just
    hashing the pointer -- it turns out our set never even gets very large,
    because cache flushes are so common (even on cairo-gl).
    
    No statistically significant performance difference in cairo-gl (n=100),
    despite spending ~.5% CPU in these set operations.
    
    v1: (Original patch by Eric Anholt.)
    v2: (Changes by Ken Graunke.)
      - Rebase forward from May 7th 2013 -> March 4th 2014.
      - Drop the FinishRenderTexture hook entirely; after rebasing the
        patch, the hook was just an empty function.
      - Move the brw_render_cache_set_clear() call from
        intel_batchbuffer_emit_flush() to brw_emit_pipe_control_flush().
        In theory, this could catch more cases where we've flushed.
      - Consider stencil as a possible texturing source.
    v3: (changes by anholt):
      - Move set_clear() back to emit_mi_flush() -- it means we can drop
        more forced flushes from the code.  In the previous location, it
        wouldn't have been called when we wanted pre-gen6.
      - Move the set clear from batch init to reset -- it should be empty at
        the start of every batch, since the kernel handled any inter-batch
        flush for us.
    v4: Drop the debug code in set.c that I accidentally committed.
    v5: Back port to 10.1 stable branch (remove reference to stencil texture.)
    
    Signed-off-by: Eric Anholt <eric at anholt.net>
    Signed-off-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Tested-by: Dylan Baker <baker.dylan.c at gmail.com> [v2]
    
    Conflicts:
    	src/mesa/drivers/dri/i965/brw_draw.c
    	src/mesa/drivers/dri/i965/intel_fbo.h

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=996fbd4e2b61452870e85fa806c75f440efb3ad0
Author: Carl Worth <cworth at cworth.org>
Date:   Wed Apr 30 15:50:34 2014 -0700

    cherry-ignore: Ignore a patch causing a regression
    
    This may be just a bogus test. I'm waiting to see what the bugzilla decides:
    
    https://bugs.freedesktop.org/show_bug.cgi?id=77702

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e19c702eac760e45eff808aa2a70a8ec674c8cd1
Author: Michel Dänzer <michel.daenzer at amd.com>
Date:   Fri Apr 25 11:40:39 2014 +0900

    st/mesa: Fix NULL pointer dereference for incomplete framebuffers
    
    This can happen with glamor, which uses EGL_KHR_surfaceless_context and
    only explicitly binds GL_READ_FRAMEBUFFER for glReadPixels.
    
    Cc: mesa-stable at lists.freedesktop.org
    Reviewed-by: Brian Paul <brianp at vmware.com>
    (cherry picked from commit 136c437cea3ebc9541735bb40951128e1210f06b)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5d680bc0826aa10ecf8730d2f499ce65cff1444a
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Date:   Tue Apr 8 23:28:42 2014 +0300

    egl: Protect use of gbm_dri with ifdef HAVE_DRM_PLATFORM
    
    Otherwise it fails to compile if the drm egl platform is disabled.
    
    Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    (cherry picked from commit 17860309f17de78e729f77e86101004f61f6bcf3)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e43327bdd9daea809376a292db39ef9459f9ce44
Author: Neil Roberts <neil at linux.intel.com>
Date:   Tue Apr 8 23:28:40 2014 +0300

    wayland: Fix the logic in disabling the prime capability
    
    It looks like this bit of code is trying to disable the prime capability if
    the driver doesn't support createImageFromFds. However the logic looks a bit
    broken and what it would actually do is disable all other capabilities apart
    from prime. This patch fixes it to actually disable prime.
    
    Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    (cherry picked from commit 63d4661ab28c036ab000f94812a91d93d538a72a)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c8ac5294eba37132628d9eca37c06b0a41f51fee
Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira at intel.com>
Date:   Tue Apr 8 23:28:38 2014 +0300

    gbm/dri: Fix out-of-memory error path in dri_device_create()
    
    Cc: "10.0" "10.1" <mesa-stable at lists.freedesktop.org>
    Reviewed-by: Emil Velikov <emil.l.velikov at gmail.com>
    (cherry picked from commit aa91fe1c09e066751c5419adb7810745336bd051)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d40418043079d705264d19d68bfa106310f309eb
Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 20 18:17:51 2014 +0200

    r600g: fix hang on RV740 by using DX_RASTERIZATION_KILL instead of SX_MISC
    
    Changing SX_MISC hangs RV740. When we're at it, let's use DX_RASTERIZATION_KILL
    on all R700 and later chipsets.
    
    Cc: 10.0 10.1 mesa-stable at lists.freedesktop.org
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    (cherry picked from commit 3a3b1bf60e0ef233a8610684a7472e3600d0e65e)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c7adf5d1c7a93681c1f75fe90620aacfa650ef80
Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 20 18:11:56 2014 +0200

    r600g: fix for an MSAA hang on RV770
    
    Cc: 10.0 10.1 mesa-stable at lists.freedesktop.org
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    (cherry picked from commit 3d0c4f3b01569f43318e648786ae79f7b6b4948e)

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=62ba29b2366eee4f1a07f0bc357312c2803d2642
Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 20 15:19:43 2014 +0200

    r600g: fix for broken CULL_FRONT behavior on R6xx
    
    Cc: mesa-stable at lists.freedesktop.org
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    (cherry picked from commit ecc8a37ec5be7fca79205f08666fb76474ab5c0d)
    
    Conflicts:
    	src/gallium/drivers/r600/r600_pipe.h

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8ea3790d49bf076bf39c130d5221dd701d28825f
Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 20 00:53:32 2014 +0200

    r600g: fix buffer copying on R600-R700
    
    This fixes broken rendering in DOTA 2.
    
    Cc: 10.0 10.1 mesa-stable at lists.freedesktop.org
    Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
    (cherry picked from commit 0967970768c517c8c2f1a969e0a043982b4b1bf7)




More information about the mesa-commit mailing list