Commit Graph

178814 Commits

Author SHA1 Message Date
Lionel Landwerlin
29352b304b anv: add support for VK_EXT_nested_command_buffer
Our implementation of secondary command buffers already jumps into
them and edits the end of the secondary command buffer to jump back
into the primary.

That implementation can work just the same with any levels of
secondary. The only possible issue would happen with a secondary
calling itself, but that's not possible.

We also cannot support simultaneous execution with self-modifying
command buffers. That's actually not a problem at the moment because
we don't have multiple queues of the same family but we choose to
reflect that in the feature bits.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>
2023-10-11 11:32:47 +00:00
Lionel Landwerlin
8a12286214 anv: rename primary in container in ExecuteCommands()
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>
2023-10-11 11:32:47 +00:00
Lionel Landwerlin
798130b8aa vulkan: bump headers/registry to 1.3.267
Reviewed-By: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25600>
2023-10-11 11:32:47 +00:00
Lucas Stach
1e80011bc7 Revert "ci/etnaviv: allow failure on failing test"
This reverts commit 2ac2268ce7, as the issue causing the
test to fail has been resolved.

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25646>
2023-10-11 11:17:28 +00:00
Lucas Stach
aeb6584ecd etnaviv: fix read staging buffer leak
Currently we only free a potentially allocated staging buffer
when the mapping is a write mapping, but staging buffers can
also be allocated for read mappings. Fix the read staging
buffer leaks by always freeing the staging buffer.

Closes #9967

Cc: mesa-stable
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25646>
2023-10-11 11:17:28 +00:00
Matt Coster
c619d9c1b6 pvr: Clean up & fix sampler border color support
Take advantage of some vk_sampler goodness and migrate all pvr
tex_formats to map to pipe_formats in pvr_formats.c. This allows us to
get rid of all the nasty manual packing functions.

This cleanup incidentally fixes some bad swizzling that was happening
in the manual handling.

Fixes: 4a2e6284 pvr: Add support for sampler border colors
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25270>
2023-10-11 10:58:34 +00:00
Matt Coster
efb9b03637 pvr: Use vk_sampler base
Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25270>
2023-10-11 10:58:33 +00:00
Matt Coster
a92d536cd7 pvr: Switch to common pipeline cache implementation
We don't currently make use of pipeline caching, but the common
implementation handles the boilerplate we had in pvr_pipeline_cache.c
for us.

Signed-off-by: Matt Coster <matt.coster@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25422>
2023-10-11 10:41:43 +00:00
Danylo Piliaiev
2717499c91 tu: Disable preamble push consts when they are not used
It's a common case for Zink which has to declare push consts in
pipeline layout, even if they are not actually used in shaders, due
to the compatibility rules.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25641>
2023-10-11 09:40:21 +00:00
Karmjit Mahil
8f59274e22 pvr: Fix PPP_SCREEN sizes
The `- 1` was accidentally removed.

Fixes: aae23fe68d ("pvr: HWRT creation simplifications.")
Reported-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
df57840dd0 pvr: Fix SPM load shader sample rate
Reported-by: James Glanville <james.glanville@imgtec.com>
Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
41a9af4819 pvr: Refactor subpass ds and sample count setup
Now we first check the sample count from the ds attachment as well
as setting it up.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
e07cff4ac5 pvr: Fix subpass sample count on ds attachment only
When no color attachments were used in a subpass, the sample count
was left unchanged to `1` while we should instead have picked it
up from the ds attachment if there was one.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
bfcb88ea99 pvr: Order tile buffer EOT emits to be last
Tile buffer emits required a load from the tile buffer into the
output regs, so they must be placed at the end of the EOT program
as to not corrupt the output register emits.

This commit orders the emit state to place output register emits
first, and tile buffer emits last.

dEQP test fixed:
  dEQP-VK.renderpass.suballocation.attachment.4.422
  ... and others from the dEQP-VK.renderpass.suballocation.*

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
9d1fc4de72 pvr: Fix OOB access of pbe_{cs,reg}_words
`hw_render->eot_surface_count` also includes surface which don't
need an emit. Using `i` was leading to OOB access when there were
surfaces that didn't need emits, and in total there were
`> PVR_MAX_COLOR_ATTACHMENTS` surfaces.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
e5feea3826 pvr: Fix pbe_emit assert
The `eot_surface_count` also includes surfaces which don't need an
emit. Surfaces with PVR_RESOLVE_TYPE_TRANSFER don't need an emit
since they'll be resolved through a transfer op, but they still count
against the total, thus the assert was incorrect.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Karmjit Mahil
e6c1e0e518 pvr: Fix MRT index in PBE state
The same MRT index was incorrectly being set for all render
targets, in the PBE state.

Signed-off-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25584>
2023-10-11 08:19:30 +00:00
Faith Ekstrand
65f12fde44 nvk: Improve address space and buffer size limits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:57:10 -05:00
Faith Ekstrand
b0d0c2d765 nvk: Always emit at least one color attachment
Without this, alpha to coverage doesn't work because the hardware
ignores the output of the first color from the shader.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:58 -05:00
Faith Ekstrand
e9747eb91f nvk: Disable depth or stencil tests when unbound
Dynamic rendering requires that the client be able to bind just one
aspect of a depth/stencil image.  Because we only have interleaved
depth/stencil on NVIDIA and no actual disable bits, this means we need
to implicitly AND any enables with a vk_format != UNDEFINED check.  In
future, we might want to do that with a macro but we'll keep it simple
for today.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:38 -05:00
Faith Ekstrand
6ab969ff4a nil/format: Advertise R10G10B10A2_UINT texture buffer support
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:28 -05:00
Faith Ekstrand
7bedd0c2fc nil/format: Use A for alpha blend
This lets us reserve B for buffer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:21 -05:00
Faith Ekstrand
1c4d5135a6 nvk: Reset descriptor pool allocator when all sets are destroyed
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:14 -05:00
Faith Ekstrand
9a51185d45 nvk: Set max descriptors to 2^20 for most descriptor types
Dynamic is the exception here.  Those have much stricter limits.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:56:04 -05:00
Faith Ekstrand
3d3641e446 nvk: Emit MME_DMA_SYSMEMBAR before indirect draw/dispatch
This fixes issues where we may read stale data from other parts of the
GPU when we go to do an indirect draw fetch.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:55:56 -05:00
Faith Ekstrand
160bf37bc4 nvk: Advertise more inline uniform block limits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25653>
2023-10-11 02:55:44 -05:00
Eric Engestrom
9c2b523c53 ci/b2c: use latest mesa-trigger image
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25643>
2023-10-11 06:37:20 +00:00
Eric Engestrom
298f2db76d ci/b2c: move to the shiny new gfx-ci/ci-tron repo
We've successfully moved the repo to its new location now that the
project is ready for general use.

Update the config to use the new paths.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25643>
2023-10-11 06:37:19 +00:00
Karol Herbst
7afdbd5f6d nir/load_libclc: fix libclc memory leak
Fixes: ef453f5439 ("spirv: Add a shared libclc loader")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25649>
2023-10-11 03:05:23 +00:00
Qiang Yu
a59a66e111 radeonsi: disable disk cache when use aco
This is a temp fix. Currently we mix use llvm and aco to compile
shaders when AMD_DEBUG=useaco, but disk cache need function
identifier when creation, aco compiled shader should not use llvm
function identifier, so we have to disable disk cache when use
aco for now.

After aco is able to compile all shaders, we can re-enable disk
cache by removing the llvm function identifier when aco.

Fixes: d1dd36a74e ("radeonsi: be able to use aco compiler for mono ps")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9673
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25607>
2023-10-11 02:36:29 +00:00
Mike Blumenkrantz
e8a76adde8 lavapipe: don't block begin/end cmdbuf pipeline barriers
these are now useful

fixes #9972

Fixes: 3b547a9b58 ("lavapipe: Switch to the common sync framework")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25652>
2023-10-11 01:34:42 +00:00
Mike Blumenkrantz
7078cd3652 zink: set ZINK_DEBUG=quiet for polaris jobs
modifiers aren't supported here, so this will otherwise spam infinitely

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25645>
2023-10-10 23:12:17 +00:00
Mike Blumenkrantz
eb94d235fb zink: apply ZINK_DEBUG=quiet to all missing feature warnings
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25645>
2023-10-10 23:12:17 +00:00
Dave Airlie
833f04d261 lavapipe + docs: update ycbcr extension enables.
This passes all the dEQP-VK.ycbcr* tests and updates the docs.

Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25628>
2023-10-11 05:54:14 +10:00
Karol Herbst
119c213087 rusticl/memory: fix potential use-after-free in clEnqueueSVMMemFill
Fixes: bfee3a8563 ("rusticl: add support for fine-grained system SVM")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reported-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25637>
2023-10-10 18:41:48 +00:00
Frank Binns
a157ab7b33 pvr: emit PPP state when vis_test dirty bit is set
Unlike other dirty bits, the vis_test dirty bit wasn't being taken into
consideration when determining whether PPP state needed to be emitted as part
of a draw call.

Fixes a large number of tests in dEQP-VK.query_pool.occlusion_query.*.

Fixes: 2b1992a000 ("pvr: Implement vkCmdBeginQuery API.")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25491>
2023-10-10 18:27:01 +00:00
Frank Binns
a44ec36684 pvr: fix setup of load op unresolved msaa mask
Bits were being assigned rather than ORed into the mask during setup. Noticed
through code inspection.

Fixes: e089166776 ("pvr: Add support for VK_ATTACHMENT_LOAD_OP_LOAD.")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25487>
2023-10-10 18:10:52 +00:00
Frank Binns
ae277edc3a pvr: change a few places to use PVR_DW_TO_BYTES()
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25489>
2023-10-10 17:54:14 +00:00
Frank Binns
6417a65f28 pvr: fix allocation size of clear colour consts shared regs buffer
The number of const shared registers was being used for the allocation size
rather than the number of bytes. In practice this doesn't make a difference as
the max allocation size is 24 bytes, which then gets rounded up to 64 bytes by
the buffer allocation function. However, we might as well make the allocation
size correct to avoid any future confusion. Noticed through code inspection.

Fixes: 7509e259f8 ("pvr: Implement color/depth/depth+stencil attachment clear.")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25489>
2023-10-10 17:54:14 +00:00
Frank Binns
e8f6d7b0d4 pvr: fix attachments segfault in pvr_is_stencil_store_load_needed()
pvr_is_stencil_store_load_needed() may be called on secondary command buffers,
which don't have any attachments. This wasn't being taken into account, meaning
a segfault could occur.

Fixes a segfault seen in:
dEQP-VK.renderpass.suballocation.attachment_allocation.input_output.39

Fixes: 54876512a1 ("pvr: Add mid fragment pipeline barrier if needed.")
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25486>
2023-10-10 17:40:10 +00:00
Martin Roukala (né Peres)
852d004637 zink/ci: remove 42 tests from the zink-radv-polaris10-fails list
Not sure which MR fixed them, but I'll take these fixes!

Signed-off-by: Martin Roukala (né Peres) <martin.roukala@mupuf.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25629>
2023-10-10 17:11:19 +00:00
Roman Stratiienko
7301914755 dri: Remove __driDriverExtensions leftovers
Android-14/clang-17 throws an error with it:

ld.lld: error: version script assignment of 'global' to symbol
   '__driDriverExtensions' failed: symbol not defined

Fixes: d43e6a9a49 ("dri: Remove the megadriver compat stub")
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25587>
2023-10-10 16:39:27 +00:00
Erik Faye-Lund
3485744087 zink: fix wording of warning
The string-argument for this function is the name of the feature, not
the entire message.

Fixes: ea0e22da44 ("zink: use warn_missing_feature for missing modifier support")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25644>
2023-10-10 16:11:05 +00:00
Samuel Pitoiset
052d12492d ac/nir: only consider overflow for valid feedback buffers
Otherwise the ordered operation above (ie. a GDS atomic return) might
return non-zero offsets for invalid buffers.

Fixes: f7076d129d ("amd: add nir_intrinsic_xfb_counter_sub_amd and fix overflowed streamout offsets")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25613>
2023-10-10 15:47:54 +00:00
Samuel Pitoiset
bbf135db3d radv: allocate only 1 GDS OA counter for gfx10 NGG streamout
It works with just one counter.

This mitigates https://gitlab.freedesktop.org/drm/amd/-/issues/2902
quite a lot when you run dEQP-VK.transform_feedback.* in parallel on
more than 16 threads with RDNA3.

For example, on my GPU the kernel reports 16 GDS OA counters which means
that if you run VKCTS with 16 threads (ie. 16 Vulkan devices are
created) it's fine. Otherwise, the kernel might report ENOMEM.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25619>
2023-10-10 15:12:26 +00:00
Samuel Pitoiset
7c7684c656 radv: fix destroying GDS/OA BOs
Otherwise, we have dangling BO pointers in the global BO list. Not
quite sure why this hasn't been triggered before.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25623>
2023-10-10 14:31:01 +00:00
Alyssa Rosenzweig
731e682cc0 freedreno/ci: Minetest
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24011>
2023-10-10 13:51:00 +00:00
Alyssa Rosenzweig
b3da29ae58 nir/opt_preamble: Respect ACCESS_CAN_SPECULATE
In general, it is unsafe to speculatively hoist conditionally executed loads
into the preamble. For example, if the shader does:

   if (ptr is valid) {
      foo(*ptr)
   }

we cannot dereference ptr in the preamble without knowing that the pointer is
valid (which may not be determinable, since it might not be uniform).
nir_opt_preamble needs to stop speculating in this case, or otherwise using
preambles can cause faults on legal shaders.

However, some platforms may be able to speculate loads safely. For example,
Apple hardware is able to suppress MMU faults, making speculation safe.  This is
controlled global register to control this behaviour, set at boot-time by the
kernel.  (macOS suppresses these faults unconditionally, this feature may be
used in their implementation of sparse textures. Currently Linux does not
suppress any faults but this may change later.)

Since nir_opt_preamble should work soundly and optimally on a variety of
platforms, we need to respect the ACCESS flag.

Thanks to the if-else hoisting implemented earlier in the series, this isn't too
terrible of a band-aid on Asahi:

    total instructions in shared programs: 1499674 -> 1507699 (0.54%)
    instructions in affected programs: 78865 -> 86890 (10.18%)
    helped: 0
    HURT: 337
    Instructions are HURT.

    total bytes in shared programs: 10238284 -> 10279308 (0.40%)
    bytes in affected programs: 554504 -> 595528 (7.40%)
    helped: 3
    HURT: 334
    Bytes are HURT.

    total halfregs in shared programs: 452049 -> 454015 (0.43%)
    halfregs in affected programs: 7569 -> 9535 (25.97%)
    helped: 7
    HURT: 150
    Halfregs are HURT.

There are no shader-db changes on ir3 as expected, since ir3 can safely
speculate all instructions in my shader-db.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24011>
2023-10-10 13:51:00 +00:00
Alyssa Rosenzweig
8d037d943d nir/opt_preamble: Move phis for movable if's
Add infrastructure to reconstruct if's. Later in the series, this will let us
hoist loads from inside uniform if's without speculating. For now, it lets us
handle phi's in nir_opt_preamble in a straightforward way.

Results on AGX are good:

   total instructions in shared programs: 1504730 -> 1499674 (-0.34%)
   instructions in affected programs: 153673 -> 148617 (-3.29%)
   helped: 496
   HURT: 0
   Instructions are helped.

   total bytes in shared programs: 10287768 -> 10238284 (-0.48%)
   bytes in affected programs: 1113724 -> 1064240 (-4.44%)
   helped: 496
   HURT: 0
   Bytes are helped.

   total halfregs in shared programs: 452669 -> 452049 (-0.14%)
   halfregs in affected programs: 14825 -> 14205 (-4.18%)
   helped: 152
   HURT: 99
   Halfregs are helped.

   total threads in shared programs: 16469504 -> 16470784 (<.01%)
   threads in affected programs: 8960 -> 10240 (14.29%)
   helped: 10
   HURT: 0
   Threads are helped.

Results on ir3 is a bit more of a wash but still should be a win overall: The
regression in moves seems scary, but the cost model already accounts for them as
evidenced by instruction count coming out ahead.

   total instructions in shared programs: 3108750 -> 3105993 (-0.09%)
   instructions in affected programs: 317367 -> 314610 (-0.87%)
   helped: 675
   HURT: 242
   Instructions are helped.

   total nops in shared programs: 673152 -> 675048 (0.28%)
   nops in affected programs: 74551 -> 76447 (2.54%)
   helped: 353
   HURT: 347
   Inconclusive result (%-change mean confidence interval includes 0).

   total non-nops in shared programs: 2435598 -> 2430945 (-0.19%)
   non-nops in affected programs: 232664 -> 228011 (-2.00%)
   helped: 816
   HURT: 38
   Non-nops are helped.

   total mov in shared programs: 78201 -> 84011 (7.43%)
   mov in affected programs: 10726 -> 16536 (54.17%)
   helped: 60
   HURT: 781
   Mov are HURT.

   total cov in shared programs: 74964 -> 74906 (-0.08%)
   cov in affected programs: 273 -> 215 (-21.25%)
   helped: 17
   HURT: 0
   Cov are helped.

   total dwords in shared programs: 6716814 -> 6748726 (0.48%)
   dwords in affected programs: 879778 -> 911690 (3.63%)
   helped: 12
   HURT: 948
   Dwords are HURT.

   total full in shared programs: 193210 -> 193212 (<.01%)
   full in affected programs: 278 -> 280 (0.72%)
   helped: 12
   HURT: 22
   Inconclusive result (value mean confidence interval includes 0).

   total constlen in shared programs: 493632 -> 494816 (0.24%)
   constlen in affected programs: 19904 -> 21088 (5.95%)
   helped: 9
   HURT: 306
   Constlen are HURT.

   total cat0 in shared programs: 742476 -> 745046 (0.35%)
   cat0 in affected programs: 84455 -> 87025 (3.04%)
   helped: 277
   HURT: 489
   Cat0 are HURT.

   total cat1 in shared programs: 153303 -> 159059 (3.75%)
   cat1 in affected programs: 17810 -> 23566 (32.32%)
   helped: 69
   HURT: 780
   Cat1 are HURT.

   total cat2 in shared programs: 1144508 -> 1140731 (-0.33%)
   cat2 in affected programs: 121284 -> 117507 (-3.11%)
   helped: 841
   HURT: 0
   Cat2 are helped.

   total cat3 in shared programs: 942098 -> 934804 (-0.77%)
   cat3 in affected programs: 87140 -> 79846 (-8.37%)
   helped: 855
   HURT: 1
   Cat3 are helped.

   total cat4 in shared programs: 65261 -> 65249 (-0.02%)
   cat4 in affected programs: 42 -> 30 (-28.57%)
   helped: 12
   HURT: 0
   Cat4 are helped.

   total sstall in shared programs: 237311 -> 241281 (1.67%)
   sstall in affected programs: 33755 -> 37725 (11.76%)
   helped: 179
   HURT: 493
   Sstall are HURT.

   total (ss) in shared programs: 58166 -> 58795 (1.08%)
   (ss) in affected programs: 4535 -> 5164 (13.87%)
   helped: 35
   HURT: 664
   (ss) are HURT.

   total systall in shared programs: 503784 -> 503805 (<.01%)
   systall in affected programs: 3170 -> 3191 (0.66%)
   helped: 16
   HURT: 13
   Inconclusive result (value mean confidence interval includes 0).

   total (sy) in shared programs: 27261 -> 27259 (<.01%)
   (sy) in affected programs: 76 -> 74 (-2.63%)
   helped: 8
   HURT: 5
   Inconclusive result (value mean confidence interval includes 0).

   total waves in shared programs: 439848 -> 439872 (<.01%)
   waves in affected programs: 160 -> 184 (15.00%)
   helped: 12
   HURT: 0
   Waves are helped.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24011>
2023-10-10 13:51:00 +00:00
Alyssa Rosenzweig
802fb8f7f3 nir/opt_preamble: Unify foreach_use logic
Deduplication in prep for reconstructing if's.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Connor Abbott <cwabbott0@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24011>
2023-10-10 13:51:00 +00:00