Commit Graph

192236 Commits

Author SHA1 Message Date
Georg Lehmann
6affd916b5 aco/gfx11.5: fix s_fmac acc to definition
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
a90d4d340c aco/gfx11.5: select SALU float conversions
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
4399c7bac3 aco: add aco_opcode::p_s_cvt_f16_f32_rtne
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
1efb7754fc aco/gfx11.5: select s_(ceil|floor|trunc|rndne)
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
33a719b3e2 aco/gfx11.5: select s_cvt_[ui]32_f32
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
343420fd4e aco/gfx12: don't allow vgpr operands for pseudo scalar
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Georg Lehmann
d58d0274a8 aco/gfx12: use trans s_delay_alu for pseudo scalar
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:14 +00:00
Kenneth Graunke
534f0019d7 intel/brw: Don't mix types for unary extended math instructions
We were generating odd instructions like:

   math inv(8) g93<1>HF g85<8,8,1>HF null<8,8,1>F { align1 1Q @7 $4 };

It's unclear whether the type of the null operand matters, but sometimes
these things don't get ignored properly.  Out of caution, retype the
null source to match the actual operand's type.  It'll at least look
less surprising in assembly dumps.

Reviewed-by: Sagar Ghuge <sagar.ghuge@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30193>
2024-07-18 03:25:06 +00:00
Faith Ekstrand
452fed5203 nak: Run copy-prop again after opt_prmt and opt_lop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30230>
2024-07-18 01:48:51 +00:00
Faith Ekstrand
842bde8694 nak: Add a pass macro for more consistent debug printing
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30230>
2024-07-18 01:48:51 +00:00
Faith Ekstrand
aed223ca89 nak: Optimize nested OpPrmt
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30230>
2024-07-18 01:48:51 +00:00
Faith Ekstrand
b96d2d4351 nak: Add some helpers for working with OpPrmt selectors
We had some helpers for this at one point but the old ones were super
clunky and didn't really do what we wanted so they were removed.
However, we have a lot of manual banging in opt_copy_prop and we're
about to add more.  These new helpers will make it all a lot safer.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30230>
2024-07-18 01:48:51 +00:00
Icenowy Zheng
7e3106fa6f gallivm: orcjit: use a mutex to protect symbol looking up
When a symbol is looked up for the first time, the associated function
is built, and the building process seems to be not thread-safe.

Use a mutex to protect the symbol looking up process, which should be
serialized when the function is not built, and fast when the function is
built.

Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Dave Airlie <airlied@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30217>
2024-07-18 00:59:30 +00:00
Adam Jackson
d709b42180 dri: Let dril handle the DRI driver link farm
xserver's loader will look for drivers this way, but there's no reason
we need to keep hurting ourselves like that.

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:05 +00:00
Adam Jackson
3de62b2f9a gallium/dril: Compatibility stub for the legacy DRI loader interface
This provides just enough of a "DRI driver" for non-glamor-using
xservers to initialize GLX and enable direct clients. We build it if you
build DRI support for GLX, or if you build any X11 client support for
EGL. We only build it at this point, we'll swap it into the install
next.

Co-authored-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Co-authored-by: Pavel Ondračka <pavel.ondracka@gmail.com>

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:05 +00:00
Adam Jackson
91e1ea52c9 mesa_interface: Move out of GL/internal/
Move it into src/gallium/include/ to make it absolutely clear this is a Mesa detail.
While we're at it, clean up its include sites, including some places
where we can just include kopper_interface.h instead since it includes
mesa_interface.h as its first act.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:05 +00:00
Adam Jackson
de41fda2f5 mesa_interface: Set ourselves free
Paste in a copy of dri_interface.h so we can freely modify our internals
without breaking Xorg compatibility.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:05 +00:00
Adam Jackson
6be17e222d treewide: Include mesa_interface.h not dri_interface.h
We're about to split the latter off as a compatibility detail for older
versions of Xorg, and the former includes the latter at this point, so
this should be just to prove no functional change.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:04 +00:00
Adam Jackson
3c48fd8a6d gallium: Rename ${target}/target.c to ${target}/{$target}_target.c
This is one of the few places in Mesa where filenames collide this much
and it's Super Annoying.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28378>
2024-07-17 23:47:04 +00:00
Iván Briano
c8d64860ec anv: set MOCS for protected memory when needed
We were missing setting the EncryptedData bit in the MOCS field when
emitting the surface states for protected buffer/images. How this works
on ADL remains a mystery to me.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11313

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30097>
2024-07-17 22:56:51 +00:00
Iván Briano
ece7abb599 anv: get scratch surface from the correct pool
Fixes: 3ccf80f9b1 ("anv: prepare 2 variants of all shader instructions")

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30097>
2024-07-17 22:56:51 +00:00
Karol Herbst
bcc79499fa rusticl/queue: format file
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:22 +00:00
Karol Herbst
00540594df rusticl/event: fix outdated comment in call
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:22 +00:00
Karol Herbst
38e15037f4 rusticl/mesa: set take_ownership to true in set_constant_buffer_stream
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/11485
Fixes: 8da8c6c2d8 ("rusticl: use stream uploader for cb0 if prefered")
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:22 +00:00
Karol Herbst
17b66799b6 rusticl/mesa: handle failures with u_upload_data
It can fail to allocate in which case we should return an error instead of
continuing.

Fixes: 8da8c6c2d8 ("rusticl: use stream uploader for cb0 if prefered")
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:22 +00:00
Karol Herbst
8a77488c9c rusticl/event: return execution errors when doing a blocking enqueue
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:22 +00:00
Karol Herbst
f4bf6f26a9 rusticl/queue: properly implement in-order queue error checking
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:21 +00:00
Karol Herbst
3684912e3f rusticl/event: properly implement CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST
The current approach doesn't take into account when a dependency failed
executing, so we'd miss out of resource errors and the likes.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:21 +00:00
Karol Herbst
8a5ef4411b rusticl/queue: properly check all dependencies for an error status
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:21 +00:00
Karol Herbst
25dedee67d rusticl/queue: do not overwrite event error states
Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:21 +00:00
Karol Herbst
d2d3f8e446 rusticl/event: make set_status handle error status properly
Event::set_status only called the cbs for the passed in status, but we
need it to call all cbs up to the passed in status. This simplifies error
handling.

Cc: mesa-stable
Reviewed-by: @LingMan
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30215>
2024-07-17 22:39:21 +00:00
Samuel Pitoiset
5072848a2f radv/meta: remove useless memset when destroying DCC retile state
There should be only one finish call.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
602bdda3a5 radv/meta: rework creating DCC retile pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
176befe439 radv/meta: fix potential memleak when creating DCC retile pipelines
If the driver needs to create two different DCC retile pipelines which
is based on the image swizzle, it will just overwrite the existing
layouts.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
8e53114de3 radv/meta: fix potential race condition when creating DCC retile pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
0906b64724 radv/meta: rework creating copy expand pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
67d720d115 radv/meta: create fmask copy layouts regardless on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
ee1bc2e821 radv/meta: rework creating FMASK expand pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
f1ec223cd2 radv/meta: create fmask expand layouts regardless on-demand
To be consistent with other meta operations.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
4bef832b10 radv/meta: rework creating blit pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
ad82a338b3 radv/meta: cleanup meta_emit_blit()
Passing the image and the image view is useless.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
89dc316720 radv/meta: move the locking around creating blit pipelines
Only the on-demand path needs to be locked.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:33 +00:00
Samuel Pitoiset
e8683cae01 radv/meta: cleanup radv_device_init_meta_blit_{color,depth,stencil]()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
20be729636 radv/meta: create the fill/copy pipelines on-demand
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
c57987afc7 radv/meta: separate creating the fill/copy pipelines
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
5f2cbc3ab9 radv/meta: cleanup creating the compute depth decompress pipeline
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
b3d9afe44d radv/meta: create the compute depth decompress pipeline on-demand
It was always compiled when the device is created.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
f3e7c7e19f radv/meta: rework creating the gfx depth decompress pipeline
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
b54dc6a29a radv/meta: remove unused parameter to radv_get_depth_pipeline()
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00
Samuel Pitoiset
38567300d4 radv/meta: move locking around the gfx depth decompress pipeline
Locking is only needed when the pipeline is created on-demand, so move
that to the caller.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30233>
2024-07-17 21:55:32 +00:00