Commit Graph

169767 Commits

Author SHA1 Message Date
Patrick Lerda 7809a85f14 r600: fix refcnt imbalance related to r600_set_vertex_buffers()
For instance, this issue is triggered with: "piglit/bin/useprogram-flushverts-2 -auto -fbo" or
"piglit/bin/primitive-restart-draw-mode line_loop -auto"
while setting GALLIUM_REFCNT_LOG=refcnt.log.

Fixes: 27dcb46629 ("gallium: add take_ownership param into set_vertex_buffers to eliminate atomics")

Signed-off-by: Patrick Lerda <patrick9876@free.fr>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22395>
(cherry picked from commit 28cb33fada)
2023-04-16 22:37:09 +01:00
Samuel Pitoiset bf6c8ee864 radv: try to keep HTILE compressed for READ_ONLY_OPTIMAL layout
It should be handled like DEPTH_STENCIL_READ_ONLY_OPTIMAL.

This fixes an issue with VRS attachment because HTILE was considered
disabled for READ_ONLY_OPTIMAL but there is no reasons to disable it
as long as the image is only used as a depth/stencil attachment.

Otherwise, when HTILE is disabled, VRS rates are ignored.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8675
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22468>
(cherry picked from commit f11a4a09b0)
2023-04-16 22:37:09 +01:00
Samuel Pitoiset 1becf6be48 vulkan: ignore rasterizationSamples when the state is dynamic
Fixes: 1deb83fb86 ("vulkan: Add more dynamic multisample states")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22444>
(cherry picked from commit bdb03ecdd9)
2023-04-16 22:37:09 +01:00
Lionel Landwerlin 4ed3b1ae6b intel/vec4: force exec_all on float control instruction
Applying the same rule as the fs backend so that generation code
doesn't assert.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: daa8003e45 ("intel/fs: use nomask for setting cr0 for float controls")
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22473>
(cherry picked from commit 08cf224c4a)
2023-04-16 22:37:09 +01:00
Mike Blumenkrantz 14df131f8f zink: always defer query pool deletion
this feels dumb, but I can't think of a simpler way to do it that
would more accurately handle deletion while also guaranteeing
pool longevity

Fixes: 7da78ffb69 ("zink: create/use query pools dynamically")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22493>
(cherry picked from commit 7119a344f3)
2023-04-16 22:37:08 +01:00
Mike Blumenkrantz 204995f16f zink: pass ctx through query destroy paths
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22493>
(cherry picked from commit 50e3974e25)
2023-04-16 22:36:25 +01:00
Mike Blumenkrantz f3969bf7df zink: remove atomics from zink_query
this is never accessed from threads anymore and
hasn't been for a long time

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22493>
(cherry picked from commit cb83606279)
2023-04-16 22:36:23 +01:00
Lionel Landwerlin 61d1cdba6e vulkan/runtime: discard unused graphics stages in libraries
Anv is trying to rely on the stages put into the library graphics
state.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Cc: mesa-stable
Reviewed-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/22460>
(cherry picked from commit 5dc4212cc1)
2023-04-16 22:17:40 +01:00
Mike Blumenkrantz 3b6c72fa75 mesa/st/program: don't init xfb info if there are no outputs
this is almost certainly a failure case, but drivers still shouldn't
get xfb info if there are no outputs

affects:
spec@glsl-1.50@execution@interface-blocks-api-access-members

cc: mesa-stable

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22448>
(cherry picked from commit a86c710ce5)
2023-04-16 22:17:38 +01:00
Samuel Pitoiset 46ff518ebf radv: fix detecting FMASK_DECOMPRESS/DCC_DECOMPRESS meta pipelines
With the on_demand shaders feature, meta pipelines are only created
when they are used, otherwise they are NULL. Though, inside secondary
cmdbuffers, the graphics pipeline might be also NULL. In this specific
case, radv_is_{dcc,fmask}_decompress_pipeline() would return
TRUE because these pipelines are NULL too...

This fixes flakes with tests that use secondary cmdbuffers with
TC-compat images.

Cc: mesa-stable
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22440>
(cherry picked from commit 0b4e7491f3)
2023-04-16 22:16:17 +01:00
Eric Engestrom acce8ed144 .pick_status.json: Update to 8ebc5cbe2b 2023-04-16 22:16:15 +01:00
Eric Engestrom f53f445b97 VERSION: bump for 23.1.0-rc1 2023-04-14 23:08:04 +01:00
Eric Engestrom 117b967321 v3d: disable GL_NV_conditional_render
This feature is supported, but enabling it accidentally enables
OpenGL 3.0 & 3.1, which are not supported.

The feature is enabled in main and discussion to fix the issue is
underway, but we're disabling it in releases until we find a better
solution.

Signed-off-by: Eric Engestrom <eric@igalia.com>
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22260>
2023-04-13 23:16:11 +01:00
Qiang Yu 45826e42c5 ac,aco: move gfx10 ngg prim count zero workaround to nir
To simplify both llvm and aco backend and remove unnecessary
workaround code where prim count is known to be not zero.

Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22381>
2023-04-13 08:12:03 +00:00
Tapani Pälli b967cbba57 intel/compiler: use intel_needs_workaround for Wa_14012437816
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22437>
2023-04-13 07:33:50 +00:00
Tapani Pälli ccf16693e1 intel/fs: use intel_needs_workaround for Wa_22013689345
Signed-off-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22437>
2023-04-13 07:33:50 +00:00
Eric Engestrom 1a9727a81e ci/rustfmt: make sure to only check each file once
rustfmt has some magic that follows files (I'm guessing), making files get
checked multiple times with `*.rs`, so let's limit ourselves to `lib.rs`.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22321>
2023-04-13 05:56:53 +00:00
Tatsuyuki Ishi 36fd2bbd98 ci/android: Make armv8's arch aarch64 instead of arm.
Per [1], arm is for 32-bit.

For an upcoming change, we need to detect AArch64 specifically.
Specifying arm in the cross file will result in the wrong build script
behavior.

[1]: https://mesonbuild.com/Reference-tables.html#cpu-families

Reviewed-by: Helen Koike <helen.koike@collabora.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22418>
2023-04-13 04:28:29 +00:00
Mike Blumenkrantz 1a63ccc9aa zink: remove a fixed validation error for ci
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22453>
2023-04-13 04:10:32 +00:00
Karol Herbst 55c9356d29 rusticl/program: rework source code tracking
For the CL spec it really matters how a program object was created. We
never really cared all that much, but it didn't support the corner case of
having an empty string as the OpenCL C source code.

Enums feel like the more Rust way to do this kind of stuff anyway.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 6d7b705125 rusticl/program: extract common code of compile and build
The code wasn't all the same, but the build version was wrong, e.g. the
compile flags specified need to be stored even on error.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst d7e9b4ef5b rusticl/program: validate the SPIR-V when created from IL
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8771
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 8fcfc51dad clc: add clc_validate_spirv
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Jesse Natalie <jenatali@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst ab032f4bfd rusticl/program: make IL programs look closer to CLC ones
We want to validate the actual passed in SPIR-V, but we can only report
errors back on build/compile time. So instead of storing the initial IL
in the devices `ProgramBuild` objects, just store it on the Program
instead. This also simplifies setting spec constants as this is only valid
on program directly created from IL and not e.g. linked ones.

Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst ca1e9917a9 rusticl/program: allow dumping compilation logs through RUSTICL_DEBUG
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 22808d542b rusticl/platform: move device initialization to the platform
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 53025688bb rusticl/platform: move getter into the type
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 3e59a2860e rusticl/platform: rename _cl_platform_id to Platform
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:21 +00:00
Karol Herbst 11250d7a9e rusticl: split platform into core and api parts
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22280>
2023-04-13 02:54:20 +00:00
Samuel Pitoiset 3320eee877 radv: cleanup after splitting radv_pipeline.c
I moved to many things to radv_pipeline_graphics.c without checking.

Fixes: 7783b7f697 ("radv: split radv_pipeline.c into radv_pipeline_{compute,graphics}.c")
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22441>
2023-04-13 02:21:44 +00:00
Vitaliy Triang3l Kuzmin 30d141ba63 r600: Alpha to coverage dithering on Evergreen+
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Signed-off-by: Vitaliy Triang3l Kuzmin <triang3l@yandex.ru>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22384>
2023-04-13 02:07:52 +00:00
Alyssa Rosenzweig 7a7d374ac3 pan/decode: Print compute job payloads
Noticed while debugging OpenCL. I think this was fallout from the CSF decode
rework?

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
Alyssa Rosenzweig de01ae120d panfrost: Allocate shared memory in OpenCL
In OpenCL, we can have no shader-defined shared memory but some dispatch-time
variable memory. This is not reflected in ss->info.wls_size, so check the right
variable instead so we allocate the appropriate memory.

Fixes page faults accessing shared memory with Rusticl, e.g. in the vstore_local
test.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Reviewed-by: Italo Nicola <italonicola@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
Alyssa Rosenzweig 2f2738dc90 pan/bi: Use nir_lower_mem_access_bit_sizes
OpenCL can generate large loads and stores that we can't support, so we need to
lower. We can load/store up to 128-bits in a single go. We currently only handle
up to 32-bit components in the load and no more than vec4, so we split up
accordingly.

It's not clear to me what the requirements are for alignment on Valhall, so we
conservatively generate aligned access, at worst there's a performance penalty
in those cases. I think unaligned access is suppoerted, but likely with a
performance penalty of its own? So in the absence of hard data otherwise, let's
just use natural alignment.

Oddly, this shaves off a tiny bit of ALU in a few compute shaders on Valhall,
all in gfxbench. Seems to just be noise from the RA lottery.

total instructions in shared programs: 2686768 -> 2686756 (<.01%)
instructions in affected programs: 584 -> 572 (-2.05%)
helped: 6
HURT: 0
Instructions are helped.

total cvt in shared programs: 14644.33 -> 14644.14 (<.01%)
cvt in affected programs: 5.77 -> 5.58 (-3.25%)
helped: 6
HURT: 0

total quadwords in shared programs: 1455320 -> 1455312 (<.01%)
quadwords in affected programs: 56 -> 48 (-14.29%)
helped: 1
HURT: 0

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
Alyssa Rosenzweig 934b0f1add pan/bi: Respect swizzles for more vector ops
We need to respect the ALU swizzle, this takes a vector. Fixes incorrect
pack_64_2x32 translation hit when wiring up lower_mem_access_bit_sizes for
OpenCL.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
Alyssa Rosenzweig d00d2ae701 pan/bi: Lower swizzles for 8-bit CSEL
With OpenCL we can generate stuff like CSEL.u32.eq r0.b0000, we need to handle
it when lowering swizzles.

Signed-off-by: Alyssa Rosenzweig <alyssa@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22228>
2023-04-13 01:49:33 +00:00
Lionel Landwerlin 66edd030ab anv: add utrace tracking of frame boundaries
Based on vkQueuePresentKHR calls. It just helps spotting the beginning
end of a frame in perfetto when apps are using 3/4 command buffers per
frame.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22276>
2023-04-13 01:14:38 +00:00
Lionel Landwerlin da6842007f intel/ds: add a new timeline row for frames
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Emma Anholt <emma@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22276>
2023-04-13 01:14:38 +00:00
Lionel Landwerlin 68bba1539f anv: exclude performance queries from blorp clears
The query buffer contains a batch to implement the multi pass
replay/accumulation of results. So we can't clear it with a memset.

An optimization for later would be to move the batches to the very end
of the query buffer so we can clear the query data without touching
the batches.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Fixes: 4dc7256bf9 ("anv: reset query pools using blorp")
Reviewed-by: Felix DeGrood <felix.j.degrood@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22421>
2023-04-13 00:44:29 +00:00
Timur Kristóf 7036d1a155 ac/nir/ngg: Don't store primitive IDs from culled primitives.
Primitive export used the gs_accepted variable after culling,
so we overwrote this variable after vertex compaction to make
sure not to hang the GPU.

This had an unintended side effect when storing the primitive ID
to LDS on GS threads: the LDS store was done even on threads whose
triangle was culled; potentially causing issues.

As a fix, create a separate boolean variable that remembers
which invocations need to export a primitive; and don't store
the primitive ID to LDS when gs_accepted is false.

Cc: mesa-stable
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8805
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22424>
2023-04-12 23:55:37 +00:00
Ruijing Dong 31c4087cb3 frontends/va: disable skip_frame_enable in vaapi interface.
skip_frame_enable is for preventing overshooting in some cases,
however the tests in FW were broken, and the output result shows
the functionality has not completed yet, which is the reason
this should be disabled at the moment until it has been fully
verified.

Cc: mesa-stable
Fixes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8178

Reviewed-by: Boyuan Zhang <Boyuan.Zhang@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22428>
2023-04-12 23:40:23 +00:00
Oleksii Bozhenko 8976d8280f wsi: remove get_sorted_vk_formats duplication
Fixes: 37a8b2d12e
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8727

Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22337>
2023-04-12 22:07:32 +00:00
Oleksii Bozhenko 53106c3a4f wsi: add rgb_component_bits_are_equal
Signed-off-by: Oleksii Bozhenko oleksii.bozhenko@globallogic.com

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Reviewed-by: Eric Engestrom <eric@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22337>
2023-04-12 22:07:32 +00:00
Mike Blumenkrantz 7704773619 zink: handle swapchain handoffs around makecurrent
when a new resource is created for an extant swapchain, the existing
acquire (if any) should be transferred to the resource to ensure
expected behavior

this should be enough to fix piglit's glx-make-current

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22431>
2023-04-12 21:43:35 +00:00
Mike Blumenkrantz 5db5218044 zink: track per-image swapchain layouts
this is important for handing off the swapchain between resources
on makecurrent since a context that is made not-current will have its
swapchain resources destroyed while the swapchain persists

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22431>
2023-04-12 21:43:35 +00:00
Bas Nieuwenhuizen ba73a41a2b radv: Reserve space for fast clear related writes.
Fixes: 9ee67467c9 ("radv: predicate cmask eliminate when using DCC.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00
Bas Nieuwenhuizen 1b5bd0f1c0 radv: Reserve space for updating DCC metadata.
Fixes: 9ee67467c9 ("radv: predicate cmask eliminate when using DCC.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00
Bas Nieuwenhuizen 771c0f0e65 radv: Reserve space in si_cs_emit_cache_flush.
Fixes: 4c6f83006d ("radv: Synchronization for task shaders.")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00
Bas Nieuwenhuizen 1de978b873 radv: Reserve space in conditional rendering functions.
Fixes: e45ba51ea4 ("radv: add support for VK_EXT_conditional_rendering")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00
Bas Nieuwenhuizen 7f47d764e1 radv: Reserve space in various streamout functions.
Fixes: b4eb029062 ("radv: implement VK_EXT_transform_feedback")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00