Marek Olšák
bd8d20543d
ac/llvm: fix inline assembly register constraints for ordered_add_loop_gfx12_amd
...
This is only known to fix the assembly code when num_atomics > 6, which is
not currently used.
The VGPRs are reordered to simplify the clobber constraint.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30063 >
2024-07-13 01:32:48 +00:00
Marek Olšák
b617c3b06e
ac/llvm: remove s_nop from ordered_add_loop_gfx12_amd
...
This is faster.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30063 >
2024-07-13 01:32:48 +00:00
Marek Olšák
11272a8d82
ac/nir: remove sleeps from gfx12 streamout code
...
This is faster.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30063 >
2024-07-13 01:32:48 +00:00
Marek Olšák
1b2cd628b8
nir: rename ordered_xfb_counter_add_gfx12_amd -> ordered_add_loop_gfx12_amd
...
because it can also be used by compute.
Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30063 >
2024-07-13 01:32:48 +00:00
Marek Olšák
1fd43bca2c
radeonsi: don't use CP DMA on GFX940
...
It's been defeatured.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30115 >
2024-07-13 00:58:30 +00:00
Marek Olšák
b0205a92d9
radeonsi: replace shader SHA1 hashes with BLAKE3
...
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30110 >
2024-07-12 23:43:55 +00:00
Marek Olšák
090f27035d
mesa: switch remaining shader functions from SHA1 to BLAKE3
...
This fixes shader replacements, which require BLAKE3 now.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30110 >
2024-07-12 23:43:55 +00:00
Yiwei Zhang
c2d26a5c08
venus: simplify cached mem type emulation
...
Instead of exposing the original cached memory type index and silently
remapping to the first coherent, we could directly append the cached bit
to the first coherent if coherent-cached doesn't exist.
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30144 >
2024-07-12 21:28:15 +00:00
Mike Blumenkrantz
9e37ec9cb6
zink: use maint7 to capture venus driver and more accurately use workarounds
...
maint7 provides the ability for virtualized drivers to pass along the
real driver's info, which allows for the enablement of per-driver workarounds
based on the underlying hardware
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29964 >
2024-07-12 21:04:02 +00:00
Mike Blumenkrantz
7e9d5c7b12
zink: hook up maintenance7
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29964 >
2024-07-12 21:04:02 +00:00
Mike Blumenkrantz
f9d451e837
zink: move all driverID checks to a helper function
...
no functional changes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29964 >
2024-07-12 21:04:01 +00:00
Caio Oliveira
f48b3bee31
intel/brw: Split off assembler logic into library
...
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30006 >
2024-07-12 19:34:23 +00:00
Faith Ekstrand
1f906f8715
zink/kopper: Set VK_COMPOSITE_ALPHA_OPAQUE_BIT when PresentOpaque is set
...
This is required for EGL_EXT_present_opaque to work correctly.
Fixes: 8ade5588e3
("zink: add kopper api")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11007
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30133 >
2024-07-12 15:22:44 +00:00
Mike Blumenkrantz
70b40fd2a0
zink: modify some buffer mapping behavior for buffer replacement srcs
...
if the src for a replace_buffer call is mapped after replacement:
* avoid clearing access flags
* update valid range
the pointer access here is always safe because the only case in which
this scenario can occur is if tc is forced to sync immediately after
creating a replaceent buffer, and the replacement buffer's lifetime
will always be exceeded by the lifetime of the real buffer
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107 >
2024-07-12 12:29:47 +00:00
Mike Blumenkrantz
76da22bfc2
zink: track the "real" buffer range from replacement buffers
...
when tc replaces a buffer in subdata, it may subsequently perform subdata calls
on the replacement if it is forced to sync during map, e.g.,
* bind_vbo(dst)
* draw
* subdata(src)
* buffer replacement
* map
* tc sync
* replace_buffer(dst, src)
* memcpy <- broken
* draw
in this scenario, src may not have data at the time of replacement,
but it will get data soon after, and this buffer range is the real one
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107 >
2024-07-12 12:29:47 +00:00
Mike Blumenkrantz
fa210726b6
zink: propagate valid buffer range to real buffer when mapping staging
...
cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30107 >
2024-07-12 12:29:47 +00:00
Danylo Piliaiev
7231eef630
tu: Have single Flush/Invalidate memory entrypoints
...
Make all flush/invalidation logic kernel independent. The only
downside is that aarch32 would have cached non-coherent memory
disabled, but there are probably no users of it.
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11468
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30131 >
2024-07-12 11:48:36 +00:00
Rohan Garg
5bb9c1cca9
anv: reuse existing macro to query for flushes
...
Signed-off-by: Rohan Garg <rohan.garg@intel.com >
Reviewed-by: José Roberto de Souza <jose.souza@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30102 >
2024-07-12 10:50:12 +00:00
Eric Engestrom
29c4961b53
v3d/ci: include results of CL run in expectations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30134 >
2024-07-12 10:12:38 +00:00
Eric Engestrom
10af395f72
v3d/ci: include results of GL full run in expectations
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30134 >
2024-07-12 10:12:38 +00:00
Samuel Pitoiset
aa1f00cf5c
nir/gather_info: handle uses_fbfetch_output for texture operations
...
Like nir_texop_txf_ms.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30109 >
2024-07-12 09:33:51 +00:00
Samuel Pitoiset
0d0b949cd7
nir/gather_info: handle uses_fbfetch_output for sparse image loads
...
Looks like this was missing.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30109 >
2024-07-12 09:33:51 +00:00
Samuel Pitoiset
0a6852907d
radv: fix marking RADV_DYNAMIC_COLOR_ATTACHMENT_MAP as dirty
...
Due to the cmdbuf dirty split.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30119 >
2024-07-12 06:37:52 +00:00
Christian Gmeiner
87786a7a7e
nak: Move imad late optimization to nir
...
It is more or less just a code move, but I touched
is_only_used_by_iadd(..) to match the style of the other functions in
that file.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30099 >
2024-07-12 05:54:46 +00:00
Christian Gmeiner
e019517d6e
nak: Set has_imad32 conditionally
...
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com >
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30099 >
2024-07-12 05:54:46 +00:00
Faith Ekstrand
b209fedebe
nak/sm50: Fix immediates for IMnMx
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
faeb715535
nak/sm50: Re-order all the ops
...
This puts them in the same order as nak/ir.rs.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
970b3e0e71
nak: Add a legalize() method to ShaderModel
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
e039b7e1ac
nak/sm50: Move legalization into SM50Op
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
59f1ad581e
nak/sm50: Move instruction encoding into a trait
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
99c4b90f3c
nak/sm70: Move legalization into SM70Op
...
This puts the legalize routine and the encoder right next to each other
in the code, making it much easier to verify that legalize() enforces
all of the constraints reqauired by encode().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
f20b1c50b4
nak/legalize: Handle RA instructions up-front
...
This pulls them out of the per-SM flow. They're also all no-ops to
legalize since they don't take vectors and are handled directly by RA.
This also means these instructions are now getting properly handled on
Maxwell where we previously trusted in the (probably broken) maxwell
legalizing code.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
9d8d928a59
nak/legalize: Handle OpBreak and OpBSSy specially
...
This lets us stop passing liveness information into the per-op
legalization code. Long-term, I want to add a more general core
concept of destinations which are also reads but I haven't gotten
around to that yet.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
d9a9bb651c
nak/legalize: Move a bunch of helpers to a trait
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
1b9b6a9529
nak/sm70: Re-organize the code a bit
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
20e1160f3f
nak/sm70: Move instruction encoding into a trait
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
57667aeac8
nak: Move instruction encoding into ShaderModel
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
d4db2f43de
nak: Move Instr::can_be_uniform() into ShaderModel
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
6ddb2b291d
nak: Move RegFile::num_regs() into ShaderModel
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
74ac40da2d
nak/ra: Move the NAK_DEBUG=spill logic into RA
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
e6b8da5427
nak: Plumb a ShaderModel trait through everywhere
...
Instead of scattering number checks everywhere, this lets us actually
start splitting code paths. This commit just adds the shader model
trait. Later commits will add more methods.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
69bea2b49f
nak/sm50: Get rid of the hand-rolled align_up/down() helpers
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
0f7ff6fbdc
nak: Move encode_sm* to to sm*.rs
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:31 +00:00
Faith Ekstrand
d82a5d0f59
nak/sph: Stop storing the shader model in ShaderProgramHeader
...
It's only needed for one Kepler+ check which is unlikely to ever be
relevant for NAK. Also, that should probably be based on the SPH
version or something, not an arbitrary shader model.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30141 >
2024-07-11 22:28:30 +00:00
Caio Oliveira
c2d1e10315
intel/brw: Don't print extra newlines in assembler
...
Handle '\n' when inside the MSGDESC start condition,
otherwise the lexer would apply its default rule (write
to stdout).
Without that, newlines were "leaking" to the output when
parsing a multiple line "MsgDesc". E.g. given the file
example.asm below
```
send(8) nullUD g126UD nullUD 0x02000000 0x00000000
thread_spawner MsgDesc: mlen 1 ex_mlen 0 rlen 0
{ align1 WE_all 1Q @1 EOT };
```
the assembler would produce one extra newline
```
$ brw_asm -t hex -g tgl example.asm
31 01 03 80 04 00 00 00 0c 7e 00 70 00 00 00 00
```
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30100 >
2024-07-11 21:07:54 +00:00
Alyssa Rosenzweig
b8dcbfbd39
zink: print pipeline stats for compute shader-db
...
this is useful for evaluating compute shaders with zink. the open shader-db
doesn't have any compute shaders in it, but shader-db runner is capable of
compute and we need to handle it. (Rob's shaderdb definitely has some compute
shaders in it, at least.)
this gets us pipeline stats printing on zink+nvk for a simple compute shader I wrote when working on common NIR stuff:
b.shader_test - type: compute, Code Size: 752, Number of GPRs: 19, SLM Size: 0
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30135 >
2024-07-11 20:37:38 +00:00
Alyssa Rosenzweig
8c597c0861
zink: move print_pipeline_stats
...
we need it higher up in the file for the next patch. nfc.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30135 >
2024-07-11 20:37:38 +00:00
Louis-Francis Ratté-Boulianne
2b8eaf3bd6
panfrost: add PAN_AFRC_RATE env var to force a compression rate
...
Valid values are "default" and integers from 1 to 12 (bpc).
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813 >
2024-07-11 19:02:50 +00:00
Louis-Francis Ratté-Boulianne
2ff543f3b8
panfrost: add support for fixed-rate compression
...
Add support for the gallium interface to retrieve supported bitrates
and modifiers and creation of a compressed resource.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28813 >
2024-07-11 19:02:50 +00:00
Louis-Francis Ratté-Boulianne
6665840929
panfrost: add translation between modifier and compression rates
...
Add some util methods to be able to translate from an AFRC modifier
to the associated compression bitrate (bits-per-components) and
vice-versa. Also add a method to query all the supported compression
bitrate for a format.
Signed-off-by: Louis-Francis Ratté-Boulianne <lfrb@collabora.com >
Signed-off-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/28813 >
2024-07-11 19:02:50 +00:00