We were allocating these, but never freeing the actual CSOs here.
Let's wire things up so we delete the data when we destroy the
hash-table. Because we don't have access to the context in that
callback, we can't call the pipe-level function to delete a CSO,
but luckily we don't actually need the context for the
driver-logic. So let's add an internal helper for that.
Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Fixes: f39194cdd3 ("panfrost: support MTK 16L32S detiling")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35336>
We were inserting twice here, once without holding the lock before
compiling the shaders, and once after while holding it. Let's remove
the insert without the lock.
Fixes: ae3fb3089f ("panfrost: Add infrastructure for internal AFBC compute shaders")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35336>
This change and the prior preparations have fixed the false assumption
of ordered image planes for external multi-planar image (YV12 has the
chroma planes swapped to map to the Vulkan format). We no longer need to
use plane data size to advance plane offset. The code paths for
subresource reporting, memroy reporting and memory binding are now
consistent across native disjoint/non-disjoint and imported external
images no matter single-planar or multi-planar.
Test:
- No regressions in dEQP-VK.ycbcr.*
- NV12 camera preview works on Android
- YV12 video playback works on Android
- Android graphics cts passing
- BasicVulkanGpuTest
- MediaVulkanGpuTest
- CameraVulkanGpuTest
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
This change:
1. Rename pan_image_wsi_layout to pan_image_layout_constraints.
1. Document that pan_image_layout_constraints::offset_B will be used to
pass planar plane offset for native images as well. Update
array_stride_B to exclude such offset accordingly.
2. Document that whether explicit layout is used further depends on if
the passed wsi_row_pitch_B is non-zero or not. Updated the checks to
base on the new boolean use_explicit_layout.
3. Update and document the intended slice offset_B behavior so that
native and imported images are aligned.
No behavior change from this commit since the client (panvk) hasn't set
the pan_image_layout_constraints->offset_B for planar plane yet.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
This change splits pan_image_layout_get_wsi_layout into separate queries
to prepare for making pan_image_wsi_layout an input layout constraint.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
This doesn't affect gallium side behavior since data_size_B is never
looked at for imported planar plane. For panvk, it doesn't affect
imported single planar image, and multi-planar side is still broken.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
Putting compiler optimization aside, this at least improves readability
by making it clean which vars are mutable and which are immutable.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35299>
Because the ASTC HDR formats are extension formats, we need to convert
it manually in vk_format_to_pipe_format() instead of using the table.
Otherwise, the compiler tries to create a gigantic array and ends up
dying.
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34828>
Time drift can occur during LAVA job execution due to transitions
between three different clocks.
The process begins in the GitLab job [1], using the CI_JOB_STARTED_AT
variable. If SSH is enabled, we then connect to the DUT through an
Alpine-based SSH client container inside the LAVA dispatcher [2], where
some GitLab-related steps are timestamped by lava_job_submitter.
Finally, the DUT [3] runs and uses the setup-test-env.sh helper to
handle GitLab sections, potentially using a third distinct clock.
Signed-off-by: Guilherme Gallo <guilherme.gallo@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35222>
Added a helper function MFAttachPipeResourceAsSampleExtension that converts pipe_resource into D3D12 resource, attached as IMFMediaBuffer to IMFSample.
Conditionally applied MFAttachPipeResourceAsSampleExtension to:
MFSampleExtension_FramePsnrYuv
MFSampleExtension_VideoEncodeQPMap
MFSampleExtension_VideoEncodeBitsUsedMap
Reviewed-by: Yubo Xie <yuboxie@microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35264>
autogenerate a disassembler from the XML. also add a simple pure Python
reference disassembler, since autogenerated C code can be annoying to work with
in various contexts (we might drop this down the line, TBD if it's useful to
port over the current non-Mesa consumers of dougallj/applegpu). both
disassemblers produce identical output, unit tested via Meson.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
for our disassembler and later more stuff. should cover everything mesa uses,
not 100% complete to what applegpu has but mostly there.
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35189>
The android-runner scripts use `set -u`, which causes them to fail if
ANGLE_TAG is not defined. This issue went unnoticed because all current
Android jobs set ANGLE_TAG.
Update all -runner scripts to tolerate ANGLE_TAG being unset.
Signed-off-by: Valentine Burley <valentine.burley@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35362>
This code sets PANFROST_JD_REQ_CYCLE_COUNT when using LD_GCLK to enable
shader_clock
Fixes: c1ce2dcc ("pan/bi: Enable ARB_shader_clock extension support")
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Signed-off-by: Ashley Smith <ashley.smith@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35363>
Make AFBC work for NV12 and similar YUV formats that we already
supported.
Signed-off-by: Eric R. Smith <eric.smith@collabora.com>
Reviewed-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Mary Guillemard <mary.guillemard@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35015>