Mesa (master): 27 new commits

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Nov 3 22:35:05 UTC 2020


URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b9f95280119132548ffadd2e9c5e44c34a1056b8
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:57:14 2020 -0500

    nir/lower_io: Add a new 62bit_generic address format
    
    Unlike most address formats, this address format is capable of handling
    all of the fancy generic pointers stuff like is_global and friends.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b84f74f9b7fc4499c1cce489880bb342267192e9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 01:54:45 2020 -0500

    nir/lower_io: Support generic pointer access
    
    If the pointer is generic and we haven't yet figured out what kind of
    pointer it is yet, we emit an if-ladder based on a mode check.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a451f037ffc830e2d12274048363d3ee607655b9
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:32:46 2020 -0500

    nir/lower_io: Add support for lowering deref_mode_is
    
    The guts are still missing so it will blow up if it sees any
    deref_mode_is intrinsic that it can't constant-fold from the mode.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=57943112d9aca94aa1ec4ec3e2dbe1a21a643296
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Aug 18 10:27:41 2020 -0500

    nir/lower_io: Add support for 32/64bit_global for shared
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=c50332fbc299983417e77763bd09c0c17def2f2c
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:39:00 2020 -0500

    nir/lower_io: Add a mode parameter to addr_format_is_*
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7007d06898a222a1f39f1eb687c2cf4c98b5b78c
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Aug 14 18:20:12 2020 -0500

    nir/lower_io: Add a mode parameter to build_addr_iadd
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ff838abc463acaaddf92e3f7f9f97a5c41fe25fb
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 11:14:20 2020 -0500

    nir/opt_deref: Add an optimization for deref_mode_is
    
    If opt_restrict_deref_modes makes progress, we may be able to figure out
    the mode well enough to turn a deref_mode_is intrinsic into a constant.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=df51518dc5b67bee7488a8b65c5f09653367fd63
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:29:59 2020 -0500

    nir/opt_deref: Add a deref mode specialization optimization
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=a8e53a772f617877f7735a2c7a4031701845b3a6
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Aug 14 23:41:14 2020 -0500

    spirv: Add generic pointer support
    
    Most of this is fairly straightforward; we just set all the modes on any
    derefs which are generic.  The one tricky bit is OpGenericCastToPtrExplicit.
    Instead of adding NIR intrinsics to do the cast, we add NIR intrinsics
    to do a storage class check and then bcsel based on that.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d6415b5d2b3fc295fb8b0ab0d8b8ce303ceb4153
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:28:55 2020 -0500

    nir: Add support for generic pointers
    
    The way they're handled is that deref->modes is treated as a bitfield of
    possible modes.  Variables are required to have a specific mode and
    derefs with deref_type_var are as well.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9d377c01d0f506f9d0c436ae4f09faae96b979b4
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 30 12:14:05 2020 -0500

    nir: Make nir_deref_instr::mode a bitfield
    
    We rename it to "modes" to make it clear that it may contain more than
    one mode and adjust all the uses of nir_deref_instr::modes to attempt to
    handle multiple modes.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7d5f3b5c0e6b43213a1a29d939afb328688befa3
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:49:36 2020 -0600

    nir/split_*_vars: Prepare for generic pointers
    
    All three passes check the variables for complex uses and don't split
    them if they have any complex uses.  Most of these checks are just early
    returns to avoid chasing the deref to the variable and a hash table
    lookup if we can quickly determine it has the wrong mode.  In a couple
    of cases, we need to re-arrange or add other checks to ensure that it's
    safe for generic pointers.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d50a4dbc13ceedb65fd14b5976f8c73da2f693e3
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:48:49 2020 -0600

    nir/find_array_copies: Prepare for generic pointers
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ced9b6f0d8ef4211afd5ea4c09edabd2b3b80f27
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:46:56 2020 -0600

    nir: Use nir_deref_mode_may_be in deref optimizations
    
    All the checks being replaced are fore potential aliasing so we want to
    flush stores whenever the mode might be something that aliases.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=379d5354804e6cd443b821bd339260a2394dd536
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:45:26 2020 -0600

    nir/vec3_to_vec4: Use nir_deref_must_be
    
    We use the same nir_deref_mode_is_in_set helper that we use in
    nir_lower_vars_to_explicit_types for the same reason.  If there are any
    generic pointers in play, we have to lower all generic pointer modes at
    the same time or else we risk types getting out-of-sync.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=8a2cda1d53f52a1853c6f38eb3854be28cbf29ca
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:40:34 2020 -0600

    nir/vars_to_ssa: Use nir_deref_must_be
    
    We can only lower a deref to SSA in this pass if it's guaranteed to be
    nir_var_function_temp.  We already flag any variables with complex uses
    (i.e. casts) as not being lowerable and refuse to lower any derefs to
    them so we don't have to worry about false negatives.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=0f94ff8a6ac7a876cf0bdfaa2a618217ff79fce1
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:22:19 2020 -0600

    nir: Only force loop unrolling if we know it's a in/out/temp
    
    If we don't know the actual mode then we can't get to the variable so
    it's going to be a scratch or other indirect load anyway and we aren't
    saving ourselves anything by unrolling the loop.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=fff78fc1c58aa1a63c72dc015e58345a9c9e1d66
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 17:15:28 2020 -0600

    nir/phis_to_scalar,gcm: Use nir_deref_mode_may_be
    
    In both cases, we're trying to determine if a load is scalarizable.  We
    don't want to scalarize if it's a function_temp or shader_temp because
    it might turn into something we can't scalarize.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9f3e3dfd2fb96faae0922d8bae03f011c08b1bb1
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 16:58:27 2020 -0600

    nir/lower_io: Use nir_deref_mode_* helpers
    
    For non-explicit nir_lower_io, we use nir_deref_mode_is because there's
    no way it works for generic pointers.  For nir_lower_vars_to_explicit_types,
    and nir_lower_explicit_io, we use nir_deref_mode_is_in_set to ensure we
    never get type confusion.  For generic pointers, this means that they
    must be called with the full set of generic pointer modes.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=9ae87a6c312502483edbf5469e7e15295b356d66
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sun Nov 1 16:55:25 2020 -0600

    nir/lower_array_deref_of_vec: Use nir_deref_mode_must_be
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3cc58e6470619ea708497050aa4692ad5f9fa3d6
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 30 12:19:25 2020 -0500

    nir: Add and use some deref mode helpers
    
    NIR derefs currently have exactly one variable mode.  This is about to
    change so we can handle OpenCL generic pointers.  In order to transition
    safely, we need to audit every deref->mode check.  This commit adds a
    set of helpers that provide more nuanced mode checks and converts most
    of NIR to use them.
    
    For simple cases, we add nir_deref_mode_is and nir_deref_mode_is_one_of
    helpers.  These can be used in passes which don't have to bother with
    generic pointers and just want to know what mode a thing is.  If the
    pass ever encounters generic pointers in a way that this check would be
    unsafe, it will assert-fail to alert developers that they need to think
    harder about things and fix the pass.
    
    For more complex passes which require a more nuanced understanding of
    modes, we add nir_deref_mode_may_be and nir_deref_mode_must_be helpers
    which accurately describe the compiler's best knowledge about the given
    deref.  Unfortunately, we may not be able to exactly identify the mode
    in a generic pointers scenario so we have to be very careful when we use
    these.  Conversion of these passes is left to later commits.
    
    For the case of mass lowering of a particular mode (nir_lower_explicit_io
    is one good example), we add nir_deref_mode_is_in_set.  This is also
    pretty assert-happy like nir_deref_mode_is but is for a set containment
    comparison on deref modes where you expect the deref to either be all-in
    or all-out.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Reviewed-by: Caio Marcelo de Oliveira Filho <caio.oliveira at intel.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=74886cabaa3e07b25bcc8890b485f9b0faf1b3a7
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 30 15:07:47 2020 -0500

    nir/opt_find_array_copies: Allow copies from mem_constant
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=89abfbeb7ac53e29573e4412241c0b6a5f20637d
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 30 15:03:23 2020 -0500

    nir: Disallow writes to system values and mem_constant
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=bb5d5029b7423d4ffe3b84149b2bc6a770647ef2
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Fri Oct 30 12:30:09 2020 -0500

    nir: Use var->data.mode instead of deref->mode in a few cases
    
    We already have the variable so we know the mode exactly.  Just use that
    instead of the deref mode.  If these paths ever have to handle variable
    pointers (not likely since they're OpenGL-specific), we can fix them to
    handle crazy deref modes then.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5664713d7b99b99dcee1d009ef6e5b105a2d65ee
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Tue Sep 29 10:30:52 2020 -0500

    nir: Handle incomplete derefs in split_struct_vars
    
    In split_var_list_structs where we initalize the splitting, we already
    use get_complex_used_vars to avoid splitting any variables that have a
    complex use.  However, we weren't actually handling the complex uses
    properly in the case where we can't actually find the variable.
    
    Fixes: f1cb3348f1 "nir/split_vars: Properly bail in the presence of ..."
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=6b72004f12c8db56ae6838e0fdb74d416e918928
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Mon Aug 17 12:06:56 2020 -0500

    nir/phis_to_scalar: Use a deny-list for load_deref modes
    
    I can't think of any reason why shared and output aren't in this list.
    The real thing we're trying to do is avoid premature scalarization
    because of a shader or function temporary variable because we might
    lower it to something we don't want scalarized later.  Also fix the
    version we copy+pasted into GCM.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>

URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3f0a29fffbce36dc4a68dd8335720b1ee0b9aa28
Author: Jason Ekstrand <jason at jlekstrand.net>
Date:   Sat Aug 15 00:11:27 2020 -0500

    nir/builder: Add a nir_ieq_imm helper
    
    This shows up surprisingly often.
    
    Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
    Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6332>



More information about the mesa-commit mailing list