Commit graph

180823 commits

Author SHA1 Message Date
Faith Ekstrand
8e00ee6fe8 nak: Drop OpAtomCas in favor of OpAtom with atom_op == CmpExch
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26181>
2023-11-14 16:38:02 +00:00
Faith Ekstrand
ea453b373d nak: Fix copy-prop for OpPLop3 sources
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26181>
2023-11-14 16:38:02 +00:00
Faith Ekstrand
a65518b625 nvk: Free NAK shaders
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26181>
2023-11-14 16:38:02 +00:00
Rhys Perry
c4ee639ca0 docs: fix RADV_THREAD_TRACE_CACHE_COUNTERS default
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Fixes: dbab98d9d6 ("radv: enable RADV_THREAD_TRACE_CACHE_COUNTERS by default")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26193>
2023-11-14 16:24:11 +00:00
Jesse Natalie
2f1cb79968 d3d12: GL4.5
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
5a5178d5a4 d3d12: Fix MSAA-disabling pass; sample mask should be 0 for helper lanes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
ba06542c7b d3d12: Handle cull distance as an XFB target
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Jesse Natalie
263b56051d d3d12: PRIMITIVES_GENERATED for stream > 0 should only be an SO query
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26180>
2023-11-14 16:04:58 +00:00
Tatsuyuki Ishi
538ca7801a radv: Use shader part caching helpers for VS prolog and PS/TCS epilog.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26028>
2023-11-14 13:45:22 +00:00
Tatsuyuki Ishi
611545fbfe radv: Implement helpers for shader part caching.
Currently, shader part caching logic is duplicated between VS prolog and
PS/TCS epilogs. This commit introduces a common abstraction to
deduplicate the code.

Additionally, there are a few design decisions that diverts from the
current implementation:
1. A simple mutex is used instead of reader-writer lock. Prolog/epilog
   constructions are serialized, removing the need to free duplicate
   objects in case of a race.
2. A CS-local cache is used to quickly lookup an entry without holding a
   lock. This eliminates locking in over 99% of cases.
3. A set is used to reduce number of allocations.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26028>
2023-11-14 13:45:22 +00:00
Danylo Piliaiev
3cd6bb3e5d tu: Add a725 workaround dispatch at the start of each cmdbuf
Blob executes a special compute dispatch at the start of each
command buffers. We copy this dispatch as is. At this point
we don't know what this workaround is for.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25888>
2023-11-14 13:14:11 +00:00
Danylo Piliaiev
37f11ff1d4 freedreno/devices: Support Adreno 725
For 0x07030002 chip id different names are returned on different
phones: Adreno730v3 or Adreno725v1. Settle on 725 to disambiguate
them.

The only difference from base 730 is that it has conditional
execution of compute shader at the start of every command buffer.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25888>
2023-11-14 13:14:11 +00:00
Danylo Piliaiev
28f187b9a7 tu: Return error when GPU is unsupported
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25888>
2023-11-14 13:14:11 +00:00
Danylo Piliaiev
a669147689 tu: Always print startup failure messages
If we encounter an error during the startup we always want to have
it in the logs to quickly diagnose an issue from user attached logs.

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25888>
2023-11-14 13:14:11 +00:00
LingMan
76996e2a94 rusticl: Use the from_raw_parts wrappers
Deduplicates some safety checks and ensures we didn't forget one.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
471d89c4fd rusticl/api: Add checking wrappers around slice::from_raw_parts{_mut}
They check for null, alignment, excessive size, and address space wrapping. If any of the checks
fails, `Err(CL_INVALID_VALUE)` is returned.

The caller still has to uphold the other requirements of the `from_raw_parts` fns.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
572a96aa59 rusticl: Turn pointers in enqueue_svm_memcpy_impl into slices
Allows the closure to implement `Send` and `Sync`, which we want for `EventSig`.
Includes detailed documentation on the casts and unsafe operations.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
LingMan
7dd5a22735 rusticl: Turn pointers in enqueue_svm_mem_fill_impl into proper Rust types
Raw pointers have bad ergonomics and by using them we opt out of a lot of Rust safety guarantees.
The closure we create modifies the memory behind `svm_ptr`. Make that clear to the compiler by
representing it as slice. `pattern` could also be represented by a slice but then we'd create
overly generic code not exploiting the guarantees given to us be the OpenCL spec.
Namely that there's only a few possible sizes - all of them a power of two - and that `svm_ptr` is
aligned to that size.

Thus, represent `pattern` as one struct per possible size and have the compiler generate optimized
code paths for filling the buffer with each of them. There's one unsafe operation less and the
remaining ones as well as the casts have been documented in detail.

Based on that additional checks of the provided `size` have been added. While it's unlikely that
any application will ever run into them, the old pointer arithmetic already silently relied on
these properties.

Furthermore, since raw pointers are neither `Send` or `Sync` but the Rust types we now use are the
closure can now implement `Send` and `Sync`. That's one step toward marking `EventSig` `Send`.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26157>
2023-11-14 12:31:31 +00:00
Eric Engestrom
fdbb5d5898 ci/valve-infra: ensure the correct farm picks up the job
Until now, any farm that has a DUT that matches could have picked up the
job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25821>
2023-11-14 10:25:24 +00:00
Pierre-Eric Pelloux-Prayer
898ccf7711 radeonsi/ci: update failures
Remove GTF-GL46.gtf21.GLCoverage.CoverageGL21 from failing tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
2023-11-14 09:28:00 +00:00
Pierre-Eric Pelloux-Prayer
64352ae8e4 mesa: restore call to _mesa_set_varying_vp_inputs from set_vertex_processing_mode
Otherwise ctx->VertexProgram._VaryingInputs might not be up to date.

We can't do this in update_program because this breaks vbo_save_playback_vertex_list_gallium:

  const GLbitfield enabled = node->enabled_attribs[mode];
  _mesa_set_varying_vp_inputs(ctx, enabled);              <-- update _VaryingInputs

  if (ctx->NewState)
     _mesa_update_state(ctx);                             <-- calls update_program, reverting the
                                                              change made above

Fixes: c97961a855 ("mesa: fix 38% decrease in display list performance of Viewperf2020/NX8_StudioAA")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9441
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25956>
2023-11-14 09:28:00 +00:00
Samuel Pitoiset
dfc125d423 radv: fix VRS subpass attachment when HTILE can't be enabled on GFX10.3
On GFX10.3, VRS rates need to be copied to the HTILE buffer but in some
situations, like for mips, it's not always possible to enable HTILE.
In this case, we can fallback to our internal HTILE buffer and tweak
the depth/stencil registers to use this HTILE buffer.

This fixes a bunch of VRS crashes on GFX10.3.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26025>
2023-11-14 09:02:46 +00:00
Sagar Ghuge
648c0c159d anv: Flush data cache while clearing depth using HIZ_CCS_WT
Patch fxes ESO shadow pass ground corruption on Arc A750. In the colour
pass where the rendering corruption first appears, the depth resource
was used as a "PS - Texture".  Immediately afterwards there's a Barrier
where it goes from

	VK_IMAGE_LAYOUT_DEPTH_STENCIL_READ_ONLY_OPTIMAL =>
	VK_IMAGE_LAYOUT_DEPTH_STENCIL_ATTACHMENT_OPTIMAL

immediately following that there's a Clear from vkCmdBeginRendering
which appears to be a HiZ clear.  Things work when using AUX_USAGE_HIZ
but AUX_USAGE_HIZ_CCS_WT (XXX: and AUX_USAGE_HIZ_CCS?) doesn't work.

current thinking is this is related to 14015264727 where we had to add
HDC and DC flushes to CCS and MCS fast clears.  Maybe HiZ clears with
CCS also have similar problems?  The docs don't appear to indicate that
but the docs were also wrong for color clears until recently...

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9277
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9444
Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22717>
2023-11-14 08:30:59 +00:00
Tapani Pälli
e4db19afa7 iris: add data cache flush for pre hiz op
This fixes various failing Piglit tests on DG2.

Cc: mesa-stable
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22717>
2023-11-14 08:30:59 +00:00
Maíra Canal
4d95b4861e v3dv: implement VK_EXT_multi_draw
Implement the Vulkan extension VK_EXT_multi_draw. It was tested with
deqp-vk -n dEQP-VK.draw.*multi_draw*.

Signed-off-by: Maíra Canal <mcanal@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26138>
2023-11-14 06:20:21 +00:00
Lionel Landwerlin
794b0496e9 anv: enable protected memory
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Lionel Landwerlin
fd40134487 anv: allow protected GEM context creation
v2: Update new anv_gem_create_context_engines()

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Lionel Landwerlin
be201008ca anv: Emit protection + session ID on protected command buffers
v2: Add the missing PIPE_CONTROL enable/disable bits

v3: Use new I915_PROTECTED_CONTENT_DEFAULT_SESSION

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Lionel Landwerlin
be327b1452 anv: allow creation of protected queues
v2: Add helper for getting queue properties

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Lionel Landwerlin
5f2c77a10a anv: handle protected memory allocation
v2: Add assert on VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT in vkMapMemory

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Lionel Landwerlin
5ef8587b1e intel: fix PXP status check
Current check doesn't work on older kernels.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8064>
2023-11-14 05:55:54 +00:00
Faith Ekstrand
ade73d2e7f nvk: Stop asserting 11-bit storage image handles
Now that NAK is the default for Turing+, we can just chalk any storage
image descriptor handle overruns up to codegen bugs.  We could plumb
shader stages all the way through to here and only assert when codegen
is in use but that's a lot of work just for an assert.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
92cb4cc7f6 nvk: Default to NAK on Turing+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
M Henning
f2495f47a7 nvk: Use load_global_constant for ubo loads
and support load_global_constant in nak

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
M Henning
1d7e051a7f nak: Add MemOrder::Constant
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
M Henning
2a02a0d0b3 nak: Bind nir_intrinsic_access
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
M Henning
dfb6260483 nak: Specify MemScope on MemOrder::Strong
The scope isn't relevant on MemOrder::Weak. In fact, ptxas refuses
any input that specifies a scope on weak loads. So, don't make those
combinations representable in our IR.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
94ea8a5883 ci: Update the python env for ci_run_n_monitor.py
Without this, it blows up on Fedora 39 because of changes introduced by
Python 3.12 which break a a couple of our dependencies.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
6b8cdf84f0 ci: Add syn to --force-fallback-for
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
07e860d3a2 ci: Bump container images for NAK dependencies
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
f54b1f1e77 meson: Set build.rust_std
This is needed because meson currently makes rust_std part of the build
environment and therefore per-arch.  This is a bit nonsense but it's not
too hard to work around.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
e43e8f3f78 nak: Require meson 1.3.0 and clean up a couple bits
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
7feba721c5 nak: Rely on Rust 1.73 for next_multiple_of() and div_ceil()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
c7c73d6d17 nvk: Enable subgroups features
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
4bd9c99ca0 nak: Document a bit in encode_lds()
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
0177373e2d nak: Insert an OpNop after OpBar
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
e111bfdb5c nak: Emit MemBar before Bar
This is what NVIDIA does. I'm not sure why this order but it seems
necessary to pass some of the 1.1 memory model tests.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
bc58620e1e nak: Use the simplified BAR.SYNC encoding
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
4f2f9c6ab3 nak: Use strong ordering for Image load/store
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00
Faith Ekstrand
ec2c866a77 nak: Emit CCtl in barriers with acq/rel semantics
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24998>
2023-11-14 00:48:15 +00:00