Commit Graph

192354 Commits

Author SHA1 Message Date
Emma Anholt
9a026df0f7 dri: Consistently use createImageWithModifiers2()
dri_screen.c supports it regardless.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
Daniel Stone
cb90f99ee5 egl/dri2: Use createImageFromNames for DRM buffers
When using the ancient DRM-buffer extension, use createImageFromNames
instead of createImageFromName, so we can deprecate the latter.

Signed-off-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
Emma Anholt
6227d83910 dri: Fix a pasteo in dri2_from_names()
Fixes: 433ca3127a ("st/dri: replace format conversion functions with single mapping table")

Reviewed-by: Adam Jackson <ajax@redhat.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245>
2024-07-18 14:16:50 +00:00
David Rosca
8fa9e78e39 radeonsi/vcn: Support 10bit RGB for EFC input
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30101>
2024-07-18 13:11:13 +00:00
nyanmisaka
eb05111bf7 frontends/va: add support for A2RGB10/X2RGB10/A2BGR10/X2BGR10
Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30101>
2024-07-18 13:11:13 +00:00
Juan A. Suarez Romero
433a0422d5 v3dv: don't leak cache key
The hashtable stores a hash generated from the key, so there is no need
to duplicate the key, as otherwise it is a leak.

Found through address sanitizer.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30204>
2024-07-18 11:49:07 +00:00
Bas Nieuwenhuizen
6be7e25256 relnotes: Add an entry about the new cache default.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22339>
2024-07-18 10:56:07 +00:00
Bas Nieuwenhuizen
87a25adf08 util/cache_test: Add tests for old cache deletion.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22339>
2024-07-18 10:56:07 +00:00
Bas Nieuwenhuizen
c3bc6991d2 util/disk_cache: Delete the old multifile cache if using the default.
Only after 7 days so people who switch all the time aren't impacted.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22339>
2024-07-18 10:56:07 +00:00
Daniel Schürmann
bd4fbdf510 util/disk_cache: enable Mesa-DB disk cache by default
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22339>
2024-07-18 10:56:07 +00:00
Georg Lehmann
5e8bb93ea3 aco: micro optimize VALU fquantize2f16
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
5b4fcfd638 aco/gfx11.5: select SALU fquantize2f16
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
2549bc2f9e aco/gfx11.5: select SALU fneg/fabs
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
284b9965e8 aco/gfx11.5+: allow sgpr dst for trans ops and use pseudo scalar ops on gfx12
Also optimize the denorm scaling path by only emitting the expensive trans op once
and allowing fma for the final muliplication.

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
314053a3e3 aco/gfx11.5: select SALU fsign
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
b1b5a0c6ad aco/gfx11.5: select SALU fsat
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
ee0e183700 aco/gfx11.5: select SOPC float instructions
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29245>
2024-07-18 08:36:15 +00:00
Georg Lehmann
4bd229ac50 aco/gfx11.5: select SOP2 float instructions
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
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