1. 31 Jul, 2021 1 commit
  2. 30 Jul, 2021 14 commits
  3. 29 Jul, 2021 25 commits
    • Connor Abbott's avatar
      tu: Handle multisample vkCmdCopyColorImage() · d9a4a0ae
      Connor Abbott authored
      There was a bit of code already to select the 3d path, but we actually
      need another shader variant for it.
      
      Part-of: <mesa/mesa!12080>
      d9a4a0ae
    • Alyssa Rosenzweig's avatar
      pan/bi: Validate the live set starts empty · 1e29f57b
      Alyssa Rosenzweig authored
      
      
      Otherwise there is an uninitialized read, and the register allocation
      will fail. (In the sense of failing a precondition. This manifests as
      synthetic interference leading to higher register pressure and useless
      moves. The allocation itself is ok, but it indicates a real bug.)
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!12130>
      1e29f57b
    • Alyssa Rosenzweig's avatar
      pan/bi: Stub 64-bit in count_write_registers · 7d60a888
      Alyssa Rosenzweig authored
      
      
      When Valhall lands, we'll need to be more methodical about this. In the
      mean time, this gets validation passing on
      KHR-GLES31.core.compute_shader.atomic-case3 which was crashing in RA and
      now again passes.
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!12130>
      7d60a888
    • Alyssa Rosenzweig's avatar
      pan/bi: Handle asymmetric staging in bi_count_read_registers · 502ffe6f
      Alyssa Rosenzweig authored
      
      
      Needed for atomics.
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!12130>
      502ffe6f
    • Alyssa Rosenzweig's avatar
      pan/bi: Add bi_entry_block helper · e3f14b98
      Alyssa Rosenzweig authored
      
      
      Useful for checking invariants at the start of the program.
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!12130>
      e3f14b98
    • Alyssa Rosenzweig's avatar
      pan/bi: Lower fragment output with <4 components · c4f8b52e
      Alyssa Rosenzweig authored
      
      
      This avoids undefined behaviour in the shader, which will fail
      validation added later in the series. shader-db results are neglible --
      the extra moves required in a few cases are cancelled out by the extra
      moves eliminated by allowing register allocation to work properly.
      
      total instructions in shared programs: 146903 -> 146907 (<.01%)
      instructions in affected programs: 33 -> 37 (12.12%)
      helped: 0
      HURT: 1
      
      total tuples in shared programs: 123616 -> 123613 (<.01%)
      tuples in affected programs: 764 -> 761 (-0.39%)
      helped: 6
      HURT: 4
      helped stats (abs) min: 1.0 max: 4.0 x̄: 1.67 x̃: 1
      helped stats (rel) min: 0.54% max: 5.88% x̄: 2.64% x̃: 1.86%
      HURT stats (abs)   min: 1.0 max: 2.0 x̄: 1.75 x̃: 2
      HURT stats (rel)   min: 4.55% max: 13.33% x̄: 8.57% x̃: 8.19%
      95% mean confidence interval for tuples value: -1.73 1.13
      95% mean confidence interval for tuples %-change: -2.72% 6.41%
      Inconclusive result (value mean confidence interval includes 0).
      
      total clauses in shared programs: 25656 -> 25654 (<.01%)
      clauses in affected programs: 43 -> 41 (-4.65%)
      helped: 2
      HURT: 1
      helped stats (abs) min: 1.0 max: 2.0 x̄: 1.50 x̃: 1
      helped stats (rel) min: 6.25% max: 12.50% x̄: 9.38% x̃: 9.38%
      HURT stats (abs)   min: 1.0 max: 1.0 x̄: 1.00 x̃: 1
      HURT stats (rel)   min: 33.33% max: 33.33% x̄: 33.33% x̃: 33.33%
      
      total cycles in shared programs: 12114.21 -> 12114.12 (<.01%)
      cycles in affected programs: 27.42 -> 27.33 (-0.30%)
      helped: 4
      HURT: 3
      helped stats (abs) min: 0.04166700000000034 max: 0.08333299999999966 x̄: 0.06 x̃: 0
      helped stats (rel) min: 0.57% max: 1.59% x̄: 1.02% x̃: 0.96%
      HURT stats (abs)   min: 0.0416669999999999 max: 0.08333299999999999 x̄: 0.06 x̃: 0
      HURT stats (rel)   min: 4.17% max: 16.67% x̄: 8.80% x̃: 5.56%
      95% mean confidence interval for cycles value: -0.07 0.05
      95% mean confidence interval for cycles %-change: -2.90% 9.27%
      Inconclusive result (value mean confidence interval includes 0).
      
      total arith in shared programs: 4601.08 -> 4601.04 (<.01%)
      arith in affected programs: 29 -> 28.96 (-0.14%)
      helped: 6
      HURT: 4
      helped stats (abs) min: 0.04166700000000001 max: 0.08333299999999966 x̄: 0.06 x̃: 0
      helped stats (rel) min: 0.57% max: 10.00% x̄: 3.63% x̃: 1.39%
      HURT stats (abs)   min: 0.04166700000000001 max: 0.08333399999999991 x̄: 0.07 x̃: 0
      HURT stats (rel)   min: 5.56% max: 16.67% x̄: 10.85% x̃: 10.60%
      95% mean confidence interval for arith value: -0.05 0.05
      95% mean confidence interval for arith %-change: -3.95% 8.28%
      Inconclusive result (value mean confidence interval includes 0).
      
      total quadwords in shared programs: 110008 -> 110002 (<.01%)
      quadwords in affected programs: 1090 -> 1084 (-0.55%)
      helped: 11
      HURT: 8
      helped stats (abs) min: 1.0 max: 7.0 x̄: 2.18 x̃: 1
      helped stats (rel) min: 0.61% max: 13.16% x̄: 4.07% x̃: 1.82%
      HURT stats (abs)   min: 1.0 max: 6.0 x̄: 2.25 x̃: 1
      HURT stats (rel)   min: 3.70% max: 42.86% x̄: 12.55% x̃: 7.50%
      95% mean confidence interval for quadwords value: -1.76 1.13
      95% mean confidence interval for quadwords %-change: -2.95% 8.81%
      Inconclusive result (value mean confidence interval includes 0).
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <!12130>
      c4f8b52e
    • Connor Abbott's avatar
      ir3: Delete old packed struct encoding · 9b0a4cc8
      Connor Abbott authored
      turnip clear/blit shaders were the last user of these.
      
      Part-of: <mesa/mesa!12079>
      9b0a4cc8
    • Connor Abbott's avatar
      tu: Use NIR for clear/blit shaders · fc0c0e9d
      Connor Abbott authored
      This is much more maintainable, extensible, and easy to read than
      hand-rolled structs approximating assembly. This also removes the last
      use of the old hand-written packing structs. There are a few minor
      differences:
      
      - The shaders are larger because ir3 currently doesn't support (rpt),
        which means that some shaders are larger than one instrlen and the
        current logic has to be extended to allow for that. This seems a small
        price to pay, ir3 will gain support for (rpt) eventually, and we
        shouldn't have limitations like this baked in anyway. For example some
        GL blob r8g8 <-> r16 copy shaders are apparently quite large.
      - Due to the inability to switch inputs/outputs on the fly, we need to
        split the VS into two variants. I made the layer-writing variant also
        used for other clears, because the old method of overloading c0.z/c1.z
        to mean both "src x coordinate" and "z clear value" in the same shader
        seemed too clever and I didn't want to add yet another variant. This
        means that non-layered clears will also write the layer (to 0), but
        that shouldn't be a big deal performance-wise.
      
      Part-of: <mesa/mesa!12079>
      fc0c0e9d
    • Ivan Briano's avatar
      anv: Don't copy the lineStipple values if lineStipple is not enabled · df338fe7
      Ivan Briano authored
      
      
      If the passed VkPipelineRasterizationLineStateCreateInfoEXT wasn't zero
      initialized, we copy garbage values that are later on used to set the
      state and may end up crashing when they are beyond the limits of the HW.
      
      v2 (Lionel): Simplify if condition
      Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Part-of: <mesa/mesa!12121>
      df338fe7
    • Alyssa Rosenzweig's avatar
      pan/bi: Use getopt for bifrost_compiler · c6be4f85
      Alyssa Rosenzweig authored
      
      
      Specify gpu id with --gpu-id or marketing name with --gpu. Still have
      compile/disasm as commands, but allow -v for verbose printing.
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Part-of: <mesa/mesa!12134>
      c6be4f85
    • Jesse Natalie's avatar
    • Jesse Natalie's avatar
      microsoft/compiler: Implement texture loads from UAVs · 6126dd29
      Jesse Natalie authored
      
      
      This comes to the backend as image_load rather than txf but the
      DXIL intrinsic is the same at the end of the day.
      Reviewed-by: Enrico Galli's avatarEnrico Galli <enrico.galli@intel.com>
      Part-of: <mesa/mesa!10163>
      6126dd29
    • Joshua Watt's avatar
      v3d, vc4: Fix dmabuf import for non-scanout buffers · 7bcb2236
      Joshua Watt authored
      
      
      Failure to create a buffer for scanout should not be fatal when
      importing a buffer. Buffers allocated from a render-only device may not
      be able to scanned out directly but can still be used for other
      rendering purposes (e.g. as a texture).
      Signed-off-by: Joshua Watt's avatarJoshua Watt <JPEWhacker@gmail.com>
      Reviewed-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Iago Toral's avatarIago Toral Quiroga <itoral@igalia.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12081>
      7bcb2236
    • Emma Anholt's avatar
      nir_to_tgsi: Add support for nir_intrinsic_load_sample_pos. · b3e1f45c
      Emma Anholt authored
      
      
      The sysval translation already handles it.
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Part-of: <mesa/mesa!11937>
      b3e1f45c
    • Emma Anholt's avatar
      nir_to_tgsi: Declare buffers for all of num_ssbos. · 0253ff6d
      Emma Anholt authored
      
      
      Now all SSBO tests pass on virgl when taking the nir-to-tgsi path.
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Part-of: <mesa/mesa!11937>
      0253ff6d
    • Emma Anholt's avatar
      nir_to_tgsi: Add support for HW atomics. · 846a4512
      Emma Anholt authored
      
      
      Found missing when taking virgl on the nir-to-tgsi path.  Needs an SSBO
      fix as well to pass all of the atomic_counters tests.
      Reviewed-by: Adam Jackson's avatarAdam Jackson <ajax@redhat.com>
      Part-of: <mesa/mesa!11937>
      846a4512
    • Alyssa Rosenzweig's avatar
      pan/bi: Remove incorrect errata workaround · be7d964f
      Alyssa Rosenzweig authored
      
      
      This worked around a symptom of the underlying issue worked around in
      the previous commit. This workaround is wrong in the sense of failing to
      correct some broken code sequences and needlessly rejecting some working
      code sequences.
      
      total tuples in shared programs: 123770 -> 123630 (-0.11%)
      tuples in affected programs: 9548 -> 9408 (-1.47%)
      helped: 133
      HURT: 0
      helped stats (abs) min: 1.0 max: 2.0 x̄: 1.05 x̃: 1
      helped stats (rel) min: 0.42% max: 16.67% x̄: 4.07% x̃: 1.15%
      95% mean confidence interval for tuples value: -1.09 -1.01
      95% mean confidence interval for tuples %-change: -4.98% -3.17%
      Tuples are helped.
      
      total cycles in shared programs: 12114.83 -> 12114.50 (<.01%)
      cycles in affected programs: 34.08 -> 33.75 (-0.98%)
      helped: 9
      HURT: 1
      helped stats (abs) min: 0.04166599999999998 max: 0.04166700000000034 x̄: 0.04 x̃: 0
      helped stats (rel) min: 0.72% max: 12.50% x̄: 2.99% x̃: 2.04%
      HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄: 0.04 x̃: 0
      HURT stats (rel)   min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
      95% mean confidence interval for cycles value: -0.05 -0.01
      95% mean confidence interval for cycles %-change: -5.27% <.01%
      Inconclusive result (%-change mean confidence interval includes 0).
      
      total arith in shared programs: 4603.42 -> 4601.54 (-0.04%)
      arith in affected programs: 50.50 -> 48.62 (-3.71%)
      helped: 41
      HURT: 1
      helped stats (abs) min: 0.04166599999999998 max: 0.08333299999999999 x̄: 0.05 x̃: 0
      helped stats (rel) min: 0.72% max: 33.33% x̄: 17.23% x̃: 13.33%
      HURT stats (abs)   min: 0.04166700000000034 max: 0.04166700000000034 x̄: 0.04 x̃: 0
      HURT stats (rel)   min: 0.62% max: 0.62% x̄: 0.62% x̃: 0.62%
      95% mean confidence interval for arith value: -0.05 -0.04
      95% mean confidence interval for arith %-change: -20.93% -12.69%
      Arith are helped.
      
      total quadwords in shared programs: 110116 -> 110009 (-0.10%)
      quadwords in affected programs: 7829 -> 7722 (-1.37%)
      helped: 106
      HURT: 0
      helped stats (abs) min: 1.0 max: 2.0 x̄: 1.01 x̃: 1
      helped stats (rel) min: 0.49% max: 7.14% x̄: 1.91% x̃: 1.35%
      95% mean confidence interval for quadwords value: -1.03 -0.99
      95% mean confidence interval for quadwords %-change: -2.23% -1.59%
      Quadwords are helped.
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12114>
      be7d964f
    • Alyssa Rosenzweig's avatar
    • Alyssa Rosenzweig's avatar
      pan/bi: Restrict swizzles on same cycle temporaries · 2cdf9570
      Alyssa Rosenzweig authored
      
      
      Hand typed. We could generate this from the XML to avoid the repititon
      but I think the cure is worse than the disease.
      
      This fixes instruction encoding faults seen in conformance tests.
      
      Only a single shader-db affected, and it was likely already broken...
      
      quadwords HURT:   shaders/glmark/22-1.shader_test MESA_SHADER_FRAGMENT: 133 -> 135 (1.50%)
      Signed-off-by: Alyssa Rosenzweig's avatarAlyssa Rosenzweig <alyssa@collabora.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12114>
      2cdf9570
    • Simon Ser's avatar
      lima: fail in get_handle(TYPE_KMS) without a scanout resource · 47f000c1
      Simon Ser authored
      
      
      The previous logic was returning a handle valid for the render-only
      device if rsc->scanout was NULL. However the caller doesn't expect
      this: the caller will use the handle with the KMS device.
      
      Instead of returning a handle for the wrong device, fail if we don't
      have one.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Vasily Khoruzhick's avatarVasily Khoruzhick <anarsoul@gmail.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12074>
      47f000c1
    • Simon Ser's avatar
      panfrost: fail in get_handle(TYPE_KMS) without a scanout resource · 4c092947
      Simon Ser authored
      
      
      The previous logic was returning a handle valid for the render-only
      device if rsc->scanout was NULL. However the caller doesn't expect
      this: the caller will use the handle with the KMS device.
      
      Instead of returning a handle for the wrong device, fail if we don't
      have one.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Daniel Stone's avatarDaniel Stone <daniels@collabora.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12074>
      4c092947
    • Simon Ser's avatar
      freedreno: fail in get_handle(TYPE_KMS) without a scanout resource · 465eb786
      Simon Ser authored
      
      
      The previous logic was returning a handle valid for the render-only
      device if rsc->scanout was NULL. However the caller doesn't expect
      this: the caller will use the handle with the KMS device.
      
      Instead of returning a handle for the wrong device, fail if we don't
      have one.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Emma Anholt's avatarEmma Anholt <emma@anholt.net>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12074>
      465eb786
    • Simon Ser's avatar
      etnaviv: fail in get_handle(TYPE_KMS) without a scanout resource · 9da901d2
      Simon Ser authored
      
      
      The previous logic was returning a handle valid for the render-only
      device if rsc->scanout was NULL. However the caller doesn't expect
      this: the caller will use the handle with the KMS device.
      
      Instead of returning a handle for the wrong device, fail if we don't
      have one.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Christian Gmeiner's avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12074>
      9da901d2
    • Simon Ser's avatar
      etnaviv: fix renderonly check in etna_resource_alloc · 3b3cd512
      Simon Ser authored
      
      
      When the driver hasn't been initialized via renderonly, screen->ro
      will be NULL. This fixes a crash when passing USE_SCANOUT to etnaviv
      when it's missing renderonly.
      Signed-off-by: Simon Ser's avatarSimon Ser <contact@emersion.fr>
      Reviewed-by: Christian Gmeiner's avatarChristian Gmeiner <christian.gmeiner@gmail.com>
      Cc: mesa-stable
      Part-of: <mesa/mesa!12074>
      3b3cd512
    • Thomas Andersen's avatar
      nine: Fix assert in tx_src_param · 71a5bcb8
      Thomas Andersen authored
      A previous commit cleaned up the asserts but the last part of
      this assert looks like it got mixed up. It should have allowed
      param->rel for D3DSPR_INPUT if version is 3.0. Instead it does
      && on the enum value D3DSPR_ADDR which is of course always true,
      with the version check. The result is that we miss input
      validation with version 3.0.
      
      Spotted by a compile warning
      
      Fixes: 5974401a ("st/nine: Regroup param->rel tests")
      Reviewed-by: Axel Davy davyaxel0@gmail.com
      Part-of: <mesa/mesa!11880>
      71a5bcb8