Commit graph

204742 commits

Author SHA1 Message Date
Ryan Mckeever
cebd908bf3 panvk: Implement CmdDraw[Indexed]IndirectCount for v10+
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34571>
2025-04-28 10:33:32 +00:00
Rhys Perry
de896234d8 aco: improve spilling of clobbered operands
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We can ignore live_changes for these.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34699>
2025-04-28 10:04:43 +00:00
Rhys Perry
7fe84024cb aco: fix get_temp_reg_changes with clobbered operands
The spiller might have tried to spill a live-through first or second
s_fmac_f32 operand, but this wouldn't have reduced the SGPRs if the third
operand wasn't killed

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13038
Fixes: d6cb45dbb0 ("aco/spill: Allow spilling live-through operands")
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34699>
2025-04-28 10:04:43 +00:00
Job Noorman
656d7a0f88 ir3: don't use VS input regs for binning variant
This isn't necessary anymore since f6f7bc29 ("freedreno/a6xx: Program
VFD_DEST_CNTL from program stateobj").

Allowing the binning variant to allocate its own inputs ensures we don't
needlessly use high register numbers (and thus potentially have a larger
register footprint). Unfortunately, this doesn't have an impact on waves
on shaderdb/fossildb.

Totals from 14669 (8.91% of 164575) affected shaders:
Instrs: 3026564 -> 3024820 (-0.06%); split: -0.33%, +0.28%
CodeSize: 6499538 -> 6496888 (-0.04%); split: -0.19%, +0.15%
NOPs: 452142 -> 451590 (-0.12%); split: -1.76%, +1.64%
MOVs: 67614 -> 66477 (-1.68%); split: -4.92%, +3.24%
Full: 149240 -> 155922 (+4.48%); split: -0.76%, +5.24%
(ss): 56452 -> 56247 (-0.36%); split: -4.58%, +4.22%
(sy): 33366 -> 33535 (+0.51%); split: -2.82%, +3.33%
(ss)-stall: 213221 -> 213992 (+0.36%); split: -0.87%, +1.23%
(sy)-stall: 1391221 -> 1395187 (+0.29%); split: -4.05%, +4.34%
Preamble Instrs: 695820 -> 695661 (-0.02%); split: -0.04%, +0.02%
Cat0: 495109 -> 494450 (-0.13%); split: -1.65%, +1.52%
Cat1: 127072 -> 125925 (-0.90%); split: -2.61%, +1.71%
Cat7: 94725 -> 94787 (+0.07%); split: -0.08%, +0.15%

Signed-off-by: Job Noorman <jnoorman@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34651>
2025-04-28 09:10:32 +00:00
Ryan Mckeever
a5a0dd3ccc panvk: Implement multiDrawIndirect for v10+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34617>
2025-04-28 06:38:09 +00:00
Ryan Mckeever
2bbfcaf01f panvk: Prepare cmd_prepare_shader_res_table() for multiDrawIndirect
This will be needed for indirect draws, where the VS driver desc table
needs to be updated per-draw, which also forces us to have one resource
table per draw.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34617>
2025-04-28 06:38:09 +00:00
Ryan Mckeever
690675748b panvk: Prepare cmd_prepare_push_uniforms() for multiDrawIndirect
With indirect multi draw, we'll need to allocate N times the vertex
FAUs so we can patch each of them with the draw parameters.

Add a repeat_count argument to allow that.

Signed-off-by: Ryan Mckeever <ryan.mckeever@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34617>
2025-04-28 06:38:09 +00:00
Tapani Pälli
ed9f135936 anv: put parenthesis to the set_sampler_size equation
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This fixes errors seen with some renderdoc captures failing to allocate
descriptor sets.

Fixes: 76096d04bb ("anv: relax restriction on variable count descriptors")
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Rohan Garg <rohan.garg@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34671>
2025-04-28 04:45:01 +00:00
Guilherme Gallo
3493500abb ci: Update build-apitrace.sh header with the right tag
Some checks failed
macOS-CI / macOS-CI (dri) (push) Has been cancelled
macOS-CI / macOS-CI (xlib) (push) Has been cancelled
The build-apitrace.sh moved from test-gl/vk to test-base script at
175b6d02.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34713>
2025-04-26 14:27:54 +00:00
Guilherme Gallo
b92dd9c573 ci: bump apitrace version
apitrace at commit b6102d10 has a bugfix regarding a recent regression
in GPU frame time calculation that made we miss weeks of performance
data.

Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34713>
2025-04-26 14:27:54 +00:00
Eric Engestrom
47db31b556 ci: take google-freedreno farm offline
All jobs are currently failing because the gateway ran out of disk space.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34719>
2025-04-26 16:16:40 +02:00
Erik Faye-Lund
d39e2869a8 panvk: re-enable KHR_shader_quad_control on v10+
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that we support Vulkan 1.2, we can expose KHR_shader_quad_control
again.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34512>
2025-04-25 22:31:34 +00:00
Erik Faye-Lund
b3fd8ddf6a panvk: support vulkan 1.2 on v10+
While not yet officially conformant, we support all the required
features, and we pass the CTS. Let's mark off Vulkan 1.2, to make things
easier for applications.

Backport-to: 25.1
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34512>
2025-04-25 22:31:34 +00:00
Caleb Callaway
7f35879738 driconf: Jusant needs force_vk_vendor=-1 on Intel devices
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
A UE crash reporter is displayed without this wrap

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/12782
Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34705>
2025-04-25 11:25:59 -07:00
Rhys Perry
3c021b79b4 aco/ra: use a correct stride for subdword get_reg_impl
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
fossil-db (gfx1201):
Totals from 3 (0.00% of 79377) affected shaders:
Instrs: 1312 -> 1308 (-0.30%)
CodeSize: 7112 -> 7096 (-0.22%)
Latency: 5381 -> 5382 (+0.02%)
InvThroughput: 753 -> 752 (-0.13%)
Copies: 69 -> 68 (-1.45%)
VALU: 836 -> 835 (-0.12%)

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34679>
2025-04-25 14:43:41 +00:00
Rhys Perry
ae6d4f1195 aco/ra: update_renames() before add_subdword_definition()
The register file tests here should be done after update_renames().

Normally, get_reg() wouldn't have to move anything to make space for a 1-3
byte definition. This was encountered with skip_optimistic_path=true and a
get_reg_impl() bug (fixed in a later commit) which caused suboptimal
register assignment.

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34679>
2025-04-25 14:43:41 +00:00
Eric Engestrom
9d0cd43a68 ci/build: drop install.tar from gitlab artifacts
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Now that everyone uses the S3 url, let's avoid unnecessary uploads of
several GB per pipeline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
630aef6653 ci/test: make generic fdo runner test jobs use the S3 artifacts too
These were the last users of the gitlab artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
1d7cce2700 ci/ci-tron: default HWCI_TEST_SCRIPT to deqp-runner, as it's almost always what's run
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
20631a07ca ci/test: rename .b2c-vkd3d-proton-test to .test-vkd3d-proton
It has nothing to do with ci-tron, it just happens that the first vkd3d
job was running on ci-tron.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
ce79b8a799 radv/ci: move radv-kabini-vkd3d out of gitlab-ci-inc.yml
It's currently disabled, which is probably why it was accidentally moved there.

While at it, fix its name to match the rest of the jobs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:28 +00:00
Eric Engestrom
aecdf762ce amd/ci: ci yaml indentation
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
35816d6422 ci/test: fix annoying yamllint warning about 2 spaces before comments
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
aca1a332c2 ci/build: drop unnecessary shellcheck disables
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
ab0e505d7f ci/build: rename variable to avoid changing the meaning of existing variable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
8c28f77bd1 ci/build: split git commit sha command out of echo
This prevents errors from being masked, eg. when `git` is not installed.

While at it, use `--short=10` instead of piping through `cut`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
621aebe046 ci/build: drop unused VERSION from python-artifacts
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
5be4799734 ci/build: drop lava scripts from builds artifacts
The ones used come from the "python-artifacts" job.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
1f08d75272 ci/build: drop expectation files from python-artifacts
The ones used come from the mesa build artifacts.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Eric Engestrom
d35c630483 ci/build: drop b2c files from the builds artifacts
They haven't been used in a long time.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34710>
2025-04-25 12:16:27 +00:00
Valentine Burley
cd8d8ca795 ci: Update kernel to fix GPU recovery issues on sm8350
This new revision contains one new commit, fixing GPU recovery failures
on sm8350.

dea4d930f2

Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34694>
2025-04-25 11:04:16 +00:00
Rhys Perry
b03e071583 aco/gfx11: create waitcnt for workgroup vmem barriers
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
It seems this is necessary on GFX11.

Similar to 576a2e798c

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Backport-to: 25.0
Backport-to: 25.1
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34634>
2025-04-25 10:41:52 +00:00
Boris Brezillon
d432fd9e32 panvk: Advertise support for VK_EXT_extended_dynamic_state[2]
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
We added CmdBindVertexBuffers2(), the rest is handled by the core.

Advertising this feature also works around a CTS bug that was
calling CmdSetPatchControlPointsEXT() without checking for this
extension.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34696>
2025-04-25 09:04:55 +02:00
Boris Brezillon
e3cbb2c131 panvk: Implement CmdBindVertexBuffers2()
The vk runtime has a helper to help us with the strides, we just
need to use vi_binding_strides[] when emitting the attributes.

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Olivia Lee <benjamin.lee@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34696>
2025-04-25 09:02:51 +02:00
Christian Gmeiner
1d11872828 etnaviv: nir: Use nir_shader_tex_pass(..)
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
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/34706>
2025-04-24 23:12:15 +02:00
Alyssa Rosenzweig
3eb7575679 asahi: do not use "Null" layout
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
This is the most serious bug we've had in a long time due to a fundamental
misunderstanding of the hardware (due to incomplete reverse-engineering). It
caught me off guard.

The texture descriptor has "mode" bits which configure two aspects of how the
address pointer is interpreted:

* whether it is indirected, pointing to a secondary page table for sparse
* whether it writes texture access counters (for Metal's idea of sparse).

...Neither of these is a "null texture" mode.

So why did I see Apple's blob using a non-normal mode for null textures, and why
did I copy those settings?

1. Because the hardware texture access counters provide a cheap way to detect
   null texture accesses after the fact, which I think their GPU debug tools
   use. I'm not sure why release builds of the driver do/did that, but whatever.

2. Because I assumed Cupertino knew best and I didn't bother looking too close.

We can't use them here (without doing extra memory allocations), since then
the GPU will increment access counters. And since our null texture address used
to just be a pointer in the command buffer, that mean the GPU will trash
whatever memory happened to be 0x400 bytes after the start of the null texture
descriptor. The symptom being random faults.

This bug was caught when trying to use the zero-page instead, which raised a
permission fault when the GPU tried to write counts. Then I remembered the
sparse mechanism and had a bit of a eureka moment. Immediately followed by an
"oh, f#$&" moment as I realized how many random bugs could potentially be root
caused to this.

The fix is two-fold:

1. Use normal layout instead.
2. Set the address to the zero-page (which is a fixed VA) and detect null
   textures by checking the address, instead of the mode.

The latter is a good idea anyway, but both parts needs to be done atomically to
maintain bisectability.

Backport-to: 25.1
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34703>
2025-04-24 19:05:07 +00:00
Christian Gmeiner
614b66529d etnaviv: nir: Add support for txf texture operation
The src[2] value 0x1100 is set based on observed behavior of the blob driver,
though its exact meaning remains to be documented.

Passes all dEQP-GLES3.functional.shaders.texture_functions.texelfetch.*
tests on GC7000.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Christian Gmeiner
eefe486533 etnaviv: nir: Legalize txf lod src
The LOD must be a float, unlike the GLSL function, which expects an integer.

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Christian Gmeiner
da90fca609 etnaviv: isa: Add txf instruction
This instruction is used to implement texelfetch.

Blob generates such txf's for
dEQP-GLES3.functional.shaders.texture_functions.texelfetch.+

Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34685>
2025-04-24 20:19:37 +02:00
Brian Paul
6325868bbe svga: handle null target pointers in svga_set_stream_output_targets()
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Fixes crash in Piglit arb_separate_shader_object-xfb-explicit-location-array
test.

Signed-off-by: Brian Paul <brian.paul@broadcom.com>
Reviewed-by: Roland Scheidegger <roland.scheidegger@broadcom.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34635>
2025-04-24 17:03:30 +00:00
Georg Lehmann
65411350ac aco/insert_exec: disable empty quads when leaving divergent control, even if not top level
We don't restore exec after uniform top level branches, so nothing disabled
empty quads after a demote in divergent control flow in a uniform branch.

Foz-DB Navi31:
Totals from 17 (0.02% of 79789) affected shaders:
Instrs: 34573 -> 34572 (-0.00%)
CodeSize: 186876 -> 186872 (-0.00%)
Latency: 324145 -> 324141 (-0.00%)
Copies: 1467 -> 1458 (-0.61%)
PreSGPRs: 802 -> 800 (-0.25%)
SALU: 2531 -> 2530 (-0.04%)

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34670>
2025-04-24 15:43:09 +00:00
Timur Kristóf
3ad385b9cc radv: Clear dirty flag for clip rects state after emitting it.
Some checks are pending
macOS-CI / macOS-CI (dri) (push) Waiting to run
macOS-CI / macOS-CI (xlib) (push) Waiting to run
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Fixes: 0ba3a8b3cc
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34686>
2025-04-24 15:13:44 +00:00
Timur Kristóf
3a05477ac6 radv: Clear dirty flag for MSAA state after emitting it.
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Tested-by: Marcus Seyfarth <m.seyfarth@gmail.com>
Fixes: 08918f0880
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/13022
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34686>
2025-04-24 15:13:44 +00:00
Lionel Landwerlin
e60416b4e4 anv: use companion batch for operations with HIZ/STC_CCS destination
We're currently crashing a couple of tests :
   dEQP-VK.pipeline.monolithic.depth.xfer_queue_layout.*

   deqp-vk: ../src/intel/blorp/blorp_blit.c:2935:
     blorp_copy: Assertion `blorp_copy_supports_blitter(batch->blorp, src_surf->surf, dst_surf->surf, src_surf->aux_usage, dst_surf->aux_usage)' failed.

Tested on:
  dEQP-VK.api.copy_and_blit.copy_commands2.image_to_image_transfer_queue.all_formats.depth_stencil.*
  dEQP-VK.api.copy_and_blit.multiplanar_xfer.*
  dEQP-VK.pipeline.monolithic.depth.xfer_queue_layout.*

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 31eeb72e45 ("blorp: Add support for blorp_copy via XY_BLOCK_COPY_BLT")
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34023>
2025-04-24 14:47:40 +00:00
Seán de Búrca
3aec638a8b rusticl: remove unnecessary check for device in kernel list
There is no need to verify that `kernel.prog.devs` contains a device
when that device ref was pulled from `kernel.prog.devs` immediately
beforehand.

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
4be2a49e02 rusticl: improve use of Rust idioms
Reduce unnecessary function calls, collect from iterators instead of
adding to mutable collections, and remove unnecessary trait bounds.

v2: split change to associated device check into new commit

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
2c202eb787 rusticl: verify validity of property names and values
v2: separate from using type aliases based on signature and reorder
v3: verify validity in two additional locations

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
62d8541f39 rusticl: improve internal typing
Shuffle some integer types to reduce the necessity of casting.

Additionally, clean up some unnecessary use of `Vec` to avoid
allocations.

v2: revert changes to `PipeContext` to avoid hiding truncation errors,
move change to fallible conversions to separate patch

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
ec314aa358 rusticl: align memory utilities with std
Rename `is_alligned()` util to match std naming and move it alongside
similar utilities which copy upstream functionality and annotate those
utilities with their first stable version where applicable.

Replace use of `mesa_rust_util::offset_of!()` in one case where nested
field support is not needed.

v2: revert removal of `offset_of!()` for nested field support

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00
Seán de Búrca
26867670b2 rusticl/device: set maximum work dimension to match implicit bounds
Much of the kernel code implicitly depends on a maximum work dimension
of 3, and in practice, gallium will never give a grid dimension of less
than 3, constraining the value to a constant.

v2: use a const for max dimension instead of a `min` call

Reviewed-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34167>
2025-04-24 14:23:05 +00:00