Commit graph

177262 commits

Author SHA1 Message Date
Samuel Pitoiset
478a18aa3d zink: fix setting VkShaderCreateInfoEXT::nextStage
nextStage has some restrictions depending on the current stage.

Fixes: cd6625c6eb ("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>
2023-08-08 14:44:38 +00:00
Mike Blumenkrantz
f75ba983ca 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>
2023-08-08 13:51:34 +00:00
Mike Blumenkrantz
4a783abd79 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>
2023-08-08 13:51:34 +00:00
Julian Hagemeister
4c11fe8ae6 Gallium: Fix shared memory segment leak
Commit abe6d750e5 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>
2023-08-08 13:24:01 +00:00
Bas Nieuwenhuizen
5325582968 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>
2023-08-08 12:26:06 +00:00
Eric Engestrom
edab54dd68 ci: build nvk
Signed-off-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24542>
2023-08-08 11:43:18 +00:00
Feng Jiang
9f0866018c 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:
8c136b53b7
("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>
2023-08-08 11:13:56 +00:00
Juan A. Suarez Romero
0dafa2e0f0 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>
2023-08-08 10:52:01 +00:00
Samuel Pitoiset
a7d6edfb36 radv: use vk_query
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>
2023-08-08 10:24:54 +00:00
Samuel Pitoiset
97c926cf17 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>
2023-08-08 10:24:54 +00:00
Samuel Pitoiset
36a93b41d4 radv: use vk_sampler
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24416>
2023-08-08 10:24:54 +00:00
Samuel Pitoiset
b6d542d7ba 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>
2023-08-08 10:24:54 +00:00
Samuel Pitoiset
fc14988082 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>
2023-08-08 10:24:54 +00:00
Lionel Landwerlin
9acbb197fb 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>
2023-08-08 09:50:44 +00:00
Samuel Pitoiset
b135149986 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>
2023-08-08 09:28:54 +00:00
Samuel Pitoiset
ea31193532 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>
2023-08-08 09:28:54 +00:00
Samuel Pitoiset
44e82a6cf1 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>
2023-08-08 09:28:54 +00:00
Samuel Pitoiset
9880224490 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>
2023-08-08 09:28:54 +00:00
Jordan Justen
493e8c4b50 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>
2023-08-08 08:58:36 +00:00
Jordan Justen
5e275d8a2b 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>
2023-08-08 08:58:36 +00:00
Jordan Justen
6e54245d00 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>
2023-08-08 08:58:36 +00:00
Jordan Justen
a8a50332a6 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>
2023-08-08 08:58:36 +00:00
Jordan Justen
ef2f2ae765 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>
2023-08-08 08:58:36 +00:00
Jordan Justen
761bcc3716 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>
2023-08-08 08:58:36 +00:00
Martin Stransky
87ec9456be 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>
2023-08-08 08:02:28 +00:00
Vinson Lee
9dd6866958 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: e41031d8ff ("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>
2023-08-08 07:40:55 +00:00
Karol Herbst
43f7d9693b 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>
2023-08-08 07:10:38 +00:00
Karol Herbst
1bee6a35ec 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>
2023-08-08 07:10:38 +00:00
José Roberto de Souza
8483a59dde 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>
2023-08-08 06:16:16 +00:00
Timothy Arceri
a7850f8cf3 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: ffdb44d3a0 ("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>
2023-08-08 05:36:39 +00:00
Dave Airlie
ae6be7a44a 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>
2023-08-08 05:06:11 +00:00
Faith Ekstrand
4f217e9670 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>
2023-08-08 04:48:33 +00:00
Mike Blumenkrantz
ac00f5a361 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>
2023-08-08 03:55:06 +00:00
Mike Blumenkrantz
58ba2bcc8c 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>
2023-08-08 03:55:06 +00:00
Benjamin Cheng
4755276baf 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>
2023-08-08 03:21:39 +00:00
Benjamin Cheng
0e4b1b8f23 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>
2023-08-08 02:48:49 +00:00
Dave Airlie
08ca37645e 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>
2023-08-08 02:28:47 +00:00
Faith Ekstrand
f2f4e811be 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>
2023-08-08 01:50:05 +00:00
Rob Clark
f17c5297d7 tu: Add virtgpu support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>
2023-08-08 00:20:48 +00:00
Rob Clark
006342be8b 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>
2023-08-08 00:20:48 +00:00
Rob Clark
84524cfdfa tu/drm: Add missing error path cleanup
Fixes: bea6290ca0 ("turnip: device global bo list")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>
2023-08-08 00:20:48 +00:00
Rob Clark
811f332d81 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>
2023-08-08 00:20:48 +00:00
Rob Clark
c14a13d40d 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>
2023-08-08 00:20:48 +00:00
Rob Clark
2196fdb2cf 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>
2023-08-08 00:20:48 +00:00
Rob Clark
0be8fab6c8 freedreno: Update virtgpu proto
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>
2023-08-08 00:20:48 +00:00
Rob Clark
b0deba6210 drm-uapi: Update virtgpu header
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23533>
2023-08-08 00:20:48 +00:00
Rob Clark
5d701d4eba 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>
2023-08-08 00:20:48 +00:00
Rob Clark
3a3a658797 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>
2023-08-08 00:20:48 +00:00
Rob Clark
37834e3d7c 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>
2023-08-08 00:20:48 +00:00
Rob Clark
6ae6536ed9 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>
2023-08-08 00:20:48 +00:00