Daniel Stone
60cb420996
dri: Remove old createImageWithModifiers
...
Everyone can use createImageWithModifiers2, which is now just called
createImageWithModifiers.
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
3bfd157483
dri: Drop createImageFromFds2() in favor of createImageFromDmaBufs()
...
They're calling the same thing in the backend, just merge the impls. We
don't need to maintain the old function and struct layout, because we're
version locked between loader and driver.
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
Emma Anholt
26c1354578
dri: Consistently use createImageFromDmabufs() not createImageFromFds()
...
They're calling the same thing in the backend, so reduce the proliferation
of interfaces consumed within our implementation.
driVkImageExtensionSw now sets dri2_from_dma_bufs, which means that
egl_dri2 will now expose EXT_image_dma_buf_import. Given that it
previously set dri2_from_fds suggesting that it can import dmabufs, this
is presumably OK.
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
Emma Anholt
b1bcda45be
dri: Drop old createImageFromRenderbuffer()
...
... and rename createImageFromRenderbuffer2() to be it. We don't need to
maintain the old function and struct layout, because we're version locked
between loader and driver.
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
Emma Anholt
24d03a1c0f
dri: Replace createImageFromDmaBufs() with createImageFromDmaBufs3()
...
If FromDmaBufs()/FromDmaBufs2() are available, then FromDmaBufs3() is.
Drop the old method (unused by third parties) and make the new preferred
entrypoint take its name.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245 >
2024-07-18 14:16:50 +00:00
Emma Anholt
13ea03f088
dri: Consistently use createImageFromFds2(), not createImageFromFds()
...
dri_screen.c supports it if it supports createImageFromFds().
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/30245 >
2024-07-18 14:16:50 +00:00
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