Commit Graph

183526 Commits

Author SHA1 Message Date
Jesse Natalie ebcab145cf dzn: Add a debug option to enable experimental shader models
This allows us to run with unsigned shaders

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Jesse Natalie 90bf4b630b microsoft/compiler: Handle comparison bias/gradient sampling
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Jesse Natalie 733b7fe831 microsoft/compiler: Declare shader model 6.8 / validator 1.8
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27160>
2024-01-20 00:07:15 +00:00
Helen Koike bf461d856f ci/ci_post_gantt: add script that post gantt to Marge's messages
Generate Gantt chart and post an in thread reply to Marge's messages
with it in html format.

html format is used for being interactive.

Signed-off-by: Helen Koike <helen.koike@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26796>
2024-01-20 00:02:56 +00:00
Rob Clark 1a9a71e2d9 freedreno/registers: A couple newline changes
Mostly to avoid massive diffstat consisting of inserted newlines
compared to headergen2.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark 2e733e94d8 freedreno/registers: Add basic kernel header support
This doesn't yet add support for everything the mdp5/mdp4 reg builders
need, but at least gets us to the point where we can use it for GPU
registers, avoiding the need to add reg variant support to headergen2.

See: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7978
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark ab64afc109 freedreno/registers: Generate copyright comment blurb
Similar to headergen2, the output matches as closely as is reasonable.
The time format and file listing ends up being slightly different but
those would be part of the diffstat when we next update kernel headers
regardless.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark 8eca68d2de freedreno/registers: Don't re-parse files
Track the files we've parsed, and skip ones we have already seen, if
(for example) we see the same paths imported from imported files.

Additionally having the list of files we have parsed will be useful to
generate a headergen-like top-of-file license comment.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark d1567249e9 freedreno/registers: De-duplicate xml_reg_files
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark 15f94505ba freedreno/registers: Pass full args to dump_c()
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:58 +00:00
Rob Clark 670e93bfb5 freedreno/a6xx: fix comment
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27124>
2024-01-19 23:26:57 +00:00
Caio Oliveira 5552ffd0f3 intel: Use an intel enum for cmat scope
While convenient, it was not necessary to use the mesa_scope in
intel_device_info.

Having a Intel specific enum here will help later the efforts
of serialization of intel_device_info.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27164>
2024-01-19 22:09:25 +00:00
Georg Lehmann 0a03cf5b3c aco: remove boolean shuffle isel
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann b4180ebbb9 radeonsi: lower boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann 2571580b2b radv: lower boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann d641750573 nir: add lowering for boolean shuffle
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann 37a15ba53a ac/llvm: implement as_uniform and ballot_relaxed
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann 6b031daf16 aco: implement as_uniform and ballot_relaxed
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:34 +00:00
Georg Lehmann 1cb5bf7009 nir: add ballot_relaxed and as_uniform intrinsics
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27116>
2024-01-19 20:13:33 +00:00
Eric Engestrom fc9ffb90fd r300/ci: add flakes
See https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53884563
and https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53941840

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27152>
2024-01-19 19:00:01 +00:00
Georg Lehmann 74fc2e287f aco: stop scheduling at p_logical_end
No Foz-DB changes, but this fixes some issues when the spiller inserts
scratch loads after p_logical_end for p_return.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27119>
2024-01-19 17:04:28 +00:00
Daniel Almeida d1519e6ab7 nak/sm50: add support for suatom
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Daniel Almeida 9f54d269c2 nak/sm50 add support for suld
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26957>
2024-01-19 16:45:59 +00:00
Faith Ekstrand 458d4150df nak: Legalize OpBMsk
Fixes: bb10f7f5da ("nak: Implement nir_op_bfm")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27177>
2024-01-19 16:27:52 +00:00
Daniel Schürmann e3098bb232 aco: give spiller more room to assign spilled SGPRs to VGPRs
On chordal graphs, a greedy coloring can be done in a way that never uses
more colors than are required for the largest clique. However, since we
have vector values and force phi resources into the same spill slots, the
interference graphs are not chordal, and thus, this assumption doesn't hold.

Use twice as many spill slots as upper bound.

Totals from 10 (0.01% of 79242) affected shaders: (GFX11)
MaxWaves: 52 -> 54 (+3.85%)
Instrs: 271386 -> 271779 (+0.14%)
CodeSize: 1362544 -> 1365432 (+0.21%)
VGPRs: 2536 -> 2532 (-0.16%)
SpillVGPRs: 778 -> 818 (+5.14%)
Scratch: 73472 -> 76800 (+4.53%)
Latency: 3331718 -> 3328798 (-0.09%); split: -0.14%, +0.05%
InvThroughput: 1665860 -> 1643350 (-1.35%); split: -1.40%, +0.05%
VClause: 3292 -> 3329 (+1.12%); split: -0.06%, +1.18%
Copies: 46082 -> 46257 (+0.38%)

Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27011>
2024-01-19 14:15:27 +00:00
Erik Faye-Lund 47d7d73eb3 panfrost: implement line-smoothing
We can combine the previously introduced mechanisms to implement
line-smoothing, combined with some bespoke late RSD-patching to force
the correct multisampling and rasterization states.

The reason we need to do this patching late, is that we need to know the
primitive-type before we can determine this state, and we don't know
this until draw-time. Luckily, we have a convenient spot to do this.

This bespoke patching only happens for gen7 and earlier. Luckily, the
bits here remain the same for all of these gens. On later gens, we can
just emit this normally, without any bespoke patching.

We also need to use a fresh batch when changing the effective smoothing
state, because that's framebuffer-state. This applies to all gens.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10281
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund a3cbfb5bd9 panfrost: clean up active_prim update
How we're updating active_prim is currently a bit convoluted, because we
update it from two different places: First, we update it right before
updating the shader-variant in the case of point-sprite changes, and
then later on we update it unconditionally.

But we're about to need to change this logic, because we also need to
deal with line-smooth lowering. So let's clean this up a tad first, by
moving both updates to the same function, and renaming it a bit. This
let's us cleanly update it in one place, and then react to the change.

While we're at it, let's replace the bitwise xor with a logical
not-equals, which makes this all logical operations.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund 6343e0bbd0 panfrost: add line_smooth shader-key and lowering
Unfortunately, the lowering-pass has gotten a condition added that we
don't really want. So we need to lower away the
load_poly_line_smooth_enabled-intrinsic to always return true to get rid
of it again.

It's not great, but line-smoothing isn't the most important feature to
have max performance on, so... meh?

An alternative here could be to make the condition in
nir_lower_poly_line_smooth optional, but that seems kinda hairy
code-wise. Dunno.

We also need to run nir_lower_alu in order to lower away bit_count on
midgard.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund 4b6972366a panfrost: pass reduced primitive type instead of points
We're soon going to have to check for other primitive-types, like lines.
So let's pass the reduced primitive type here instead.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Erik Faye-Lund e9ada4c0a2 panfrost: add support for forcing sample-counts
This implements a D3D11-style forcing of the sample-counts, which will
be used by the line-smoothing code we're about to add.

Even though we don't actually use the single-sample mode, I left it in
for completeness, as it's documented in the TRM.

Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26904>
2024-01-19 13:55:06 +00:00
Dave Airlie 550cc685a7 gallivm: fix coroutines with llvm 18
llvm 18 added an extra parameters to coro end which should just
take a null token always for us.

Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27133>
2024-01-19 13:18:58 +00:00
Martell Malone 3b62b0d096 nine: update verbiage for enduser device messages
Sometimes the gpu might not be a card, implying pci card.
It might be a soc or we might cpu emulate a device.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Martell Malone 41107e4e64 nine: detect emulation fallback of d3d coordinates
When PIPE_CAP_CLIP_HALFZ is not available nine uses emulation.
This requires PIPE_CAP_NIR_COMPACT_ARRAYS or it fails like before

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Martell Malone 60e3a43bfc nine: r500 under 20 fragments cap is a warning
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25901>
2024-01-19 13:00:29 +00:00
Frank Binns 500ca5ce7e pvr: split out device info into per GPU headers
There are quite a lot of PowerVR GPUs out there and maintaining the device info
for all of them in the same file will become unwieldy.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27144>
2024-01-19 12:20:18 +00:00
Frank Binns 09ab2ff925 pvr: fix up some includes
Fix up some system includes to use angle brackets.

Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27144>
2024-01-19 12:20:18 +00:00
Eric Engestrom 7a7aa01a49 amd/ci: consider much more of dEQP-VK.query_pool.statistics_query.host_query_reset.* to be flaky
Instead of continuously adding more and more lines to this list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27170>
2024-01-19 11:12:46 +00:00
Frank Binns 7d67debc2e CODEOWNERS: update Imagination maintainers
Signed-off-by: Frank Binns <frank.binns@imgtec.com>
Reviewed-by: Ashish Chauhan <ashish.chauhan@imgtec.com>
Reviewed-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27145>
2024-01-19 10:26:15 +00:00
Eric Engestrom 7c4a797bc9 amd/ci: add flakes seen today
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
Eric Engestrom dcc8c8aa4a radv/ci: sort navi21 flakes
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27149>
2024-01-19 10:08:27 +00:00
antonino 14345c4dd6 zink: plug leak in `zink_create_quads_emulation_gs`
When the shader is freed xfb info should be freed as well.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Alyssa Rosenzweig 3a72fc1cb7 nir/passthrough_gs: plug leak
freeing the nir shader should free the xfb info too. found with valgrind
leakcheck.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Reviewed-by: Antonino Maniscalco <antonino.maniscalco@collabora.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27093>
2024-01-19 09:10:29 +00:00
Pavel Ondračka 15e7c63272 r300: remove R3xx/R4xx backend absulute modifier lowering
This is done in NIR already.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka 78404cc57d r300: skip backend DCE for vertex shaders
Only mark the unused channels according to the writemask for now, but
this can go as well when we translate directly form NIR. Right now we
still need to do this separatelly as TGSI has no concept of unused
swizzle.

The old DCE pass was known to be buggy, so this also fixes at least
piglit glsl-vs-copy-propagation-1.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9279
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Pavel Ondračka 0e2e4688af r300: fix writemask for nir_intrinsic_load_ubo_vec4
load_ubo_vec4 has always 4 components, however when translating to TGSI
just set the writemask according to the channels that are actually used
later. This is now done by deadcode analysis, but that one is going away
soon.

Reviewed-by: Filip Gawin <filip.gawin@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26848>
2024-01-19 08:35:48 +00:00
Friedrich Vock 43bdfebbff radv: Fix shader replay allocation condition
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26891>
2024-01-19 08:15:12 +00:00
Joshua Ashton 86954c766f radv: Ensure vkGetQueryPoolResults returns in finite-time
When a device lost occured, we were not ensuring that
vkGetQueryPoolResults with VK_QUERY_RESULT_WAIT_BIT was returning.

We could have the caller stuck in our while(...) loop polling the query
atomics forever which violates the finite-time guarantees of this function.

This solves that by adding a timeout to this call to be double the
default TDR timeout for the potential queues relating to this query.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton 907fe6ea62 radv: Add radv_get_tdr_timeout_for_ip helper
Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton ed4ef4dc65 radv/amdgpu: Remove ctx_query_reset_status
We don't use this anymore, it is all dead code.

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00
Joshua Ashton f62bdde703 radv: Remove check_status
Following discussion on kernel mailing list[1], we are not gaining
anything from this right now, and it does not handle soft recovery.

We will hear about the context loss and rationale when we vkQueueSubmit
next.

We can come back to this if there is ever a Vulkan extension for
figuring out innocent vs guilty like GL_EXT_robustness.

This does mean however that we return VK_SUCCESS for cancelled semaphore
and fence waits, but this is legal per the Vulkan spec:

"Commands that wait indefinitely for device execution (namely
vkDeviceWaitIdle, vkQueueWaitIdle, vkWaitForFences with a maximum
timeout, and vkGetQueryPoolResults with the VK_QUERY_RESULT_WAIT_BIT
bit set in flags) must return in finite time even in the case of a lost
device, and return either VK_SUCCESS or VK_ERROR_DEVICE_LOST."

"If device loss occurs (see Lost Device) before the timeout has expired,
vkWaitSemaphores must return in finite time with either VK_SUCCESS or
VK_ERROR_DEVICE_LOST."

[1]: https://lists.freedesktop.org/archives/amd-gfx/2024-January/103337.html

Signed-off-by: Joshua Ashton <joshua@froggi.es>

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27091>
2024-01-19 07:52:01 +00:00