Job Noorman
7a44d832d3
ir3/legalize: add ir3_update_legalize_state helper
...
This is a convenience helper that updates 1) the sync state, 2) the
delay state, and 3) the block's current cycle value.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
0e9b7c6ff3
ir3/legalize: remove unused parameter from delay_update
...
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
0c05839fcd
ir3/legalize: extract ir3_merge_pred_legalize_states helper
...
We will want to use this functionality in ir3_postsched.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
d4503b01b7
ir3/legalize: add ir3_init_legalize_state helper
...
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
ee430745fe
ir3/legalize: extract sync_update helper
...
We will want to use this functionality in ir3_postsched.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
b91828d553
ir3/legalize: extract ir3_required_sync_flags helper
...
We will want to use this functionality in ir3_postsched.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
540cee6c3b
ir3/legalize: remove ctx argument from delay_calc/update
...
In preparation for making these functions usable outside of
ir3_legalize.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:05 +00:00
Job Noorman
f7002802c3
ir3/legalize: normalize nop state at block start
...
Now that we have the block's final cycle value available in its state,
we don't have to subtract it at the end of a block anymore, but we can
do it at the beginning when merging it into its successor state. This
will save us one iteration over all its ready slots.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:04 +00:00
Job Noorman
03ee7c7c0f
ir3/legalize: add cycle to ir3_legalize_state
...
Having the cycle as part of the state will become convenient for two
reasons:
- It will allow us to merge the state of predecessors without having to
normalize states at the end of blocks (i.e., we now have to subtract
the block's final cycle value from its ready slots at the end of the
block; having its final cycle value available in its state will allow
us to do this when merging predecessor states at the start of the
block).
- We can update the cycle value as part of delay/sync state update
routines. This way, the user doesn't have to worry about which
instructions should actually update the cycle as this logic is nicely
encapsulated.
This is part of the preparation for making the delay/sync legalization
logic available outside of ir3_legalize.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:04 +00:00
Job Noorman
12fadd27d3
ir3: add mergedregs to ir3_compiler
...
Storing it only in ir3_shader is sometimes inconvenient because it's not
available everywhere.
Signed-off-by: Job Noorman <job@noorman.info >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:04 +00:00
Job Noorman
0977863a8e
ir3: calculate sstall/systall across blocks
...
Resetting the ss/sy delays at the start of blocks would underestimate
the actual delays at runtime. Make the estimate more accurate by keeping
track of outstanding delays at the end of blocks and setting the initial
delays of blocks to the maximum of their predecessor blocks.
Signed-off-by: Job Noorman <jnoorman@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34108 >
2025-05-12 17:58:04 +00:00
Faith Ekstrand
13f9135e85
compiler/rust: Better document CFG
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
98deabfa90
nak: Fix some rusdoc warnings
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
3459004104
nak: Improve documentation for RegRef
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
22056d5b08
nak: Improve documentation for PerRegFile
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
d9cd61dc23
nak: Improve documentation on RegFile
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
c022e22368
nak: Improve documentaiton for SSAValue and SSARef
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34919 >
2025-05-12 17:31:33 +00:00
Faith Ekstrand
b26b0211b6
nak: sm32: Add Texture ops
...
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329 >
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
2929dae1e8
nak: Initial SM32 support
...
This commit adds most operations to enable compute and basic draw tasks
for KeplerB (also known as Kepler 2.0, chips GK110 to GK180 or codename
NVF0-NVF1). There are still major aspects such as as textures,
surfaces, shared atomics and scheduling that still need work and will be
added in other commits.
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329 >
2025-05-12 16:41:48 +00:00
Lorenzo Rossi
ee4cff7603
nvk: nak: Add OpViLd support
...
Kepler and earlier GPUs do not support the ISBERD instruction but have a
different VILD (Vertex Indirect Load) instruction that provides less
functionality. This commit adds support for the op in nak and nir,
needed for the upcoming encoder commit.
Signed-off-by: Lorenzo Rossi <snowycoder@gmail.com >
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34329 >
2025-05-12 16:41:48 +00:00
Konstantin Seurer
2d48b2cb47
radv: Use subgroup OPs for BVH updates on GFX12
...
This patch changes the update code to launch 8 invocations for every
internal node. The internal nodes update their child leaf nodes using
the geometry index and primitive index stored inside the primitive node.
Processing 8 child nodes in parallel is faster than looping over them.
Moving to one dispatch that updates all nodes in one go lets us get rid
of atomics and will also enable updatable BVHs to use pair compression.
Improves Elden Ring (high settings, max RT settings, 1080p) by around
10%.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:31 +02:00
Konstantin Seurer
c6fdf11303
radv: Make radv_update_memory non-static
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:25 +02:00
Konstantin Seurer
4a8e232e39
vulkan: Add more information to BVH update callbacks
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:16 +02:00
Konstantin Seurer
5da0810e5d
vulkan/bvh: Add type information for vk_bvh_geometry_data
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:11 +02:00
Konstantin Seurer
8157f84246
radv: Refactor the update scratch layout code
...
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:06 +02:00
Konstantin Seurer
b2aa0647d5
radv: Use a specialized shader for in place updates
...
If src == dst, we only need to update aabbs for the internal nodes.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:45:00 +02:00
Konstantin Seurer
e1110d20f8
vulkan: Add acceleration structure update keys
...
The driver can use an optimized shader when src == dst.
Reviewed-by: Natalie Vock <natalie.vock@gmx.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34601 >
2025-05-12 17:44:56 +02:00
Sergi Blanch Torne
0796d8c502
fluster: xfile update
...
During the maintenance, and proably the previous MR to the first attempt
to merge, fixed a failing test without testing on fluster because the
farm was disabled.
Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34922 >
2025-05-12 14:25:54 +00:00
Corentin Noël
77c0ff9fc7
virgl: Bail out on file descriptor duplication failure
...
Do not try to use a negative file descriptor.
CID: 1465120 Argument cannot be negative
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816 >
2025-05-12 14:08:04 +00:00
Corentin Noël
965f41b550
virgl: Ensure to not overflow when encoding string marker
...
The maximal length is 65535 as an offset of 16 bits is being used to encode it.
Afterwards in VIRGL_CMD0, the buf_len equals 65536, so buf_len << 16 overflows its type which is uint32_t.
CID: 1604743 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816 >
2025-05-12 14:08:04 +00:00
Corentin Noël
11a7b112cb
vtest: Be more resilient when a resource creation has failed
...
Do not override the handle number with 0 if we fail to create a new resource.
Also make sure to store the handle consistently in an uint32_t.
CID: 1644460 Overflowed constant
Signed-off-by: Corentin Noël <corentin.noel@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816 >
2025-05-12 14:08:04 +00:00
Corentin Noël
5bec582e30
vtest: Silence some coverity issues
...
Add assertion about the returned read/written size being smaller than the size
left
CID: 1605126, 1604911
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34816 >
2025-05-12 14:08:04 +00:00
David Rosca
4fca9d9699
pipe/video: Remove st_rps_bits and UseStRpsBits
...
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836 >
2025-05-12 13:12:05 +00:00
David Rosca
7d55b510e8
frontends/va: Set HEVC NumShortTermPictureSliceHeaderBits
...
This is the same value as st_rps_bits, which VDPAU already uses.
Reviewed-By: Sil Vilerino <sivileri@microsoft.com >
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34836 >
2025-05-12 13:12:05 +00:00
Matthieu Oechslin
4e68e422e0
r600: Take dual source blending in account when creating target mask with RATs
...
This is properly checked when filling CB_... registers in
evergreen_emit_image_state(), but not when generating CB_TARGET_MASK.
It would lead to an invalid command steam if a fragment shader
uses SSBO/Image load/store alongside dual source blending.
Acked-by: Patrick Lerda <patrick9876@free.fr >
Fixes: a6b3792843
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/622
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34333 >
2025-05-12 11:42:37 +00:00
Martin Krastev
034cb260ac
svga/ci: Increase vmware-vmx-piglit job parallelism to 4
...
Bump up vmware farm's vmware-vmx-piglit job parallelism to 4.
Signed-off-by: Martin Krastev <martin.krastev@broadcom.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34925 >
2025-05-12 11:23:20 +00:00
Rhys Perry
d0a09b6ff7
ac/llvm: correctly set alignment of vector global load/store
...
For coherent/volatile access, this would be too high for vector access.
Even when we didn't set the alignment, LLVM seemed to assume too high of
an alignment for 8/16-bit vector access.
Fixes generated_tests/cl/vload/vload-char-constant.cl
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Michel Dänzer <mdaenzer@redhat.com >
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903 >
2025-05-12 10:51:57 +00:00
Rhys Perry
c1ecad2b11
ac/llvm: correctly split vector 8/16-bit stores
...
This assumes that the start of the load is 32-bit aligned.
For example, a vec3 16-bit store with align_offset=2 should split off the
first component, not the last.
This probably also fixed splitting with 8-bit stores.
Fixes arb_copy_buffer-overlap
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Reviewed-by: Marek Olšák <marek.olsak@amd.com >
Tested-by: Michel Dänzer <mdaenzer@redhat.com >
Backport-to: 25.0
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34903 >
2025-05-12 10:51:57 +00:00
Rhys Perry
ab09822b86
util: fix float to bfloat16 conversion with NaN
...
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com >
Fixes: ecd2d2cf46 ("util: Add functions to convert float to/from bfloat16")
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34882 >
2025-05-12 10:26:01 +00:00
Karol Herbst
f0fa2209a8
nir: add nir_opt_algebraic_integer_promotion
...
This handles basic operations where clang promotes integers to 32 bits
according to the C99 spec in OpenCL C source code.
This is its own opt_algerbraic pass, because we don't wanna fight with
nir_lower_bit_size.
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io >
Reviewed-by: Christian Gmeiner <cgmeiner@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34641 >
2025-05-12 09:29:20 +00:00
Danylo Piliaiev
2582cf9971
tu/lrz: Don't disable LRZ test for blend+depth write
...
Only LRZ write should be disabled for this draw call, while
test is ok since failing the test doesn't affect blending.
Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34901 >
2025-05-12 08:53:57 +00:00
Lars-Ivar Hesselberg Simonsen
7451bc3bef
panvk/v9+: Set up limited texture descs for storage use
...
Storage access to images using LEA_TEX[_IMM] has limitations on some
fields in the texture descriptors, making them incompatible with the
descriptors required for texture access, specifically in the case
non-zero levels.
This change sets up two sets of texture descriptors for image views of
storage images, then picks the correct one when writing the image view
descriptors.
Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Tested-by: Heiko Stuebner <heiko@sntech.de >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
e2aa0b7566
pan/texture/v10+: Set width/height in the plane descs
...
We're currently not setting the v10+ width/height in the plane
descriptors. This change ensures we do.
Backport-to: 25.0
Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
009e4c2eba
pan/genxml/v13: Add minus1 mod for plane width/height
...
The width/height fields in the plane descriptors for v13 are missing
their minus(1) modifiers.
This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.
Fixes: ece01443e1 ("pan/genxml: Add v13 definition")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
e38eb00e4e
pan/genxml/v12: Add minus1 mod for plane width/height
...
The width/height fields in the plane descriptors for v12 are missing
their minus(1) modifiers.
This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.
Fixes: b6d5e01120 ("pan/genxml: Add v12 definition")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
2542857259
pan/genxml/v10: Add minus1 mod for plane width/height
...
The width/height fields in the plane descriptors for v10 are missing
their minus(1) modifiers.
This change adds the missing modifiers, which implies also setting
default values to 1 due to how the Two-Plane YUV Overlay interacts with
the plane descriptors.
Fixes: 486c341769 ("panfrost: Add architecture description XML for v10")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
6a9a4b3eef
pan/texture: Set plane size to slice size
...
Rather than setting the plane size to the full allocation minus the
current offset, set it to the actual size of the plane.
Fixes: db20152c8a ("panfrost: Handle Valhall texturing")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
cc58e30847
pan/texture: Correctly handle slice stride for MSAA
...
Currently, we will always be setting the slice stride in the plane
descriptor to the surface stride, as the check for multisampling is true
even for single sampled surfaces.
This change fixes this check.
Fixes: db20152c8a ("panfrost: Handle Valhall texturing")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
Lars-Ivar Hesselberg Simonsen
8b2ff9a8cf
panfrost: Add pan_unpack to ForEachMacros
...
While various pan_pack macros were already there, pan_unpack was
missing.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34839 >
2025-05-12 08:37:08 +00:00
David Rosca
4ea52147c1
pipe/video: Remove unused UseRefPicList
...
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com >
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34698 >
2025-05-12 08:14:59 +00:00