Mesa (master): 26 new commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Jul 24 04:01:21 UTC 2020


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=14a12b771d0a380defacafe5825362af77ff21bd
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 16:45:21 2020 -0500

    spirv: Rework our handling of images and samplers
    
    Previously, objects of type OpTypeImage or OpTypeSampler were treated as
    vtn_pointers and objects of type OpTypeSampledImage were a special-use
    vtn_sampled_image struct.  This commit changes that so that all of those
    objects are stored in vtn_ssa_values.  Each of images, samplers, and
    sampled images, are stored as a scalar or vector nir_ssa_def whose
    components are NIR deref values.  We now use vtn_type_get_nir_type to
    re-resolve those as-needed into GLSL sampler types for NIR.
    
    This simplification has a number of benefits:
    
     1. We can git rid of the rest of our special-cases for handling images
        and samplers in function arguments.  Now that they're treated as
        structs at the glsl_type level, the generic paths can handle images
        and samplers.
    
     2. We can now construct composite values containing images and samplers
        internally.  It's unclear from the SPIR-V spec whether or not this
        is allowed and it's not a pattern that GLSLang currently generates
        thanks to GLSL rules.  However, if we do start seeing SPIR-V that
        contains such composites, we should now be able to handle it.
    
     3. SPIR-V OpNull and OpUndef instructions can now create samplers,
        images, and sampled images.  The NIR generated won't likely be fully
        valid but, given a NIR pass to do something sensible, it should be a
        thing we can compile.
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=196db51fc27090012ce6f94bfffc3909f78c44d3
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu Jun 11 13:29:02 2020 -0500

    anv,turnip,radv,clover,glspirv: Run nir_copy_prop before nir_opt_deref
    
    We're about to make the SPIR-V -> NIR path generate a bit more complex
    SSA chains for certain derefs.  This will ensure we don't regress anyone
    when we start making vec2's of derefs.
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=66c8628b65c4239022b799a9ef569d1d44819e9e
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 20:48:23 2020 -0500

    spirv: More heavily use vtn_ssa_value in function parameter handling
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=32ba23f8977cc16e5f8d3f74482fc5c8419bcbb3
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 21:02:31 2020 -0500

    spirv: Remove a dead case in function parameter handling
    
    Ever since 31a7476335f911a, we've set something for vtn_type::type for
    all pointer types.  For logical pointer types, it's uint32_t.
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9e3213ad30fdf121f98dc3e250486c1533047c10
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 17:57:34 2020 -0500

    spirv: Add a helper for getting the NIR type of a vtn_type
    
    There are a few cases, atomic counters being one example, where the type
    used by vtn_ssa_value is not the same as the type we want NIR to use in
    derefs and variables.  To solve this, we add a helper which converts
    between the types for us.  In the next commit, we'll be adding another
    major user of this: images and samplers.
    
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=051f8d3d1cf1d6eba5775622fddb280ce810daf1
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 18:39:30 2020 -0500

    spirv: Give atomic counters their own variable mode
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a7932b095307e59e18781a819922f23161a1f5d
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 16:36:54 2020 -0500

    spirv: Drop the sampled boolean from vtn_type
    
    It was set but never used.  We always check the glsl_type instead.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0be2fed4edaa5f00433f41a0f4c660330348191
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 16:10:28 2020 -0500

    spirv: Add better checks for SSA value types
    
    Primarily, we check for two things:
    
     1. That we only ever add SSA values via vtn_push_ssa_value and
        vtn_copy_value.
    
     2. That the type of the SSA value matches the SPIR-V destination type.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=47ebb50cab3bfd41000f517e83ad0bac57fc4085
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat May 30 12:27:54 2020 -0500

    spirv: Hand-roll fewer vtn_ssa_value creations
    
    Previously, we created our vtn_ssa_value in _vtn_variable_load_store
    manually as we did the recursive load/store.  Instead, we now create the
    SSA value before calling into the recursive function.  This is a tiny
    bit less efficient but it removes a case of hand-rolling vtn_ssa_value
    creation.  For symmetry, we make _vtn_block_load_store assume the value
    is already created.  Finally, we remove a trivial hand-rolled case in
    vtn_composite_extract.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=085ade412554c1e1e55aee5a4267bd13ec432d10
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat May 30 12:23:50 2020 -0500

    spirv: Simplify vtn_ssa_value creation
    
    For three different functions which create vtn_ssa_values, we had three
    completely different implementations.  This unifies them all to roughly
    the same algorithm.  While we're at it, we take advantage of the
    nir_build_imm helper to avoid some extra code in vtn_const_ssa_value.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=00af1128a9d555a09e18eb3fd8ce1829d94509b7
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 14:40:12 2020 -0500

    spirv/subgroups: Refactor to use vtn_push_ssa
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ea246c3950777d5c5dd5363b0cfc15215db12b11
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat May 30 11:07:46 2020 -0500

    spirv/subgroups: Stop incrementing w
    
    The w++ is to handle a differences between the KHR extension and Vulkan
    1.1 feature where the Vulkan 1.1 instructions take an scope parameter.
    While incrementing w technically works, it's really subtle and very easy
    to miss when reading the code.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c5fcd129ea196702119c24c849f3b31c7f549695
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 16:04:02 2020 -0500

    spirv/glsl450: Use vtn_push_ssa_value
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7560ed279fd0985293dc446aeabf4f54c55326f0
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 15:57:42 2020 -0500

    spirv/alu: Use vtn_push_ssa_value
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=dbb4a24413d8f3af246a2ef7530ef036613ea1e4
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri May 29 15:44:10 2020 -0500

    spirv: Refactor vtn_push_ssa
    
    We rename it to vtn_push_ssa_value, move it to spirv_to_nir, and remove
    the unnecessary type parameter.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8be9f2a4f696beb13434f7bf4c0460f1e90ddd08
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu May 28 18:39:45 2020 -0500

    spirv: Use the new helpers in OpConvertUToPtr/PtrToU
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=37ab3234805bc3fa34c12065bde0bcf37fdbdd89
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 18:28:18 2020 -0500

    spirv: Add a vtn_get_nir_ssa helper
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=e5b29b9040ed2e37044ae665c12deb7c30613e57
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 18:08:20 2020 -0500

    spirv/amd: Use vtn_push_nir_ssa
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d8eb6f2499c66e26d7312f59dc052b9f416cc486
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 17:49:47 2020 -0500

    spirv: Add a vtn_push_nir_ssa helper
    
    This makes it easy to write a simple NIR SSA value
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=aaf1f342152707975cab4accfd91af1c12aafab1
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 17:55:10 2020 -0500

    spirv: Rename push_value_pointer to push_pointer
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ac1e6d5a46846e6106a47295905077ebc486b768
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 18:33:47 2020 -0500

    spirv: Add a helpers for getting types of values
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=953b7a36032207edde5d7cb729d4e5bb34d07bf8
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu May 28 23:00:21 2020 -0500

    spirv: Use nir_bany/ball for OpAny/All
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8dfee57bdc165c3d4c315eac91b60112969433e2
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu May 28 17:14:30 2020 -0500

    spirv: Clean up OpSignBitSet
    
    For some reason, we were doing a signed shift vectors and an unsigned
    shift for scalars.  We then plug it into i2b so it should make no
    difference whatsoever.  The fact that we're doing different things for
    vectors vs. scalars is bonkers.  Let's simplify the code a bit.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=62c53ad20b77691804de656dfa9caad49b196581
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 17:41:23 2020 -0500

    spirv: Fix indentation in vtn_handle_ptr
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=516fd78d627a289ca8037081b3bde9bbdc3efad2
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Wed May 27 16:15:39 2020 -0500

    spirv: Drop the void *ptr from vtn_value
    
    It isn't being used for anything.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=af81486a8cde4dec2a695884b93b282c1710d8bd
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Thu May 28 18:32:01 2020 -0500

    spirv: Simplify our handling of NonUniform
    
    The original implementation of SPV_EXT_descriptor_indexing was extremely
    paranoid about the NonUniform qualifier, trying to fetch it from every
    possible location and propagate it through access chains etc.  However,
    the Vulkan spec is quite nice to us on this and has very strict rules
    for where the NonUniform decoration has to be placed.  For image and
    texture operations, we can search for the decoration on the spot when we
    process the image or texture op.  For pointers, we continue putting it
    on the pointer but we don't bother trying to do anything silly like
    propagate it through casts.
    
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5278>



More information about the mesa-commit mailing list