Commit Graph

183541 Commits

Author SHA1 Message Date
Eric R. Smith
a50b2f8f25 panfrost: fix panfrost drm-shim
The panfrost driver now makes an ioctl to retrieve some new memory
parameters, and DRM_PANFROST_PARAM_MEM_FEATURES is required (does not
default in the caller). This caused drm-shim to stop working. This
patch adds some defaults to get drm-shim working again.

Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Fixes: 91fe8a0d28 ("panfrost: Back panfrost_device with pan_kmod_dev object")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27162>
2024-01-22 09:36:47 +00:00
Lionel Landwerlin
59b652f10f anv: using a single struct for kernel upload
A bit nicer than adding more and more arguments to the upload
function.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27188>
2024-01-22 08:42:37 +00:00
Samuel Pitoiset
783e3c096f radv: fix indirect draws with NULL index buffer on GFX10
GFX10 has a hw bug and it can't handle 0-sized index buffer. The
non-indirect draw path was fine but not the indirect path where RADV
emits the index buffer.

This fixes flakes with dEQP-VK.*maintenance6* on NAVI14, and possibly
GPU hangs if there is an indirect draw with a valid index buffer right
before because it would re-use the same index buffer.

Fixes: db9816fd66 ("radv: add support for NULL index buffer")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27142>
2024-01-22 08:14:23 +00:00
Samuel Pitoiset
5c03cdbd02 radv: fix indirect dispatches on the compute queue on GFX7
GFX7 CP requires the indirect dispatch VA to be aligned to 32-bytes.

This fixes dEQP-VK.api.command_buffers.many_indirect_disps_on_secondary,
but it's unexpected that it uncovered this bug.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27148>
2024-01-22 07:41:05 +00:00
Francisco Jerez
c3a64f8dd1 intel/fs/xe2+: Allow SIMD16 MULH instructions.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
54f3d5a00c intel/fs: Emit QUAD_SWIZZLE instructions with WE_all for derivative lowering.
Otherwise the code generator will attempt to emit SIMD-lowered
QUAD_SWIZZLE instructions with an execution group not multiple of 8,
which is invalid on Xe2+.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
3e710a84ad intel/fs: Set the default execution group to 0 when not representable by the platform.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
43c9620dbf intel/eu/xe2+: Translate brw_reg fields in REG_SIZE units to physical 512b GRF units during codegen.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
8bc3821520 intel/fs/xe2+: Disable bank conflict mitigation pass for now.
Reworks:
* Added a TODO comment.

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Francisco Jerez
6efcba9e36 intel/ir/xe2+: Add support for 32 SBID tokens to performance model.
Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27165>
2024-01-20 19:55:31 +00:00
Konstantin Seurer
a9c057d5a3 radv: Implement NIR debug printf
Adds radv_build_printf which can print nir_defs. The arguments are written
to a buffer and printed after the submit.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Konstantin
03379d74ba util/printf: Expose util_printf_prev_tok
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Konstantin
d05f8f6146 util/printf: Include stdio.h
Needed for FILE.

Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25753>
2024-01-20 16:11:55 +01:00
Yonggang Luo
87417012f3 zink: Update zink-anv-tgl flakes
It's from https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53978300
and https://gitlab.freedesktop.org/mesa/mesa/-/jobs/53985604

and appeared multiple times

Signed-off-by: Yonggang Luo <luoyonggang@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27179>
2024-01-20 09:50:09 +00:00
Eric Engestrom
908f444ec1 ci/deqp: backport fix for zlib.net not allowing tarball download anymore
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27175>
2024-01-20 08:20:12 +00:00
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