Commit Graph

169727 Commits

Author SHA1 Message Date
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
Bas Nieuwenhuizen
4879f309a6 radv: Reserve space in framebuffer emission.
In the execute secondary scenario nothing else does it for us.

Fixes: 203f60ebf2 ("radv: emit framebuffer state from primary if secondary doesn't inherit it")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22392>
2023-04-12 20:31:47 +00:00
Georg Lehmann
0c8394908c aco/tests: add missing dependency on generated header
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8820
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22442>
2023-04-12 20:00:09 +00:00
Emma Anholt
f8a8b7708e etnaviv: Fix regression from if_uses change.
Flipped the condition in the conversion.

Fixes: 7f6491b76d ("nir: Combine if_uses with instruction uses")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22430>
2023-04-12 18:21:40 +00:00
Timur Kristóf
bd3191dbfe aco, radv: Remove redundant enable_mrt_output_nan_fixup from PS epilog info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935>
2023-04-12 17:30:02 +00:00
Timur Kristóf
af768afcbf aco, radv: Remove "key" from aco_compiler_options.
aco_compiler_options::key is a leftover from when aco used
the radv_pipeline_key struct, but aco_compiler_options::key was
never actually used as a cache key.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935>
2023-04-12 17:30:02 +00:00
Timur Kristóf
80d8e8d828 aco: Remove setup_*_variables and add setup_lds_size instead.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935>
2023-04-12 17:30:02 +00:00
Timur Kristóf
facecd87e1 radv: Don't hardcode LDS granularity in gfx9_get_gs_info.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935>
2023-04-12 17:30:02 +00:00
Timur Kristóf
4ae46840cd ac, aco, radv: Clarify LDS size on GFX6, and NGG shaders.
This information was wrong in some places, let's fix it now.

GFX6:
The GPU has 64KB LDS, but only 32KB is usable by a workgroup.

NGG:
There was some misinformation about NGG only being able to
address 32 KB LDS, it turns out this is actually not true
and it can address the full 64K.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21935>
2023-04-12 17:30:02 +00:00
Mike Blumenkrantz
edf30b1c6d zink: eliminate implicit feedback loops on rp begin
in a scenario like:
* bind fb
* clear
* bind fb attachment as sampler
* begin rp
* draw
* end rp
* flush
* bind new fs
* begin rp
* draw

the first draw will have an implicit feedback loop, but the second one will not
need a feedback loop. since no samplers or attachments are changed between
draws, however, the feedback loop will remain active for successive renderpasses,
which is problematic since the shader part of the driver (zink_update_barriers)
attempts to eliminate these same feedback loops, leading to layout desync

instead, add handling to attachment prep here to eliminate feedback loops
in the event that an attachment can be switched from a write layout to a read layout

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22423>
2023-04-12 15:43:01 +00:00
Mike Blumenkrantz
60d045e0b2 zink: pre-convert attachment id to attachment idx
this is a little simpler and allows reuse

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22423>
2023-04-12 15:43:01 +00:00
Mike Blumenkrantz
d649368009 zink: break out feedback loop pipeline state flagging for reuse
no functional changes

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22423>
2023-04-12 15:43:01 +00:00
Mike Blumenkrantz
aec938b1f8 zink: remove redundant 'blitting' check in zink_prep_fb_attachment()
this is a return conditional 2 lines above

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22423>
2023-04-12 15:43:01 +00:00
Samuel Pitoiset
4f3ddf31e0 radv: fix pipeline creation feedback with imported graphics libs
Stages imported from graphics pipeline libraries are defined as
additional entries in the order they were imported. This is similar
to raytracing libraries.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22288>
2023-04-12 15:03:42 +00:00
Erik Faye-Lund
d689a72bc5 zink: do not use sampled-image for buffers
In SPIR-V 1.6, sampled images with buffer dimensionality was disallowed.

The sampler that GLSL provides for buffer-textures is useless, and can
simply be ignored. So let's not treat them as samplers any more.

Fixes: bd816084c6 ("zink: enable spir-v 1.6 for vulkan 1.3")
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8808
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22407>
2023-04-12 12:47:13 +00:00
Samuel Pitoiset
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/21811>
2023-04-12 11:18:45 +00:00
José Roberto de Souza
02de31f6bb loader: Add Xe KMD support
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22425>
2023-04-12 10:41:21 +00:00
José Roberto de Souza
156464b67e iris: Handle Xe syncronization with syncobjs
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22425>
2023-04-12 10:41:21 +00:00
José Roberto de Souza
910e659e31 iris: Add function to close gem bos
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22425>
2023-04-12 10:41:21 +00:00
José Roberto de Souza
b1299f42ff anv: Fix vm bind of imported buffers
Imported buffers may be created in a device with different
memory alignment and this can cause vm bind to fail because bo
size can be smaller than the calculated vm bind range using the
importer device memory alignment.

So here adding actual_size to anv_bo, this will be set with the actual
size of the bo allocated by kmd for bos allocate in the current device.
For other bo the lseek or the Vulkan API size will be used.

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/22219>
2023-04-12 10:05:32 +00:00
Rob Clark
87978c3933 freedreno/a6xx: Allow z24s8 format casts
Allow UBWC format casts between z24s8/x24s8/z24x8.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8816
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22427>
2023-04-12 09:26:22 +00:00
Dmitry Baryshkov
fc5dd4035a freedreno/a5xx: add SP clock control register
Add GPMU_GPMU_SP_CLOCK_CONTROL register. Duplicated GPGMU is not a typo,
vendor kernel names it A5XX_GPMU_GPMU_SP_CLOCK_CONTROL.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22429>
2023-04-12 08:48:27 +00:00
Dmitry Baryshkov
05c22bdea1 freedreno/a5xx: reorder GPMU registers
Severeal GPMU registers were places out of the order. Move them to be
ordered proprely.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22429>
2023-04-12 08:48:27 +00:00
Collabora's Gfx CI Team
be5db62f88 Uprev Piglit to 355ad6bcb2cb3d9e030b7c6eef2b076b0dfb4d63
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22325>
2023-04-12 08:04:55 +00:00
Samuel Pitoiset
8f76a6a26e radv/ci: remove one RT test from the expected failures on RDNA3
It does pass.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22413>
2023-04-12 07:33:31 +00:00
Jesse Natalie
117ace3b14 dzn: Handle mismatches in bound descriptor set vs pipeline layout
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22420>
2023-04-12 04:14:46 +00:00
Kenneth Graunke
a4e13063ed iris: Hack around gbm_gralloc stride restrictions
gbm_bo_map returns a stride for the mapping, which may differ from the
stride of the underlying BO.  Drivers may implement mappings via staging
blits, returning a map of a temporary resource instead.  That temporary
may have fewer stride restrictions (i.e. it isn't used for display), and
thus be more tightly packed, saving memory.

However, gbm_gralloc has a design flaw where after calling gbm_bo_map,
it asserts that the stride exactly matches the original BO's stride:

   assert(stride == gbm_bo_get_stride(bo));

This is a bad assumption, as the GBM API returns a stride explicitly
precisely because it -can- differ.  But, this would require significant
changes to gbm_gralloc to fix.  So, to work around it, we add a driver
hack for Android-only that forces staging maps of any external BO to use
the original resource's stride.

This should fix issues with mapping cursor planes and SW media codec
uploads on Android-x86.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7974
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22156>
2023-04-11 23:45:04 +00:00
Kenneth Graunke
1452b60f35 iris: Extend resource creation helpers to allow for explicit strides
We'll want to create temporary staging images with explicit strides
in the next commit.  This extends iris_resource_create_with_modifiers
to have an explicit row_pitch_B parameter (0 continues to mean "let
ISL pick one").

Because resource_create_with_modifiers() is a driver hook, we can't
just add a parameter, so unfortunately we gain another wrapper layer.

Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22156>
2023-04-11 23:45:04 +00:00
Mike Blumenkrantz
59bb2f1aac zink: fix GPL lib leaking
this was improperly added into the conditional for removing a prog from the
ctx hash when it had no relation to that code, leading to refcount
leaks that ended up leaking the whole thing

Fixes: 487ac6dbd6 ("zink: implement cross-program pipeline library sharing")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22397>
2023-04-11 22:22:12 +00:00
Mike Blumenkrantz
a81a101159 zink: free GPL input/output libs on context destroy to avoid leaking
cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22397>
2023-04-11 22:22:11 +00:00
Jesse Natalie
187efd4e97 d3d12: Fix buffer reference leak for SO count staging buffer
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22417>
2023-04-11 22:08:11 +00:00
Karol Herbst
3b958f65ca rusticl: enable radeonsi
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19232>
2023-04-11 20:44:36 +00:00
Karol Herbst
c9ab7d7525 radeonsi: use default float mode for CL
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19232>
2023-04-11 20:44:36 +00:00
Karol Herbst
e5ef95e31f radeonsi: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19232>
2023-04-11 20:44:36 +00:00
Mike Blumenkrantz
0c730f98c5 zink: unroll array loop when copying vars for passthrough shaders
wildcard derefs aren't supported in ntv

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22376>
2023-04-11 20:26:22 +00:00
Sil Vilerino
26f767d524 d3d12: Video processor to only promote resources to permanent residency when there is work to be flushed
This fixes some cases where flush is called from the app without work being scheduled before, causing d3d12_promote_to_permanent_residency
to be called with garbage pointers/arguments.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22415>
2023-04-11 20:09:19 +00:00
Danylo Piliaiev
17df75d47d vulkan: Sanitize pSampleMask in CmdSetSampleMaskEXT
ms.sample_mask is only 16b, while VkSampleMask is 32b and it is allowed
to have all of them set even if maximum 16 samples are supported.

E.g. happens with Zink running supertuxkart:
 supertuxkart: ../../../source/mesa/src/vulkan/runtime/vk_graphics_state.c:2346: vk_common_CmdSetSampleMaskEXT: Assertion `(dyn)->ms.sample_mask == (*pSampleMask)' failed.

  vk_common_CmdSetSampleMaskEXT (commandBuffer=0x5556e903f0, samples=VK_SAMPLE_COUNT_1_BIT, pSampleMask=0x5556819ccc) at vk_graphics_state.c:2346
  zink_draw<(zink_multidraw)1, (zink_dynamic_state)5, true, false> (...) at zink_draw.cpp:639
  zink_draw_vbo<(zink_multidraw)1, (zink_dynamic_state)5, true> (...) at zink_draw.cpp:922

Signed-off-by: Danylo Piliaiev <dpiliaiev@igalia.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22360>
2023-04-11 19:20:50 +00:00
Mike Blumenkrantz
89aa363593 zink: block oom flushes during unordered blits
this is broken beyond space and time

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22412>
2023-04-11 18:59:13 +00:00
Timur Kristóf
b51e858d68 radv/amdgpu: Place secondary CS without IB2 in non-WC GTT.
When using a secondary CS without IB2, we have to memcpy the
contents into the primary CS. Use these flags to improve perf
by preventing memcpy from VRAM.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
2023-04-11 17:05:03 +00:00
Timur Kristóf
7c5bf91350 radv/amdgpu: Extract radv_amdgpu_cs_bo_create function.
Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
2023-04-11 17:05:03 +00:00
Timur Kristóf
0c1d4130ca radv/amdgpu: Add bool is_secondary argument to cs_create function.
Also save is_secondary to the CS object.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22354>
2023-04-11 17:05:03 +00:00