1. 21 May, 2019 5 commits
  2. 20 May, 2019 1 commit
  3. 17 May, 2019 10 commits
    • Ian Romanick's avatar
      Revert "nir: add late opt to turn inot/b2f combos back to bcsel" · dfe2258c
      Ian Romanick authored
      This reverts commit 7acc8652.
      
      With these optimizations in place, the extra constant folding added in
      the next commit extends some live ranges of 0.0 and ±1.0 constants, and
      that causes several hundred shaders to have more spills and fills.
      
      I believe this optimization we made basically irrelevant by 7725d609
      "intel/fs: Emit better code for b2f(inot(a)) and b2i(inot(a))".
      
      All Gen7.5+ platforms had similar results. (Ice Lake shown)
      total instructions in shared programs: 17225303 -> 17224634 (<.01%)
      instructions in affected programs: 879402 -> 878733 (-0.08%)
      helped: 679
      HURT: 1
      helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
      helped stats (rel) min: 0.03% max: 0.93% x̄: 0.24% x̃: 0.05%
      HURT stats (abs)   min: 10 max: 10 x̄: 10.00 x̃: 10
      HURT stats (rel)   min: 0.45% max: 0.45% x̄: 0.45% x̃: 0.45%
      95% mean confidence interval for instructions value: -1.02 -0.95
      95% mean confidence interval for instructions %-change: -0.26% -0.22%
      Instructions are helped.
      
      total cycles in shared programs: 360842595 -> 360828542 (<.01%)
      cycles in affected programs: 110443594 -> 110429541 (-0.01%)
      helped: 389
      HURT: 265
      helped stats (abs) min: 1 max: 7525 x̄: 162.81 x̃: 28
      helped stats (rel) min: <.01% max: 18.66% x̄: 1.11% x̃: 0.11%
      HURT stats (abs)   min: 1 max: 7614 x̄: 185.96 x̃: 48
      HURT stats (rel)   min: <.01% max: 25.08% x̄: 0.95% x̃: 0.10%
      95% mean confidence interval for cycles value: -75.65 32.67
      95% mean confidence interval for cycles %-change: -0.49% -0.06%
      Inconclusive result (value mean confidence interval includes 0).
      
      total spills in shared programs: 12159 -> 12161 (0.02%)
      spills in affected programs: 13 -> 15 (15.38%)
      helped: 0
      HURT: 1
      
      total fills in shared programs: 25207 -> 25208 (<.01%)
      fills in affected programs: 25 -> 26 (4.00%)
      helped: 0
      HURT: 1
      
      Ivy Bridge
      total instructions in shared programs: 12082019 -> 12082013 (<.01%)
      instructions in affected programs: 1033 -> 1027 (-0.58%)
      helped: 6
      HURT: 0
      helped stats (abs) min: 1 max: 1 x̄: 1.00 x̃: 1
      helped stats (rel) min: 0.41% max: 0.83% x̄: 0.61% x̃: 0.59%
      95% mean confidence interval for instructions value: -1.00 -1.00
      95% mean confidence interval for instructions %-change: -0.78% -0.45%
      Instructions are helped.
      
      total cycles in shared programs: 179849270 -> 179849157 (<.01%)
      cycles in affected programs: 4735 -> 4622 (-2.39%)
      helped: 4
      HURT: 0
      helped stats (abs) min: 2 max: 74 x̄: 28.25 x̃: 18
      helped stats (rel) min: 0.13% max: 6.53% x̄: 2.85% x̃: 2.36%
      95% mean confidence interval for cycles value: -82.73 26.23
      95% mean confidence interval for cycles %-change: -7.98% 2.28%
      Inconclusive result (value mean confidence interval includes 0).
      
      Sandy Bridge
      total instructions in shared programs: 10882750 -> 10882748 (<.01%)
      instructions in affected programs: 266 -> 264 (-0.75%)
      helped: 2
      HURT: 0
      
      Iron Lake
      total cycles in shared programs: 188609440 -> 188609448 (<.01%)
      cycles in affected programs: 4320 -> 4328 (0.19%)
      helped: 0
      HURT: 2
      
      GM45
      total cycles in shared programs: 129016868 -> 129016872 (<.01%)
      cycles in affected programs: 2302 -> 2306 (0.17%)
      helped: 0
      HURT: 1
      Reviewed-by: Matt Turner's avatarMatt Turner <mattst88@gmail.com>
      (cherry picked from commit d2a9ba03)
      Conflicts resolved by Dylan
      
      Conflicts:
      	src/compiler/nir/nir_opt_algebraic.py
      dfe2258c
    • Dylan Baker's avatar
      cherry-ignore: Add more 19.1 patches · 0ed91c77
      Dylan Baker authored
      0ed91c77
    • Gert Wollny's avatar
      Revert "softpipe/buffer: load only as many components as the the buffer resource type provides" · cab826d5
      Gert Wollny authored
      This reverts commit 865b9dda.
      
      The buffer always reports format PIPE_FORMAT_R8_UNORM so with this patch only
      one component would be supported. The original issue is still relevant, but
      the fix should be different.
      Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
      Reviewed-by: 's avatarDave Airlie <airlied@redhat.com>
      (cherry picked from commit 0f598ed7)
      cab826d5
    • Jason Ekstrand's avatar
      anv: Only consider minSampleShading when sampleShadingEnable is set · 93d278a7
      Jason Ekstrand authored
      From the Vulkan 1.1.107 spec:
      
          Sample shading is enabled for a graphics pipeline:
      
            - If the interface of the fragment shader entry point of the
              graphics pipeline includes an input variable decorated with
              SampleId or SamplePosition. In this case minSampleShadingFactor
              takes the value 1.0.
      
            - Else if the sampleShadingEnable member of the
              VkPipelineMultisampleStateCreateInfo structure specified when
              creating the graphics pipeline is set to VK_TRUE. In this case
              minSampleShadingFactor takes the value of
              VkPipelineMultisampleStateCreateInfo::minSampleShading.
      
          Otherwise, sample shading is considered disabled.
      
      In other words, if sampleShadingEnable is set to VK_FALSE, we should
      ignore minSampleShading.
      
      Cc: mesa-stable@lists.freedesktop.org
      Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      (cherry picked from commit 1c92358b)
      93d278a7
    • Samuel Pitoiset's avatar
      radv: add a workaround for Monster Hunter World and LLVM 7&8 · 7be21f65
      Samuel Pitoiset authored
      The load/store optimizer pass doesn't handle WaW hazards correctly
      and this is the root cause of the reflection issue with Monster
      Hunter World. AFAIK, it's the only game that are affected by this
      issue.
      
      This is fixed with LLVM r361008, but we need a workaround for older
      LLVM versions unfortunately.
      
      Cc: "19.0" "19.1" <mesa-stable@lists.freedesktop.org>
      Signed-off-by: Samuel Pitoiset's avatarSamuel Pitoiset <samuel.pitoiset@gmail.com>
      Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      (cherry picked from commit d7501834)
      7be21f65
    • Nanley Chery's avatar
      anv: Fix some depth buffer sampling cases on ICL+ · e8d9b339
      Nanley Chery authored
      Don't attempt sampling with HiZ if the sampler lacks support for it. On
      ICL, the HW docs state that sampling with HiZ is not supported and that
      instances of AUX_HIZ in the RENDER_SURFACE_STATE object will be
      interpreted as AUX_NONE.
      
      Cc: <mesa-stable@lists.freedesktop.org>
      Reviewed-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: Anuj Phogat's avatarAnuj Phogat <anuj.phogat@gmail.com>
      (cherry picked from commit 629806b5)
      e8d9b339
    • Caio Marcelo de Oliveira Filho's avatar
      nir: Fix nir_opt_idiv_const when negatives are involved · fe7f221d
      Caio Marcelo de Oliveira Filho authored
      First, allow the case for negative powers of two.  Then ensure that we
      use the absolute value of the non-constant value to calculate the
      quotient -- this was hinted in the code by the name 'uq'.
      
      This fixes an issue when 'd' is positive and 'n' is negative.  The
      ishr will propagate the negative sign and we'll use nir_ineg() again,
      incorrectly.
      
      v2: First version used only ishr, but that isn't sufficient, since it
          never can produce a zero as a result.  (Jason)
          Allow negative powers of two.  (Caio)
      
      Fixes: 74492eba "nir: Add a pass for lowering integer division by constants"
      Reviewed-by: Jason Ekstrand's avatarJason Ekstrand <jason@jlekstrand.net>
      (cherry picked from commit 8a995f2b)
      fe7f221d
    • Jason Ekstrand's avatar
      intel/fs/ra: Stop adding RA interference to too many SENDS nodes · 0d645c98
      Jason Ekstrand authored
      We only have one node per VGRF so this was adding way too much
      interference.  No idea how we didn't catch this before.
      
      Shader-db results on Kaby Lake:
      
          total instructions in shared programs: 15311100 -> 15311100 (0.00%)
          instructions in affected programs: 0 -> 0
          helped: 0
          HURT: 0
      
          total cycles in shared programs: 355468050 -> 355543197 (0.02%)
          cycles in affected programs: 2472492 -> 2547639 (3.04%)
          helped: 17
          HURT: 20
      
      Fixes: 014edff0 "intel/fs: Add interference between SENDS sources"
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      (cherry picked from commit 096ad8a8)
      0d645c98
    • Jason Ekstrand's avatar
      intel/fs/ra: Only add dest interference to sources that exist · 1621a5ab
      Jason Ekstrand authored
      Fixes: 83dedb63 "i965: Add src/dst interference for certain"
      Reviewed-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
      (cherry picked from commit 88cac122)
      1621a5ab
    • Gert Wollny's avatar
      softpipe/buffer: load only as many components as the the buffer resource type provides · 2274d43f
      Gert Wollny authored
      Otherwise we risk to read past the end of the buffer.
      
      In addition, change the loop counters to unsigned to be consistent
      with the types.
      
      Fixes: afa8707b
          softpipe: add SSBO/shader atomics support.
      Signed-off-by: Gert Wollny's avatarGert Wollny <gert.wollny@collabora.com>
      Reviewed-by: 's avatarDave Airlie <airlied@redhat.com>
      (cherry picked from commit 865b9dda)
      2274d43f
  4. 13 May, 2019 3 commits
  5. 10 May, 2019 3 commits
    • Dylan Baker's avatar
      cherry-ignore: add patches for panfrost · 1221311f
      Dylan Baker authored
      there is no panfrost in 19.0
      1221311f
    • Leo Liu's avatar
      winsys/amdgpu: add VCN JPEG to no user fence group · 1ad8a0e7
      Leo Liu authored
      There is no user fence for JPEG, the bug triggering
      kernel WARN_ON(flags & AMDGPU_FENCE_FLAG_64BIT)
      Signed-off-by: Leo Liu's avatarLeo Liu <leo.liu@amd.com>
      Acked-by: Christian König's avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: Bas Nieuwenhuizen's avatarBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
      Cc: mesa-stable@lists.freedesktop.org
      (cherry picked from commit ceba9ff2)
      1ad8a0e7
    • Lionel Landwerlin's avatar
      anv: Use corresponding type from the vector allocation · f4ab8553
      Lionel Landwerlin authored
      We didn't notice this issue much because the 2 struct share a similar
      layout, expect for the additional fields...
      
      We run into that issue in Anv :
      
      ==15236== Invalid write of size 8
      ==15236==    at 0x8CF3939C: anv_state_table_expand_range (anv_allocator.c:211)
      ==15236==    by 0x8CF394D5: anv_state_table_grow (anv_allocator.c:264)
      ==15236==    by 0x8CF3967E: anv_state_table_add (anv_allocator.c:312)
      ==15236==    by 0x8CF3B13C: anv_state_pool_alloc_no_vg (anv_allocator.c:1167)
      ==15236==    by 0x8CF3B2B0: anv_state_pool_alloc (anv_allocator.c:1190)
      ==15236==    by 0x8CF60871: alloc_surface_state (anv_image.c:1122)
      ==15236==    by 0x8CF61FF9: anv_CreateImageView (anv_image.c:1519)
      ==15236==    by 0x8BCBD2ED: vkCreateImageView (trampoline.c:1358)
      ==15236==  Address 0x8994ef10 is 0 bytes after a block of size 128 alloc'd
      ==15236==    at 0x4C2FB0F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
      ==15236==    by 0x8D2578E6: u_vector_init (u_vector.c:47)
      ==15236==    by 0x8CF3929A: anv_state_table_init (anv_allocator.c:168)
      ==15236==    by 0x8CF3A99A: anv_state_pool_init (anv_allocator.c:921)
      ==15236==    by 0x8CF56517: anv_CreateDevice (anv_device.c:1909)
      ==15236==    by 0x8BCB4FBA: terminator_CreateDevice (loader.c:6073)
      ==15236==    by 0x8DD2CB3D: ??? (in /home/djdeath/.steam/ubuntu12_64/libVkLayer_steam_fossilize.so)
      ==15236==    by 0x8DF4D241: vkCreateDevice (in /home/djdeath/.steam/ubuntu12_64/steamoverlayvulkanlayer.so)
      ==15236==    by 0x8BCB35C6: loader_create_device_chain (loader.c:5449)
      ==15236==    by 0x8BCBC230: vkCreateDevice (trampoline.c:838)
      
      v2: Rename mmap_cleanups to avoid confusion (Caio)
      
      v3: s/fail_mmap_cleanups/fail_cleanups/ (Caio)
      Signed-off-by: Lionel Landwerlin's avatarLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=110648
      Cc: <mesa-stable@lists.freedesktop.org>
      Reviewed-by: Caio Marcelo de Oliveira Filho's avatarCaio Marcelo de Oliveira Filho <caio.oliveira@intel.com>
      (cherry picked from commit f2f6ac1c)
      f4ab8553
  6. 09 May, 2019 5 commits
  7. 08 May, 2019 13 commits