platform/upstream/mesa.git
12 months agozink: fix zs resolve attachment indexing
Mike Blumenkrantz [Mon, 24 Jul 2023 20:27:21 +0000 (16:27 -0400)]
zink: fix zs resolve attachment indexing

this has never been tested until now

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24309>

12 months agozink: add batch refs for transient images
Mike Blumenkrantz [Mon, 24 Jul 2023 20:26:53 +0000 (16:26 -0400)]
zink: add batch refs for transient images

ensure these don't get deleted while in use

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24309>

12 months agoradv/winsys: Remove unused struct radv_winsys_bo_list.
Tatsuyuki Ishi [Tue, 8 Aug 2023 07:31:57 +0000 (16:31 +0900)]
radv/winsys: Remove unused struct radv_winsys_bo_list.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24551>

12 months agoradv/amdgpu: Remove unused bo_list variable from cs_submit.
Tatsuyuki Ishi [Tue, 8 Aug 2023 07:18:56 +0000 (16:18 +0900)]
radv/amdgpu: Remove unused bo_list variable from cs_submit.

Handle based bo_list is no longer used since 767a9324b9c ("radv/amdgpu:
remove legacy code path for creating the BO list").

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24551>

12 months agofreedreno/a5xx: Skip SSBO emit when none are enabled.
Emma Anholt [Fri, 28 Jul 2023 00:24:12 +0000 (17:24 -0700)]
freedreno/a5xx: Skip SSBO emit when none are enabled.

There was a weird NUM_UNIT=0 in a crash dump I was looking at, but this
doesn't fix the crash.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno: Fix crashdec pre-a6xx.
Emma Anholt [Fri, 28 Jul 2023 00:15:11 +0000 (17:15 -0700)]
freedreno: Fix crashdec pre-a6xx.

We'd assert fail looking up the REM registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoci/freedreno: Add a regression test for decoding a540 blob's compute shaders.
Emma Anholt [Thu, 27 Jul 2023 21:51:13 +0000 (14:51 -0700)]
ci/freedreno: Add a regression test for decoding a540 blob's compute shaders.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/cffdec: Fix decode on pixel 2 blob's COMPUTE_CHECKPOINT
Eric Anholt [Thu, 25 Feb 2021 19:51:05 +0000 (11:51 -0800)]
freedreno/cffdec: Fix decode on pixel 2 blob's COMPUTE_CHECKPOINT

dEQP-GLES31.functional.image_load_store.buffer.image_size.writeonly_7
produces:

t7 opcode: CP_COMPUTE_CHECKPOINT (6e) (8 dwords)
{ ADDR_0_LO = 0x15000 }
{ ADDR_0_HI = 0x5 }
0x18
{ ADDR_1_LEN = 3 }
0xf
{ ADDR_1_LO = 0x2e010 }
{ ADDR_1_HI = 0x5 }

and it was asserting due to sizedwords==7.  Without the assert, we were
dereffing a len past the end of the packet.  This len value we were
loading is also suspiciously not the location of the ADDR_1_LEN field in
the packet's XML.  But then, the command stream at ADDR_1 was clearly 0xf
long, and that puts ADDR_1_LEN at the spot we would expect compared to
SET_RENDER_MODE's ADDR_1.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a5xx: Add private mem support.
Emma Anholt [Wed, 26 Jul 2023 23:04:31 +0000 (16:04 -0700)]
freedreno/a5xx: Add private mem support.

A bunch of our piglit fails were due to failing to compile shaders due to
a lack of spilling support.  I used a simple shader with a large local
array with tunable size to determine the MEMSIZEPERITEM increment and the
location of HWSTACKOFFSET (matching a3xx locations).  Unfortunately
fibers_per_sp I had to guess by taking a big spilling shader and cranking
it up until it rendered correctly.  The value I found made HWSTACKOFFSET's
shift value match a6xx's, as a bit of confirmation.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a5xx: Set num_sp_cores and set PC/VFD_POWER_CNTL accordingly.
Emma Anholt [Tue, 8 Aug 2023 16:53:16 +0000 (09:53 -0700)]
freedreno/a5xx: Set num_sp_cores and set PC/VFD_POWER_CNTL accordingly.

Based on libwrap tracing of the blob.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a5xx: Refactor SHADER_OBJ emit to a helper function.
Emma Anholt [Thu, 27 Jul 2023 18:36:03 +0000 (11:36 -0700)]
freedreno/a5xx: Refactor SHADER_OBJ emit to a helper function.

This will grow private mem setup shortly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a3xx: Add the shift for MEMSIZEPERITEM according to db410c docs.
Emma Anholt [Thu, 27 Jul 2023 17:03:10 +0000 (10:03 -0700)]
freedreno/a3xx: Add the shift for MEMSIZEPERITEM according to db410c docs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a6xx: Move pvtmem allocation to ir3_gallium.
Emma Anholt [Thu, 27 Jul 2023 18:21:04 +0000 (11:21 -0700)]
freedreno/a6xx: Move pvtmem allocation to ir3_gallium.

This will be the same thing for pre-a6xx.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/devices: Set num_sp_cores explicitly for pre-gen6.
Emma Anholt [Thu, 27 Jul 2023 19:54:17 +0000 (12:54 -0700)]
freedreno/devices: Set num_sp_cores explicitly for pre-gen6.

These are all 0 currently, but will change for a5xx shortly.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/devices: Move fibers_per_sp to the common info struct.
Emma Anholt [Thu, 27 Jul 2023 18:11:26 +0000 (11:11 -0700)]
freedreno/devices: Move fibers_per_sp to the common info struct.

We'll need it for pvt mem on other GPUs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoci/freedreno: Add some more db820c xfails.
Emma Anholt [Thu, 27 Jul 2023 21:19:26 +0000 (14:19 -0700)]
ci/freedreno: Add some more db820c xfails.

We do a fractional run so we didn't have them listed.  Adding these helps
me with local baseline testing, and future people doing uprevs or
rebalancing.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoci/freedreno: Update comments for some a530 xfails.
Emma Anholt [Thu, 27 Jul 2023 21:10:17 +0000 (14:10 -0700)]
ci/freedreno: Update comments for some a530 xfails.

That assert doesn't exist any more but the test still fails.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoci/freedreno: Sort another a530 xfail with its friends.
Emma Anholt [Thu, 27 Jul 2023 21:08:15 +0000 (14:08 -0700)]
ci/freedreno: Sort another a530 xfail with its friends.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoci/freedreno: Drop a bunch of stale a530 xfails.
Emma Anholt [Thu, 27 Jul 2023 20:47:30 +0000 (13:47 -0700)]
ci/freedreno: Drop a bunch of stale a530 xfails.

These all pass fairly reliably on my a530 when run on their own.  We've
not noticed this because a530 has some very loose flakes regexes.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/ir3: Move pvtmem per-fiber size alignment to the compiler.
Emma Anholt [Thu, 27 Jul 2023 17:52:17 +0000 (10:52 -0700)]
freedreno/ir3: Move pvtmem per-fiber size alignment to the compiler.

Instead of having tu and each fd backend do it.  This will help me make
some shared code on freedreno for pre-6xx pvtmem support.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a5xx: Skip emitting unused texture descriptors for images.
Emma Anholt [Thu, 27 Jul 2023 23:24:26 +0000 (16:24 -0700)]
freedreno/a5xx: Skip emitting unused texture descriptors for images.

In that case, we'd emit it to DST_OFF=255+i, angering the hardware
mightily.  This was missed in the addition of a6xx image support.

Fixes: 2e0ea3f09c79 ("freedreno/ir3: add image/ssbo <-> ibo/tex mapping")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agofreedreno/a5xx: Fix border color structure size.
Emma Anholt [Thu, 27 Jul 2023 22:23:25 +0000 (15:23 -0700)]
freedreno/a5xx: Fix border color structure size.

This now matches a6xx.  This major border color flakiness in deqp -- when
a prior test in the caselist bound a VS and it didn't get unbound at the
gallium level, our FS border colors would be up at offset 8 instead of 0,
and the wrong padding would make FS sampler 0 get a junk border color.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24358>

12 months agoradv/rt: fix capture/replay support
Samuel Pitoiset [Mon, 7 Aug 2023 15:11:39 +0000 (17:11 +0200)]
radv/rt: fix capture/replay support

When replaying a RT pipeline, RADEON_FLAG_REPLAYABLE should be set.

The idea is that for capture, RADEON_FLAG_REPLAYABLE should be passed
when allocating a BO (ie. replay_va would be 0), and then for replay
the VA would be non-zero but the flag is also required.

Fixes
dEQP-VK.ray_tracing_pipeline.pipeline_library.configurations.multithreaded_compilation.*.

Fixes: 744357477ef ("radv: Add utilities to serialize and deserialize shader allocation info")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24543>

12 months agodocs: Add INTEL_DEBUG_BKP_BEFORE/AFTER_DRAW_COUNT
Sagar Ghuge [Mon, 24 Jul 2023 18:41:33 +0000 (11:41 -0700)]
docs: Add INTEL_DEBUG_BKP_BEFORE/AFTER_DRAW_COUNT

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>

12 months agoblorp: Implement blorp hooks to emit breakpoint
Sagar Ghuge [Tue, 1 Aug 2023 16:52:09 +0000 (09:52 -0700)]
blorp: Implement blorp hooks to emit breakpoint

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>

12 months agoiris: Add GPU breakpoint before/after draw call
Sagar Ghuge [Thu, 20 Jul 2023 20:14:29 +0000 (13:14 -0700)]
iris: Add GPU breakpoint before/after draw call

This change allow us to insert the MI_SEMAPHORE_WAIT before/after
specific draw call. With GTX tool, we can always update the memory
address to unblock spinning wait.

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>

12 months agoanv: Add GPU breakpoint before/after specific draw call
Sagar Ghuge [Thu, 20 Jul 2023 02:04:21 +0000 (19:04 -0700)]
anv: Add GPU breakpoint before/after specific draw call

This change allow us to insert the MI_SEMAPHORE_WAIT before/after
specific draw call. With GTX tool, we can always update the memory
address to unblock spinning wait.

v2:
- Make sure draw_call_count is thread-safe (Lionel)
- Add static inline helper (Lionel)

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>

12 months agointel: Add env variable to add break point on/before draw
Sagar Ghuge [Wed, 19 Jul 2023 17:04:49 +0000 (10:04 -0700)]
intel: Add env variable to add break point on/before draw

Signed-off-by: Sagar Ghuge <sagar.ghuge@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24308>

12 months agoci/panfrost: t760-gles is nightly job, test also GLES 3 and 3.1
David Heidelberg [Fri, 4 Aug 2023 09:10:00 +0000 (12:10 +0300)]
ci/panfrost: t760-gles is nightly job, test also GLES 3 and 3.1

We don't care about how long it takes since it's nightly.

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24546>

12 months agoCI: Re-enable G52 Vulkan testing
David Heidelberg [Fri, 4 Aug 2023 09:14:03 +0000 (12:14 +0300)]
CI: Re-enable G52 Vulkan testing

This gives us coverage back on panvk on Bifrost. There are a lot of
fails since it was last tested though.

[daniels: Updated with new expectations.]

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24546>

12 months agoci/panfrost: re-enable t760 and t860 traces as a nightly job
David Heidelberg [Fri, 4 Aug 2023 09:04:01 +0000 (12:04 +0300)]
ci/panfrost: re-enable t760 and t860 traces as a nightly job

Two crashing jobs documented in: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9473

Acked-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24546>

12 months agoci: add perfetto into mesa git-cache
David Heidelberg [Tue, 13 Jun 2023 20:40:21 +0000 (22:40 +0200)]
ci: add perfetto into mesa git-cache

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

Fixes: 8aff2281276c ("ci: Enable building the testing drivers with perfetto.")
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23611>

12 months agozink: fix setting VkShaderCreateInfoEXT::nextStage
Samuel Pitoiset [Tue, 8 Aug 2023 13:17:53 +0000 (15:17 +0200)]
zink: fix setting VkShaderCreateInfoEXT::nextStage

nextStage has some restrictions depending on the current stage.

Fixes: cd6625c6eb9 ("zink: use EXT_shader_object to (re)implement separate shaders")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24558>

12 months agonir/print: always group variables by type when printing
Mike Blumenkrantz [Fri, 28 Jul 2023 14:26:11 +0000 (10:26 -0400)]
nir/print: always group variables by type when printing

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23752>

12 months agonir/print: print location names for (some) tess slots
Mike Blumenkrantz [Thu, 6 Apr 2023 18:29:33 +0000 (14:29 -0400)]
nir/print: print location names for (some) tess slots

these should be fine to print

Acked-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23752>

12 months agoGallium: Fix shared memory segment leak
Julian Hagemeister [Mon, 7 Aug 2023 11:03:20 +0000 (13:03 +0200)]
Gallium: Fix shared memory segment leak

Commit abe6d750e58d371624de75f4bad365c61e0196c1 caused shared memory
segments to be leaked. We need to mark shared memory segments for
deletion upon construction.

Fixes: abe6d750e5 xlib: fix glXDestroyContext in Gallium frontends
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9425
Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24556>

12 months agoradv: Expose VK_EXT_external_memory_acquire_unmodified.
Bas Nieuwenhuizen [Sun, 6 Aug 2023 23:09:19 +0000 (01:09 +0200)]
radv: Expose VK_EXT_external_memory_acquire_unmodified.

No-op, since we generally don't do anything to revalidate images.

In general on external/foreign queues we prepare on "export" that
it might be used on more queues, but we do pretty much nothing on
"import".

Gitlab: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9348
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24524>

12 months agoci: build nvk
Eric Engestrom [Mon, 7 Aug 2023 16:49:30 +0000 (17:49 +0100)]
ci: build nvk

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24542>

12 months agomeson: Export winsys function symbols for target va
Feng Jiang [Tue, 23 May 2023 07:44:20 +0000 (15:44 +0800)]
meson: Export winsys function symbols for target va

Export winsys function symbols of target va, even if the user
links with '-Bsymbolic-functions'.

It refers target vdpau, which commit is:
8c136b53b79e90b9e8f30f891b8bef112fee375d
("fix vdpau interop when using -Bsymbolic-functions in ldflags")

Signed-off-by: Feng Jiang <jiangfeng@kylinos.cn>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23177>

12 months agovc4/ci: update expected results
Juan A. Suarez Romero [Mon, 7 Aug 2023 14:06:13 +0000 (16:06 +0200)]
vc4/ci: update expected results

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24550>

12 months agoradv: use vk_query
Samuel Pitoiset [Tue, 1 Aug 2023 06:47:07 +0000 (08:47 +0200)]
radv: use vk_query

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>

12 months agoradv: use common vkCmdBegin/EndQuery wrappers
Samuel Pitoiset [Mon, 31 Jul 2023 15:12:45 +0000 (17:12 +0200)]
radv: use common vkCmdBegin/EndQuery wrappers

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>

12 months agoradv: use vk_sampler
Samuel Pitoiset [Tue, 1 Aug 2023 06:20:52 +0000 (08:20 +0200)]
radv: use vk_sampler

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>

12 months agoradv: use vk_buffer_view
Samuel Pitoiset [Tue, 1 Aug 2023 06:38:05 +0000 (08:38 +0200)]
radv: use vk_buffer_view

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>

12 months agovulkan: add init/finish helpers for vk_buffer_view
Samuel Pitoiset [Tue, 1 Aug 2023 06:33:18 +0000 (08:33 +0200)]
vulkan: add init/finish helpers for vk_buffer_view

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>

12 months agoanv: fake non intel vendorID for Death Stranding
Lionel Landwerlin [Wed, 19 Jul 2023 14:24:42 +0000 (17:24 +0300)]
anv: fake non intel vendorID for Death Stranding

The assumption is the same issue that is plaguing Cyberpunk 2077 is
also at play here. That is the XeSS library is looking for the Windows
driver binary and not finding them in the Wine/Proton distribution.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24237>

12 months agoradv: update cmdbuf scratch size info when shaders are bound
Samuel Pitoiset [Fri, 4 Aug 2023 16:02:00 +0000 (18:02 +0200)]
radv: update cmdbuf scratch size info when shaders are bound

This will automatically update the scratch size info for shader object.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24502>

12 months agoradv: update the number of scratch waves for RT prolog at bind time
Samuel Pitoiset [Fri, 4 Aug 2023 15:48:10 +0000 (17:48 +0200)]
radv: update the number of scratch waves for RT prolog at bind time

The compute scratch size is computed later because the RT stack size
can be dynamic, but the number of waves shouldn't change.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24502>

12 months agoradv: add a helper to get the maximum number of scratch waves per shader
Samuel Pitoiset [Fri, 4 Aug 2023 15:43:20 +0000 (17:43 +0200)]
radv: add a helper to get the maximum number of scratch waves per shader

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24502>

12 months agoradv: use the RT prolog scratch size directly for tracing rays
Samuel Pitoiset [Fri, 4 Aug 2023 15:59:24 +0000 (17:59 +0200)]
radv: use the RT prolog scratch size directly for tracing rays

It should be the same as the pipeline scratch size value.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24502>

12 months agointel/genxml: Add filter_engines() to GenXml class
Jordan Justen [Sat, 24 Dec 2022 09:40:30 +0000 (01:40 -0800)]
intel/genxml: Add filter_engines() to GenXml class

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agointel/genxml: Add GenXml class into intel_genxml module
Jordan Justen [Sat, 24 Dec 2022 01:44:03 +0000 (17:44 -0800)]
intel/genxml: Add GenXml class into intel_genxml module

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agointel/genxml: Convert gen_pack_header to use ElementTree
Jordan Justen [Fri, 23 Dec 2022 23:47:33 +0000 (15:47 -0800)]
intel/genxml: Convert gen_pack_header to use ElementTree

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agointel/genxml: Convert gen_bits_header to use ElementTree
Jordan Justen [Fri, 23 Dec 2022 19:42:59 +0000 (11:42 -0800)]
intel/genxml: Convert gen_bits_header to use ElementTree

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agointel/genxml: Split some genxml sorting code into a intel_genxml module
Jordan Justen [Fri, 23 Dec 2022 09:59:37 +0000 (01:59 -0800)]
intel/genxml: Split some genxml sorting code into a intel_genxml module

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agointel/genxml: Align "Texture Coordinate Mode" naming
Jordan Justen [Fri, 4 Aug 2023 09:25:53 +0000 (02:25 -0700)]
intel/genxml: Align "Texture Coordinate Mode" naming

Some older gens used '_' (underscore) while newer gens used a ' '
(space).

$ sed -i 's/Texture_Coordinate_Mode/Texture\ Coordinate\ Mode/' \
      src/intel/genxml/*.xml

The naming needs to be aligned for importing enums later on.

Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24547>

12 months agollvmpipe: fix UAF in lp_scene_is_resource_referenced.
Martin Stransky [Tue, 1 Aug 2023 02:38:16 +0000 (12:38 +1000)]
llvmpipe: fix UAF in lp_scene_is_resource_referenced.

reworked slightly by airlied

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24414>

12 months agonvk: Fix assert
Vinson Lee [Mon, 7 Aug 2023 04:54:49 +0000 (21:54 -0700)]
nvk: Fix assert

Fix defect reported by Coverity Scan.

Assign instead of compare (PW.ASSIGN_WHERE_COMPARE_MEANT)
assign_where_compare_meant: use of "=" where "==" may have been intended

Fixes: e41031d8ffd ("nvk: Enable multiplane images and image views")
Signed-off-by: Vinson Lee <vlee@freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24530>

12 months agonouveau/mme: fix OOB inside tu104 simulator
Karol Herbst [Mon, 7 Aug 2023 19:10:10 +0000 (21:10 +0200)]
nouveau/mme: fix OOB inside tu104 simulator

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24544>

12 months agonouveau/mme: fix OOB access inside while_ine builder test
Karol Herbst [Mon, 7 Aug 2023 19:09:13 +0000 (21:09 +0200)]
nouveau/mme: fix OOB access inside while_ine builder test

Signed-off-by: Karol Herbst <git@karolherbst.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24544>

12 months agoanv: Override vendorID for Hogwarts Legacy
José Roberto de Souza [Fri, 4 Aug 2023 19:00:28 +0000 (12:00 -0700)]
anv: Override vendorID for Hogwarts Legacy

This is another game that makes use of XeSS but works when we fake
the vendorID.

With this temporary hack it works on i915 and Xe KMDs.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24506>

12 months agoglsl: fix spirv sso validation
Timothy Arceri [Mon, 7 Aug 2023 03:58:57 +0000 (13:58 +1000)]
glsl: fix spirv sso validation

The api validation calls will segfault without this as it will
try to fallback to string matching names which are NULL. This
would be incorrect behaviour even if the names weren't NULL so
here we correctly set the explicit location flag.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9483
Fixes: ffdb44d3a0a2 ("nir/linker: Add inputs/outputs to the program resource list")

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24529>

12 months agozink: turn off threaded cpu access if not visible.
Dave Airlie [Mon, 7 Aug 2023 22:32:54 +0000 (08:32 +1000)]
zink: turn off threaded cpu access if not visible.

This turns off the threaded cpu access it the resource isn't visible.

Fixes a bunch of crashes with current nvk.

Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24548>

12 months agonvk: Remove plane sources from tex instructions
Faith Ekstrand [Mon, 7 Aug 2023 15:46:26 +0000 (10:46 -0500)]
nvk: Remove plane sources from tex instructions

The plane source is entirely handled by lower_tex() so there's no need
to keep it around.  Codegen currently just ignores these but NAK will
assert if it sees an unknown source type.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24549>

12 months agonir/linking_helpers: force type matching in does_varying_match
Mike Blumenkrantz [Wed, 2 Aug 2023 17:39:38 +0000 (13:39 -0400)]
nir/linking_helpers: force type matching in does_varying_match

this otherwise breaks when i/o is scalarized in the producer but not
the consumer

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24458>

12 months agonir/lower_io_to_scalar: fix 64bit io splitting
Mike Blumenkrantz [Wed, 2 Aug 2023 17:34:36 +0000 (13:34 -0400)]
nir/lower_io_to_scalar: fix 64bit io splitting

this was creating broken 64bit loads/stores using 32bit component
size

cc: mesa-stable

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24458>

12 months agoanv/video: copy from correct H264 scaling lists
Benjamin Cheng [Thu, 3 Aug 2023 14:27:34 +0000 (10:27 -0400)]
anv/video: copy from correct H264 scaling lists

Vulkan defines the scaling lists according to the H264 ITU spec, which
only defines ScalingList8x8[0] and ScalingList8x8[1] for
non-444 formats.

Reviewed-by: Lynne <dev@lynne.ee>
Reviewed-by: Hyunjun Ko <zzoon@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24474>

12 months agoradv/video: copy from correct H264 scaling lists
Benjamin Cheng [Mon, 31 Jul 2023 22:46:22 +0000 (18:46 -0400)]
radv/video: copy from correct H264 scaling lists

Vulkan defines the scaling lists according to the H264 ITU spec, which
only defines ScalingList8x8[0] and ScalingList8x8[1] for
non-444 formats. Since RADV only supports 420, just directly use those.

Reviewed-by: Lynne <dev@lynne.ee>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24413>

12 months agonvk: align sampler allocation counts with nvidia.
Dave Airlie [Mon, 7 Aug 2023 05:56:06 +0000 (15:56 +1000)]
nvk: align sampler allocation counts with nvidia.

Fill out the missing property as well.

found running some zink piglit runs.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24532>

12 months agonir/gl: Move glsl_type::sampler_target() into a helper in its one caller
Faith Ekstrand [Fri, 4 Aug 2023 11:16:00 +0000 (06:16 -0500)]
nir/gl: Move glsl_type::sampler_target() into a helper in its one caller

The new version also doesn't need to worry about arrays of textures
because the caller already takes care of that.

Reviewed-by: Caio Oliveira <caio.oliveira@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24503>

12 months agotu: Add virtgpu support
Rob Clark [Wed, 3 May 2023 18:02:06 +0000 (11:02 -0700)]
tu: Add virtgpu support

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu/drm: Split out helper for iova alloc
Rob Clark [Wed, 28 Jun 2023 22:58:21 +0000 (15:58 -0700)]
tu/drm: Split out helper for iova alloc

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu/drm: Add missing error path cleanup
Rob Clark [Wed, 21 Jun 2023 21:46:46 +0000 (14:46 -0700)]
tu/drm: Add missing error path cleanup

Fixes: bea6290ca090 ("turnip: device global bo list")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu/drm: Factor out shared helpers
Rob Clark [Wed, 21 Jun 2023 20:39:56 +0000 (13:39 -0700)]
tu/drm: Factor out shared helpers

Factor out a few things that we can re-use between virtio and msm
backends.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu: close submitqueues before device_finish()
Rob Clark [Thu, 8 Jun 2023 19:59:48 +0000 (12:59 -0700)]
tu: close submitqueues before device_finish()

Otherwise we would have already closed the device.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agofreedreno/drm/virtio: Use global_faults
Rob Clark [Mon, 22 May 2023 19:43:37 +0000 (12:43 -0700)]
freedreno/drm/virtio: Use global_faults

Rather than doing a synchronous round trip to the host to query fault
count, use the shmem->global_faults field if available.  The kernel is
already only reporting faults associated with the same drm_file (which
in this case maps 1:1 to guest process), so the only thing we really
miss is, if the app is using multiple contexts, _which_ context the
fault was in.  But vulkan doesn't even use that, which sounds like a
good enough argument that per-submitqueue granularity isn't really
needed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agofreedreno: Update virtgpu proto
Rob Clark [Mon, 22 May 2023 18:50:13 +0000 (11:50 -0700)]
freedreno: Update virtgpu proto

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agodrm-uapi: Update virtgpu header
Rob Clark [Fri, 19 May 2023 20:33:11 +0000 (13:33 -0700)]
drm-uapi: Update virtgpu header

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu/knl: Remove some random const'ness
Rob Clark [Mon, 22 May 2023 19:47:06 +0000 (12:47 -0700)]
tu/knl: Remove some random const'ness

This gets in the way with virtio_gpu backend.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agotu/msm: staticify a couple things
Rob Clark [Fri, 12 May 2023 20:55:51 +0000 (13:55 -0700)]
tu/msm: staticify a couple things

Stop leaking some private implementation details as global symbols.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agofreedreno/drm/virtio: Remove unused header
Rob Clark [Fri, 19 May 2023 20:16:38 +0000 (13:16 -0700)]
freedreno/drm/virtio: Remove unused header

A remnant from a very early version, prior to refactoring out
fd_ringbuffer_sp to share more code btwn msm and virtgpu backends.
Somehow this never got removed.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agofreedreno: move virtgpu msm_proto.h to common
Rob Clark [Fri, 12 May 2023 20:32:41 +0000 (13:32 -0700)]
freedreno: move virtgpu msm_proto.h to common

src/freedreno/virtgpu seems a bit overkill for a single header.. but
maybe there are some other bits we could share?

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>

12 months agor600/sfn: take number of dest values into account
Gert Wollny [Mon, 7 Aug 2023 06:51:23 +0000 (08:51 +0200)]
r600/sfn: take number of dest values into account

With the write mask removed we have to run the loop correctly.

Fixes: b870988b77f70acd69feb1d4e52343b7c3d4e328
    r600/sfn: Stop referencing legacy functionality

Related: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9490
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24533>

12 months agoForce vk vendor for spider-man remastered
Kevron Rees [Mon, 7 Aug 2023 16:15:19 +0000 (09:15 -0700)]
Force vk vendor for spider-man remastered

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24194>

12 months agozink: unset line stipple ds3 state flags when stipple not available
Mike Blumenkrantz [Thu, 3 Aug 2023 11:36:56 +0000 (07:36 -0400)]
zink: unset line stipple ds3 state flags when stipple not available

Fixes: 7b4c1b3a426 ("zink: track and apply ds3 states only on change")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24478>

12 months agozink: use VK_WHOLE_SIZE when binding null db buffer descriptors
Mike Blumenkrantz [Thu, 3 Aug 2023 11:36:00 +0000 (07:36 -0400)]
zink: use VK_WHOLE_SIZE when binding null db buffer descriptors

using range=0 is illegal

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24478>

12 months agoci: bump VVL to 1.3.261
Mike Blumenkrantz [Thu, 3 Aug 2023 15:44:10 +0000 (11:44 -0400)]
ci: bump VVL to 1.3.261

Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24478>

12 months agointel: Sync xe_drm.h and rename engine to exec_queue
José Roberto de Souza [Thu, 3 Aug 2023 14:19:48 +0000 (07:19 -0700)]
intel: Sync xe_drm.h and rename engine to exec_queue

Sync with commit f16c04291100 ("drm/xe: Rename engine to exec_queue").
With that Iris and ANV had some major renames that were done manually
as there is to many "engine" in non-related code.

Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24476>

12 months agoegl: fixup _eglFilterConfigArray() params and drop _eglFallbackMatch() wrapper
Eric Engestrom [Sat, 22 Jul 2023 09:57:22 +0000 (10:57 +0100)]
egl: fixup _eglFilterConfigArray() params and drop _eglFallbackMatch() wrapper

Signed-off-by: Eric Engestrom <eric@engestrom.ch>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24292>

12 months agoegl: make _eglFilterConfigArray static
Eric Engestrom [Sat, 22 Jul 2023 10:04:19 +0000 (11:04 +0100)]
egl: make _eglFilterConfigArray static

Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24292>

12 months agopanfrost: add PAN_MESA_DEBUG=yuv for debugging yuv sampler
Italo Nicola [Wed, 28 Jun 2023 22:25:26 +0000 (22:25 +0000)]
panfrost: add PAN_MESA_DEBUG=yuv for debugging yuv sampler

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost: mandate proper alignment requirement depending format and arch
Italo Nicola [Wed, 1 Feb 2023 19:21:26 +0000 (19:21 +0000)]
panfrost: mandate proper alignment requirement depending format and arch

v7+ mandates row_stride alignment to be equal to surface alignment.
AFBC surface alignment is always 16-bytes.
NV12/NV21 formats on v7+ have 16-byte surface alignment.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost: advertise support for YUYV and variants
Italo Nicola [Thu, 22 Jun 2023 11:55:01 +0000 (11:55 +0000)]
panfrost: advertise support for YUYV and variants

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost: prepare the driver to support YUYV and variants
Italo Nicola [Tue, 24 Jan 2023 20:59:55 +0000 (20:59 +0000)]
panfrost: prepare the driver to support YUYV and variants

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost: prepare pan_image_view for multiplanar formats
Italo Nicola [Thu, 20 Jul 2023 23:11:14 +0000 (23:11 +0000)]
panfrost: prepare pan_image_view for multiplanar formats

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopan/decode: decode Multiplanar Surface descriptors
Italo Nicola [Thu, 13 Jul 2023 15:05:09 +0000 (15:05 +0000)]
pan/decode: decode Multiplanar Surface descriptors

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost: refactor (un)packing of surface descriptors
Italo Nicola [Thu, 13 Jul 2023 14:45:36 +0000 (14:45 +0000)]
panfrost: refactor (un)packing of surface descriptors

Use the genxml helpers to pack/unpack midgard and bifrost surface
descriptors. Also changed how we describe midgard's descriptors, to make
it more straightforward. We currently only use SURFACE_WITH_STRIDE for
midgard, but pandecode should still be able to decode other surface
descriptor types.

This commit shouldn't change panfrost/pandecode behavior.

Consequenctly, this refactor also prepares pandecode to handle the
SURFACE_YUV descriptor for bifrost in the following patch.

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost/genxml: add Multiplanar Surface descriptor
Italo Nicola [Fri, 3 Feb 2023 21:20:31 +0000 (21:20 +0000)]
panfrost/genxml: add Multiplanar Surface descriptor

Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopanfrost/genxml: fix Surface With Stride descriptor alignment
Italo Nicola [Thu, 22 Jun 2023 10:43:39 +0000 (10:43 +0000)]
panfrost/genxml: fix Surface With Stride descriptor alignment

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21109>

12 months agopvr: do not claim support for ASTC texture compression
Luigi Santivetti [Wed, 2 Aug 2023 13:32:12 +0000 (14:32 +0100)]
pvr: do not claim support for ASTC texture compression

We don't support any ASTC formats yet, but the textureCompressionASTC_LDR
feature was incorrectly set to true. Fix this by setting it to false and
don't advertise ASTC support for texture compression.

Fixes dEQP-VK.api.info.format_properties.compressed_formats

Fixes: 8991e646 ("pvr: Add a Vulkan driver for Imagination Technologies PowerVR Rogue GPUs")
Signed-off-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24448>