Commit Graph

188351 Commits

Author SHA1 Message Date
Eric R. Smith dae6b6a23d panfrost: fix an incorrect stencil clear optimization
We track stencil clears and writes to optimize them. Unfortunately, the
code for doing this tracks the whole resource, not individual layers or
levels within the resource, which can result in incorrect output when
different levels or layers are accessed. Modified to optimize only the first
layer/level; this will handle the common case of a single stencil texture
while allowing arrays or mipmaps to still work (albeit slightly slower).

The original optimization was introduced in a2463ec271 ("panfrost:
Constant stencil buffer tracking") but the code has been reformatted
since then, so this change won't apply as-is that far back (although it's
fairly obvious how to apply it by hand).

Fixes: a2463ec271 ("panfrost: Constant stencil value tracking")
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28832>
2024-04-22 16:43:51 +00:00
Mike Blumenkrantz e89123ec73 zink: prune some piglit cts fails
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28859>
2024-04-22 16:16:59 +00:00
Yonggang Luo bf2df78575 broadcom/common: Now "util/box.h" is under src, so remove the FIXME
Remove the redundant inc_gallium_aux and inc_gallium

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28854>
2024-04-22 15:01:34 +00:00
Tomeu Vizoso ef111f5f07 etnaviv: Don't init the blitter in compute-only contexts
Otherwise, we hit this assertion:

etna_vertex_elements_state_create: Assertion `buffer_idx < screen->specs.stream_count' failed.

As specs.stream_count can be zero in GPUs that are compute only.

Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28848>
2024-04-22 14:28:46 +00:00
Samuel Pitoiset 095e3af2b0 radv: add RADV_DEBUG=psocachestats to report per-pipeline cache hits/misses
This can be useful to make sure precompilation works as expected.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset 1f4ee45914 radv: rework pipeline cache search helpers
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset bbe52934b6 radv: use radv_pipeline::sha1 for graphics/compute pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset 6e24da3ad4 radv/rt: move radv_ray_tracing_pipeline::sha1 to radv_pipeline
To re-use it for graphics/compute pipelines.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Samuel Pitoiset 862d53f00a radv/rt: remove unnecessary param to radv_ray_tracing_pipeline_cache_insert()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28829>
2024-04-22 13:54:05 +00:00
Robert Mader 6bbf8a08a4 panfrost: Use pipe resource helper
Like we already do in panfrost_resource_get_param().
While on it, update the later to use pan_resource() again for
consistency. No functional changes intended.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28362>
2024-04-22 13:28:41 +00:00
Rhys Perry e0db4b458b radv: cache RT stage info
If a RT pipeline misses the cache but it's imported stages hit the cache,
then can_inline might be false when it should be true.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28788>
2024-04-22 11:55:26 +00:00
Joshua Ashton 122455b686 radv: Properly initialize imageCreateFlags in GetPhysicalDeviceVideoFormatPropertiesKHR
Signed-off-by: Joshua Ashton <joshua@froggi.es>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28841>
2024-04-22 11:33:39 +00:00
Eric Engestrom ba32ea6da3 llvmpipe/ci: update expectations after piglit uprev
Fixes: ec45e8294c ("Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28853>
2024-04-22 10:56:45 +00:00
Eric Engestrom dc387e000c radeonsi/ci: update vangogh expectations after piglit uprev
Fixes: ec45e8294c ("Uprev Piglit to f7ece74a107a2f99b2f494d978c84f8d51faa703")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28852>
2024-04-22 12:14:44 +02:00
M Henning 6b22fff658 nvk: Don't use a descriptor cbuf if it's too large
This fixes a test on vkd3d-proton commit 836446ce25
VKD3D_TEST_FILTER=test_typed_buffers_many_objects_dxil build/tests/d3d12

Fixes: f1c909edd5 ("nvk/nir: Add cbuf analysis to nvi_nir_lower_descriptors()")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28844>
2024-04-22 08:45:37 +00:00
M Henning f6301a7727 nak: Count GLOBAL_SIZE_OFFSET in bytes, not words
This matches what nvk_mme_dispatch_indirect expects

Fixes: 16f2249a ("nvk: Use the NAK helpers to fill QMDs")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28844>
2024-04-22 08:45:37 +00:00
Boris Brezillon 34ffa4cd10 nir/lower_blend: Fix nir_blend_logicop() for 8/16-bit integer formats
src and dst can be integer types, and doing an f2f on such types
messes up with the original value. Make sure we keep the original type
when {up,down}sizing the src, dst and out values.

Fixes: f3de2bd6c2 ("nir: Add blend lowering pass")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28839>
2024-04-22 09:58:41 +02:00
Marek Olšák e5f133ccc4 util: import pipe_box and its helpers
We'll use them. There are also new helpers that we'll use.

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28733>
2024-04-22 01:42:52 +00:00
Marek Olšák 959891e33f util: add new format helpers
we'll use them

Reviewed-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28733>
2024-04-22 01:42:52 +00:00
Gert Wollny 2bb102f020 r600/sfn: Don't put b2f64 conversion into ALU group
There is no need to pin the ops into channels because
these are 32 bit ops that can be executed independent
from each other.

Fixes: 79ca456b48
     r600/sfn: rewrite NIR backend

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny 07995b98a8 r600/sfn: when emitting fp64 op2 groups pre-load values
Since the group is created from the onset, we have to make
sure that four or eight src values don't have a readport
conflict, so force a pre-loading of the values to registers
evenly distributed over the channels and let copy-propagation
take care of cleaning up un-neccesary moves.

Fixes: 79ca456b48
   r600/sfn: rewrite NIR backend

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny 36c81b5e88 r600/sfn: call nir_lower_doubles explicitely
Fixes: 5218cff34b
    nir/algebraic: avoid double lowering of some fp64 operations

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny bf44ce61bb r600/sfn: Use dependecies to order barriers and LDS/RAT instructions
This gives more freedom to schedule the group barrier and removes
the need to add blocks around a barrier to keep the scheduler in
check. This should avoid emitting some CF instructions.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11002

Fixes: fe881bf097
    r600/sfn: move kill handling fully to scheduling

v2: grammar fixes (lorn10)

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Gert Wollny a61b658d5f r600/sfn: Add array element parent also to array
This is probably overdoing debendencies in many cases,
but it fixes a bug where scheduling goes wrong.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10984

Fixes: ddb167e81a
  r600/sfn: Handle indirect array load/store dependencies better

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28840>
2024-04-21 19:06:02 +00:00
Manuel Stoeckl 04f232ed99 util/disk_cache: try getenv(HOME) before getpwuid->pw_dir
getenv("HOME") is significantly faster than getpwuid_r(...)->pw_dir,
because the latter may require loading NSS libraries, reading
/etc/passwd, etc.

Furthermore, the Linux man pages for getpwuid_r recommend using
getenv("HOME") instead of getpwuid_r, because the user may wish to
change the value of HOME after logging in.

Signed-off-by: Manuel Stoeckl <code@mstoeckl.com>
Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13614>
2024-04-20 13:43:50 +00:00
Konstantin Seurer c2b1555a57 ac/parse_ib: Always print the value of the whole register
ac_dump_reg is used by radv for dumping descriptors when writing a hang
report. Including the hex-value of the whole register help correlating
descriptors with SGPR values in the UMR wave dump.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin Seurer f4c6664d4b radv/debug: Dump descriptor binding information
Can be useful for correlating offsets with descriptors.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin Seurer e27deed2ab radv/debug: Try to find unbound shaders
Use radv_find_shader to correlate shaders to PCs.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin Seurer 23c167f826 radv: Canonicalize addresses in radv_find_shader
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin Seurer 48b79a18c5 radv/debug: Canonicalize shader addr
The most significant bits of the PC are cleared.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:23 +00:00
Konstantin Seurer 9778e1b9a0 ac/debug: Handle the output of recent umr versions
umr was changed to always display the human readable format.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10127
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28759>
2024-04-20 08:29:22 +00:00
Timur Kristóf 65f5f1559f ac/nir/ngg: Fix packing 16-bit MS outputs.
Fixes: 9f36fba9be

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:34 +02:00
Timur Kristóf c6c9da0336 ac/nir/lower_legacy_gs: Implement packed 16-bit GS outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:32 +02:00
Timur Kristóf abfce64880 ac/nir/lower_legacy_vs: Implement packed 16-bit VS/TES outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:30 +02:00
Timur Kristóf 4a11323513 ac/nir/ngg: Implement packed 16-bit GS outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:28 +02:00
Timur Kristóf 0f85f9060b ac/nir/ngg: Implement packed 16-bit VS/TES outputs in non-dedicated slots.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28765>
2024-04-20 09:30:10 +02:00
Robin Kertels d097a60d57 nvk: Advertise VK_KHR_shader_subgroup_rotate.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27863>
2024-04-19 21:05:14 +00:00
Robin Kertels 714acf7d21 nak: Enable lowering rotate to shuffle.
Signed-off-by: Robin Kertels <robin.kertels@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27863>
2024-04-19 21:05:14 +00:00
Faith Ekstrand 42b85780c6 nil: Advertise S8_UINT on MaxwellB+
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand 58b5f6b678 nil: Be more speicific about Maxwell in the format table
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand 4821c49ca7 nil: add s8 pte kind
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand 208f8ed429 nil: Use the enums from the hwref headers for PTE kinds
This isn't an exact translation.  It's identical to the previous values
for all uncompressed items but I fixed some of the compressed ones
(which we don't currently use) based on the enum names.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand 51ffb45b5c nouveau/headers: Add the MMU headers to the Rust crate
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 15:43:14 -05:00
Faith Ekstrand 3bd8a2568d nouveau: Import the hwref headers from Nvidia OGK
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24596>
2024-04-19 14:20:35 -05:00
Faith Ekstrand 16f2249a80 nvk: Use the NAK helpers to fill QMDs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand 9ace83603d nvk: QMDs are 64 dwords
All the QMD structs are 2048 bits which, unless I'm doing my math wrong,
is 64 dwords, not 128.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand b9c0e3c1ab nak: Add helpers for filling QMDs
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:03 +00:00
Faith Ekstrand 64f02ac16d nouveau/headers: Generate Rust for QMDs
This also involves adding array support to the struct parser.
Fortunately, the header files for QMDs are really consistent here and we
can make lots of assumptions like that i is always the index variable.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00
Faith Ekstrand 20c1a69125 nouveau/headers: Move the classes into a submodule for Rust
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00
Faith Ekstrand 7e87f3ccde nvk: Restrict shaderFloat16 to Ampere+ for now
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28756>
2024-04-19 18:56:02 +00:00