Mesa (master): 36 new commits

Paul Berry stereotype441 at kemper.freedesktop.org
Fri Aug 2 03:41:51 UTC 2013


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=34c55b59251a9c6e9979c1c0094c5158ce3503cb
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sun Jul 28 21:48:55 2013 -0700

    main: Warn that geometry shader support is experimental.
    
    Geometry shader support in the Mesa front end is still fairly
    preliminary.  Many features are untested, and the following things are
    known not to work:
    
    - The gl_in interface block
    - The gl_ClipDistance input
    - Transform feedback of geometry shader outputs
    - Constants that are new in GLSL 1.50 (e.g. gl_MaxGeometryInputComponents)
    
    This isn't a problem, since no back-end drivers currently enable
    geometry shaders.  However, to make sure no one gets the wrong
    impression, emit a nasty warning to let the user know that geometry
    shader support isn't complete.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7cfefe6965d50d8b1b494396d7b3b16d87bb2060
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Jul 30 21:13:48 2013 -0700

    glsl: Implement rules for geometry shader input sizes.
    
    Section 4.3.8.1 (Input Layout Qualifiers) of the GLSL 1.50 spec
    contains some tricky rules for how the sizes of geometry shader input
    arrays are related to the input layout specification.  In essence,
    those rules boil down to the following:
    
    - If an input array declaration does not specify a size, and it
      follows an input layout declaration, it is sized according to the
      input layout.
    
    - If an input layout declaration follows an input array declaration
      that didn't specify a size, the input array declaration is given a
      size at the time the input layout declaration appears.
    
    - All input layout declarations and input array sizes must ultimately
      match.  Inconsistencies are reported as soon as they are detected,
      at compile time if the inconsistency is within one compilation unit,
      otherwise at link time.
    
    - At least one compilation unit must contain an input layout
      declaration.
    
    (Note: the geom_array_resize_visitor class was contributed by Bryan
    Cain <bryancain3 at gmail.com>.)
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=20ae8e0c9168d900246d5940e07cf668dba8f0ce
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 24 14:57:24 2013 -0700

    glsl: Allow geometry shader input instance arrays to be unsized.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c1f1d8522c4650f55fac3a57466c9788f80f82f6
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Mon Jul 22 11:44:24 2013 -0700

    glsl: Permit non-ubo input interface arrays to use non-const indexing.
    
    From the GLSL ES 3.00 spec:
    
        "All indexes used to index a uniform block array must be constant
        integral expressions."
    
    Similar text exists in GLSL specs since 1.50.
    
    When we implemented this, the only type of interface block supported
    by Mesa was uniform blocks, so we required all indexes used to index
    any interface block to be constant integral expressions.
    
    Now that we are adding interface block support for GLSL 1.50, we need
    a more specific check.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6065a87bce0c3fb0d9694c381c5a31b63e1f0300
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 12 18:12:40 2013 -0700

    glsl: Cross-validate GS layout qualifiers while intrastage linking.
    
    This gets piglit's geometry-basic test running.
    
    TODO: Still need to validate that the GS layout qualifiers don't get used
    in places they shouldn't (like an interface block, or a particular shader
    input or output)
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=010a6a8fd343537101e7ac5e8dfcf9b07fc841fb
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 12 17:21:44 2013 -0700

    glsl: Export the compiler's GS layout qualifiers to the gl_shader.
    
    Next step is to validate them at link time.
    
    v2 (Paul Berry <stereotype441 at gmail.com>): Don't attempt to export the
    layout qualifiers in the event of a compile error, since some of them
    are set up by ast_to_hir(), and ast_to_hir() isn't guaranteed to have
    run in the event of a compile error.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    
    v3 (Paul Berry <stereotype441 at gmail.com>): Use PRIM_UNKNOWN to
    represent "not set in this shader".
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=624b7bac76c3f70a3a110d114a3c1c327d3dad5f
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 12 14:03:49 2013 -0700

    glsl: Parse the GLSL 1.50 GS layout qualifiers.
    
    Limited semantic checking (compatibility between declarations, checking
    that they're in the right shader target, etc.) is done.
    
    v2: Remove stray debug printfs.
    
    v3 (Paul Berry <stereotype441 at gmail.com>): Process input layout
    qualifiers at ast_to_hir time rather than at parse time, since certain
    error conditions depend on the relative ordering between input layout
    qualifiers, declarations, and calls to .length().
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2e14238a79100f22ccdcdda2a2267ff9fc85655
Author: Eric Anholt <eric at anholt.net>
Date:   Wed Jun 12 13:46:57 2013 -0700

    glsl: Make sure that we don't put too many bitfields in ast_type_qualifier.
    
    We do some tests of qualifiers using a union containing an int and the
    struct full of bitfields, so make sure the bitfields don't spill
    outside the int.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e62ca571999304e1ab25923cc0e351137bd64f16
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Mon Jun 17 06:18:59 2013 +0300

    main: Fix delete_shader_cb() for geometry shaders
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bd85ba08bc0593e3fb53003209a3d569d006a98e
Author: Fabian Bieler <fabianbieler at fastmail.fm>
Date:   Fri May 24 23:26:54 2013 +0200

    glsl/linker: Fail to link geometry shader without vertex shader.
    
    From section 2.15 (Geometry Shaders) the OpenGL 3.2 spec:
    
        A program object that includes a geometry shader must also include
        a vertex shader; otherwise a link error will occur.
    
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8cdbe8394e01964a362649d0aa69ce7d48124373
Author: Fabian Bieler <fabianbieler at fastmail.fm>
Date:   Sat May 25 12:39:46 2013 +0200

    mesa: Validate the drawing primitive against the geometry shader input primitive type.
    
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=39ca58192b093607a5c7bb59d2f8cb13fbc63c63
Author: Fabian Bieler <fabianbieler at fastmail.fm>
Date:   Thu May 30 00:17:42 2013 +0200

    mesa/shaderapi: Allow 0 GEOMETRY_VERTICES_OUT.
    
    ARB_geometry_shader4 spec Errors:
    "The error INVALID_VALUE is generated by ProgramParameteriARB if <pname>
    is GEOMETRY_VERTICES_OUT_ARB and <value> is negative."
    
    Reviewed-by: Paul Berry <stereotype441 at gmail.com>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=72219acf6bd415063f93ce8b9be954a225be4b49
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Apr 10 16:32:40 2013 -0700

    glsl: Properly pack GS output varyings
    
    In geometry shaders, outputs are consumed at the time of a call to
    EmitVertex() (as opposed to all other shader types, where outputs are
    consumed when the shader exits).  Therefore, when packing geometry
    shader output varyings using lower_packed_varyings, we need to do the
    packing at the time of the EmitVertex() call.
    
    This patch accomplishes that by adding a new visitor class,
    lower_packed_varyings_gs_splicer, which is responsible for splicing
    the varying packing code into place wherever EmitVertex() is found.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f2ecc8482673c8aec9c3f009fce6c072d8c6f20a
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Apr 10 14:25:13 2013 -0700

    glsl: Modify varying packing to use a temporary exec_list.
    
    This patch modifies lower_packed_varyings to store the packing code it
    generates in a temporary exec_list, and then splice that list into the
    shader's main() function when it's done.  This paves the way for
    supporting geometry shader outputs, where we'll have to splice a clone
    of the packing code before every call to EmitVertex().
    
    As a side benefit, varying packing code is now emitted in the same
    order for inputs and outputs; this should make debug output a little
    easier to read.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3b0cf7027daebb8bea6af35d8d2ad4ed19fa7b5a
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Apr 10 06:48:42 2013 -0700

    glsl/linker: Properly pack GS input varyings.
    
    Since geometry shader inputs are arrays (where the array index
    indicates which vertex is being examined), varying packing needs to
    treat them differently.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=40d469f9ac45dfb825364af7a0436346c13502d6
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Apr 9 19:51:41 2013 -0700

    glsl/linker: Properly error check VS-GS linkage.
    
    From section 4.3.4 (Inputs) of the GLSL 1.50 spec:
    
        Geometry shader input variables get the per-vertex values written
        out by vertex shader output variables of the same names. Since a
        geometry shader operates on a set of vertices, each input varying
        variable (or input block, see interface blocks below) needs to be
        declared as an array.
    
    Therefore, the element type of each geometry shader input array should
    match the type of the corresponding vertex shader output.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=05234e707bb811e3807d260c1c6cac59a4f1820f
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Apr 10 07:04:33 2013 -0700

    glsl: Require geometry shader inputs to be arrays.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fc5fa56c86df066514e1ca4eff16c1f179884188
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sat Mar 23 10:51:53 2013 -0700

    mesa: Copy linked program data for GS.
    
    The documentation for gl_shader_program.Geom and gl_geometry_program
    says that the former is copied to the latter at link time, but this
    wasn't happening.  This patch causes _mesa_ir_link_shader() to perform
    the copy, and updates comment accordingly.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=13022c9c5f3cb67c76ed76eae9cd8a49355874a5
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sat Mar 23 10:51:53 2013 -0700

    mesa: Refactor copying of linked program data.
    
    This patch creates a single function to copy the the UsesClipDistance
    flag from gl_shader_program.Vert to gl_vertex_program.  Previously
    this logic was duplicated in the i965-specific function
    brw_link_shader() and the core mesa function _mesa_ir_link_shader().
    
    This logic will have to be expanded to support geometry shaders, and I
    don't want to have to update it in two separate places.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=2548092ad80156a407281a124f833a6a93fbf2f3
Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Fri Feb 15 09:46:50 2013 -0600

    glsl: support compilation of geometry shaders
    
    This commit adds all of the parsing and semantics for GLSL 150 style
    geometry shaders.
    
    v2 (Paul Berry <stereotype441 at gmail.com>): Add a few missing calls to
    get_pipeline_stage().  Fix some signed/unsigned comparison warnings.
    Fix handling of NULL consumer in assign_varying_locations().
    
    v3 (Bryan Cain <bryancain3 at gmail.com>): fix indexing order of 2D
    arrays.  Also, allow interpolation qualifiers in geometry shaders.
    
    v4 (Paul Berry <stereotype441 at gmail.com>): Eliminate
    get_pipeline_stage()--it is no longer needed thanks to 030ca23 (mesa:
    renumber shader indices according to their placement in pipeline).
    Remove 2D stuff.  Move vertices_per_prim() to ir.h, so that it will be
    accessible from outside the linker.  Remove
    inject_num_vertices_visitor.  Rework for GLSL 1.50.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    
    v5 (Paul Berry <stereotype441 at gmail.com>): Split out
    do_set_program_inouts() argument refactoring to a separate patch.
    Move geom_array_resizing_visitor to later in the series.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=844bd71736dd59808e1ea4319800db042a7c4267
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Jul 30 22:38:43 2013 -0700

    glsl/linker: Make separate allocations to track vertex and fragment shaders.
    
    There's no reason to be clever about this.  By making separate
    allocations for vertex and fragment shaders, we'll allow geometry
    shaders to be added without introducing any complication.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff523771833cf2cfb6d69d61e86a28c26b8400be
Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Fri Feb 15 08:53:20 2013 -0600

    glsl: add builtins for geometry shaders.
    
    v2 (Paul Berry <stereotype441 at gmail.com>): Account for rework of
    builtin_variables.cpp.  Use INTERP_QUALIFIER_FLAT for gl_PrimitiveID
    so that it will obey provoking vertex conventions.  Convert to GLSL
    1.50 style geometry shaders.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    
    v3 (Paul Berry <stereotype441 at gmail.com>): Be less obscure about
    setting interpolation field of gl_Primitive variables.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ae6eba3e32a142665d2ae6e15c9122d3201c0b5d
Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Fri Feb 15 09:26:35 2013 -0600

    glsl: add ir_emit_vertex and ir_end_primitive instruction types
    
    These correspond to the EmitVertex and EndPrimitive functions in GLSL.
    
    v2 (Paul Berry <stereotype441 at gmail.com>): Add stub implementations of
    new pure visitor functions to i965's vec4_visitor and fs_visitor
    classes.
    
    v3 (Paul Berry <stereotype441 at gmail.com>): Rename classes to be more
    consistent with the names used in the GL spec.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c6be77ee6fe27233f42e98e50002c4b0bdc02913
Author: Bryan Cain <bryancain3 at gmail.com>
Date:   Fri Feb 15 02:40:12 2013 -0600

    mesa: account for geometry shader texture fetches in update_texture_state
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b272a01879d6d5e952b37f574fa85ed7f785abc5
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Sun Jul 28 09:23:11 2013 -0700

    main: Allow for the possibility of GL 3.2 without ARB_geometry_shader4.
    
    Previously, we assumed that the only way Mesa would expose geometry
    shader support was via the ARB_geometry_shader4 extension.  But this
    extension has some extra complications over GL 3.2 (interactions with
    compatibility-only features, and link-time initialization of the
    constant gl_VerticesIn).  So we want to allow for the possibility of
    supporting GL 3.2 (with GLSL 1.50 style geometry shaders) even if
    ctx->Extensions.ARB_geometry_shader4 is false.
    
    This patch adds a new function, _mesa_has_geometry_shaders(), which
    returns true if either ARB_geometry_shader4 is supported or the GL
    version is at least 3.2 desktop.  Since compute_version() only enables
    GL 3.2 functionality when GLSL 1.50 support is present, a sufficient
    way for a back-end to advertise geometry shader support is to set
    ctx->Const.GLSLVersion >= 150.
    
    v2: Remove unnecessary ctx->Const.GeometryShaders150 constant.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=56dcc46f0e48943835cce5fda1d54ded0edbc8f2
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Mon Jun 24 08:50:04 2013 -0700

    main: Fix geometry shader error messages (missing right paren)
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=37270715ff00cff3e549f35069a65e16c56b03be
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Fri Jun 28 13:02:23 2013 -0700

    glsl: Add EXT_texture_array support for geometry shaders.
    
    We can't just use a ".glsl" file since the Lod variants are only
    available in vertex and geometry shaders, while the bias variants are
    only available in the fragment shader.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6a2baf3a06125405aa648e208af782e53f1312c0
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Mon Jun 10 14:01:45 2013 -0700

    glsl/linker: Make update_array_sizes apply to just uniforms.
    
    Commit 586b4b5 (glsl: Also update implicit sizes of varyings at link
    time) extended update_array_sizes() to apply to both uniforms and
    shader ins/outs.  However, doing creates problems for geometry
    shaders, because update_array_sizes() assumes that variables with
    matching names in different parts of the pipeline should have the same
    sizes.  With the addition of geometry shaders, this is no longer true
    (e.g. both vertex and geometry shaders have a gl_ClipDistance output
    variable, but there's no reason these variables should have the same
    sizes).
    
    The original reason for commit 586b4b5 (avoid problems with
    gl_TexCoord being 0 length) has since been addressed by commit 6f53921
    (linker: Ensure that unsized arrays have a size after linking).  So go
    ahead and switch update_array_sizes() back to only acting on uniforms.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8fc41df54909d6c9bd2d8499b8124cde44834ced
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 12:49:49 2013 -0700

    glsl: Modify ir_set_program_inouts to handle geometry shaders.
    
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=cea946e39d62b95139b2d16520bf7b9b509d5fbc
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 11:25:13 2013 -0700

    glsl: In ir_set_program_inouts, handle indexing outside array/matrix bounds.
    
    According to GLSL, indexing into an array or matrix with an
    out-of-range constant results in a compile error.  However, indexing
    with an out-of-range value that isn't constant merely results in
    undefined results.
    
    Since optimization passes (e.g. loop unrolling) can convert
    non-constant array indices into constant array indices, it's possible
    that ir_set_program_inouts will encounter a constant array index that
    is out of range; if this happens, just mark the whole array as used.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=1c789d8087327203d3dcf5c140bf9d9c65b86086
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 10:57:22 2013 -0700

    glsl: Fallback gracefully if ir_set_program_inouts sees unexpected indexing.
    
    The code in ir_set_program_inouts that marks just a portion of a
    variable as used (rather than the whole variable) only works on a few
    kinds of indexing operations:
    
    - Indexing into matrices
    - Indexing into arrays of matrices, vectors, or scalars.
    
    Fortunately these are the only kinds of indexing operations that we
    expect to see; everything else is either handled by a
    previously-executed lowering pass or prohibited by GLSL.
    
    However, that could conceivably change in the future (the GLSL rules
    might change, or we might modify the lowering passes).  To avoid
    mysterious bugs in the future, let's have ir_set_program_inouts report
    an assertion failure if it ever encounters an unexpected kind of
    indexing operation (and in release builds, fall back to just marking
    the whole variable as used).
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d5a333a06f4dd8e084666e82019dde7cb40f9643
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 10:15:49 2013 -0700

    glsl: Extract marking functions from ir_set_program_inouts.
    
    This patch extracts the functions mark_whole_variable() and
    try_mark_partial_variable() from the ir_set_program_inouts visitor
    functions.  This will make the code easier to follow when we add
    geometry shader support.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0b0dc03a31e13aa1cb4e0a6479dbd09cef612d44
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 09:43:16 2013 -0700

    glsl: Use count_attribute_slots() in ir_set_program_inouts.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d95d2b4c9b39b42ea7f9669c8c0da0b229c327c
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 08:24:48 2013 -0700

    glsl: Expand count_attribute_slots() to cover structs.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0026ad4994ca88a6cdd4e5ef4098469ab57bdcc1
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Wed Jul 31 08:15:08 2013 -0700

    Move count_attribute_slots() out of the linker and into glsl_type.
    
    Our previous justification for leaving this function out of glsl_type
    was that it implemented counting rules that were specific to GLSL
    1.50.  However, these counting rules also describe the number of
    varying slots that Mesa will assign to a varying in the absence of
    varying packing.  That's useful to be able to compute from outside of
    the linker code (a future patch will use it from
    ir_set_program_inouts.cpp).  So go ahead and move it to glsl_type.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=906eff09e374c75b0486011b73b7048f6070456e
Author: Paul Berry <stereotype441 at gmail.com>
Date:   Tue Jul 30 20:49:56 2013 -0700

    glsl: Change do_set_program_inouts' is_fragment_shader arg to shader_type.
    
    This will allow us to add geometry shader support without having to
    add another boolean argument.
    
    Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>
    Reviewed-by: Kenneth Graunke <kenneth at whitecape.org>




More information about the mesa-commit mailing list