Yiwei Zhang [Sat, 14 Oct 2023 22:41:59 +0000 (15:41 -0700)]
zink: sync queue access for vkQueueWaitIdle
Ensure VkQueue external sync between flush_queue and TC.
Cc: mesa-stable
Signed-off-by: Yiwei Zhang <zzyiwei@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25733>
Karol Herbst [Sat, 14 Oct 2023 22:10:06 +0000 (00:10 +0200)]
zink: implement PIPE_COMPUTE_CAP_MAX_COMPUTE_UNITS
We have to return at least 1.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25731>
Rob Clark [Tue, 3 Oct 2023 21:33:32 +0000 (14:33 -0700)]
radeonsi: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Rob Clark [Tue, 3 Oct 2023 20:34:09 +0000 (13:34 -0700)]
iris: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Rob Clark [Tue, 3 Oct 2023 17:08:52 +0000 (10:08 -0700)]
panfrost: Add PIPE_CAP_HAS_CONST_BW support
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Rob Clark [Thu, 28 Sep 2023 20:22:55 +0000 (13:22 -0700)]
freedreno: Add PIPE_CAP_HAS_CONST_BW support
Allow for tiled layouts rather than having mesa/st force us back to
linear.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Rob Clark [Thu, 28 Sep 2023 20:21:22 +0000 (13:21 -0700)]
mesa: Implement MESA_texture_const_bandwidth
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/9891
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Rob Clark [Thu, 28 Sep 2023 17:48:17 +0000 (10:48 -0700)]
mesa: Introduce MESA_texture_const_bandwidth
A simple extension that builds on EXT_memory_object to allow the
application to request that constant bandwidth (non-data-dependent)
tiling layouts be used for a specified texture.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25464>
Kai Wasserbäch [Fri, 13 Oct 2023 12:04:37 +0000 (14:04 +0200)]
fix: clover: warning: ignoring return value of ‘int posix_memalign(…)’ [-Wunused-result]
During builds GCC 13.2 issues the following warning:
src/gallium/frontends/clover/api/memory.cpp:612:21: warning: ignoring return value of ‘int posix_memalign(void**, size_t, size_t)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
612 | posix_memalign(&ptr, alignment, size);
| ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
Fix this by checking the returned value is actually 0 and if not we now
report a nullptr.
Signed-off-by: Kai Wasserbäch <kai@dev.carbon-project.org>
Reviewed-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25724>
Karol Herbst [Sat, 14 Oct 2023 15:27:30 +0000 (17:27 +0200)]
rusticl/memory: use get_mut instead of lock in drop
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25727>
David Heidelberg [Thu, 15 Dec 2022 23:22:46 +0000 (00:22 +0100)]
ci: ci_marge_queue.py
Show currently assigned jobs to Marge and return 0 when it's free.
Useful for combination with ci_run_n_monitor.py .
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20347>
Karol Herbst [Wed, 4 Oct 2023 23:24:28 +0000 (01:24 +0200)]
rusticl/kernel: get rid of Arcs in KernelDevStateVariant
We only used Arcs as we wanted to deal with either getting a reference or
having an owned temporary. But we can also just use a local variable for
temporary storage.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Fri, 6 Oct 2023 11:04:24 +0000 (13:04 +0200)]
rusticl/queue: make it Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Thu, 5 Oct 2023 23:25:14 +0000 (01:25 +0200)]
rusticl/queue: get rid of pointless Option around our worker thread handle
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Thu, 5 Oct 2023 21:48:37 +0000 (23:48 +0200)]
rusticl/cl: mark _cl_image_desc as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Thu, 5 Oct 2023 18:06:31 +0000 (20:06 +0200)]
rusticl/mesa: mark PipeTransfer as Send
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Thu, 5 Oct 2023 10:54:51 +0000 (12:54 +0200)]
rusticl/mesa: mark PipeResource as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Wed, 4 Oct 2023 17:29:35 +0000 (19:29 +0200)]
rusticl/mesa/nir: Mark NirShader and NirPrintfInfo as Send and Sync
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Wed, 4 Oct 2023 17:27:07 +0000 (19:27 +0200)]
rusticl/mesa/nir: mark more methods as mut
Those actually change the nir and are not thread-safe anyway.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Karol Herbst [Mon, 2 Oct 2023 21:27:59 +0000 (23:27 +0200)]
rusticl: bump rustc version to 1.66
This adds a few goodies I care about:
- bool::then_some (1.62)
- let-else statements (1.65)
FireFox ESR is at 1.66 so this bump is according to the Rust updated
policy.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: @LingMan <18294-LingMan@users.noreply.gitlab.freedesktop.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24062>
Faith Ekstrand [Sat, 14 Oct 2023 00:30:39 +0000 (19:30 -0500)]
nvk: Always set pixel_min/max_Z to CLAMP
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25723>
Chia-I Wu [Thu, 28 Sep 2023 17:38:01 +0000 (10:38 -0700)]
anv: add support for vk_require_astc driconf
When vk_require_astc is true and there is no native ASTC LDR support,
enable ASTC LDR emulation.
vk_require_astc defaults to true on Android 14+.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 17:37:11 +0000 (10:37 -0700)]
anv: advertise emulated formats
Advertise required features for emulated formats.
v2: no sparse residency support
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 18:20:31 +0000 (11:20 -0700)]
anv: fix up blit src for emulated formats
When the blit src has an emulated format, redirect to the hidden plane.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 17:29:52 +0000 (10:29 -0700)]
anv: fix up image views for emulated formats
When the view format is the same as the image format, and the format is
emulated, change the format to the decompressed format.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 16:40:36 +0000 (09:40 -0700)]
anv: decompress on upload for emulated formats
Add anv_astc_emu_decompress to decompress the raw texel data to the
hidden plane. Call anv_astc_emu_decompress from anv_CmdCopyImage2 and
anv_CmdCopyBufferToImage2.
v2: support transfer queue and add missing flushes (Lionel)
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 16:36:31 +0000 (09:36 -0700)]
anv: add a hidden plane for emulated formats
When an image is created with an emulated format, add a hidden plane to
the image. The hidden plane will be used for decompressed data.
v2: assert no sparse residency
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Thu, 28 Sep 2023 16:28:21 +0000 (09:28 -0700)]
anv: add anv_is_format_emulated
anv_is_format_emulated returns true when a format is emulated. It will
be used for ASTC LDR emulation, but it always return false at the
moment.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Wed, 27 Sep 2023 23:52:45 +0000 (16:52 -0700)]
anv: add anv_cmd_buffer_{save,restore}_state
They can be used to save/restore a subset of the current compute state.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 9 Oct 2023 22:23:07 +0000 (15:23 -0700)]
anv: add anv_descriptor_set_write
Add anv_descriptor_set_write as a helper for both
anv_UpdateDescriptorSets and anv_CmdPushDescriptorSetKHR.
v2: rename push_set to the more generic set_override
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> (v1)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 9 Oct 2023 23:43:36 +0000 (16:43 -0700)]
anv: support alternative push descriptor sets
Do not assume anv_cmd_pipeline_state::push_descriptor is the currently
bound push descriptor set. With this and anv_push_descriptor_set_init,
it is possible to initialize a temporary push descriptor set on stack
for internal use.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 9 Oct 2023 22:30:23 +0000 (15:30 -0700)]
anv: add anv_push_descriptor_set_{init,finish}
Refactor anv_cmd_buffer_alloc_push_descriptor_set and add
anv_push_descriptor_set_{init,finish}. Note that
anv_push_descriptor_set_init still supports re-initialization.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 9 Oct 2023 21:16:19 +0000 (14:16 -0700)]
anv: support image views with surface state stream
Add optional anv_state_stream to anv_image_view_init. This is useful
for internal image views whose lifetimes are tied to the lifetime of a
command buffer.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 9 Oct 2023 20:34:51 +0000 (13:34 -0700)]
anv: add anv_image_view_{init,finish}
This is a minor refactor.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 25 Sep 2023 23:49:18 +0000 (16:49 -0700)]
anv: remove unused field from anv_image_view
image_plane is unused.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Chia-I Wu [Mon, 25 Sep 2023 16:54:11 +0000 (09:54 -0700)]
radv, drirc: rename radv_require_{etc2,astc}
Rename them to vk_require_{etc2,astc}.
Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25467>
Lionel Landwerlin [Fri, 13 Oct 2023 08:57:11 +0000 (11:57 +0300)]
anv: update batch chaining to Gfx9 commands
I don't know this fixes anything but I noticed the generated draws
jump into addresses slightly different from CPU generated jumps.
After checking the genxml, I noticed MI_BATCH_BUFFER_START "Batch
Buffer Start Address" fields have different sizes in Gfx8 & Gfx9+.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Ivan Briano <ivan.briano@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25705>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
pipe-loader: allow to load multiple zink devices
Rusticl needs to be able to create a zink_screen on all renderer nodes.
This adds the infrastructure of doing so.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Acked-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
rusticl: enable zink
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
rusticl/mesa/screen,device: add driver_name
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Mike Blumenkrantz [Wed, 27 Sep 2023 13:16:01 +0000 (09:16 -0400)]
zink: eliminate samplers from no-sampler CL texops
samplers aren't guaranteed to be provided by no-sampler ops in CL,
so flagging them as extant may read from a null sampler and explode
instead just pass the image through directly in the spirv
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Fri, 29 Sep 2023 08:53:53 +0000 (10:53 +0200)]
zink: fix load/store scratch offsets
The offset is originally in bytes, so we have to handle it just like
shared load/stores.
Fixes:
ddc5c304899 ("zink: handle global and scratch vars")
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: fix RA textures
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: implement remaining pack ops via bitcast
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: support samplers with unnormalized_coords
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Mike Blumenkrantz [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: add set_global_binding
This requires VK_KHR_buffer_device_address which is the only sane way of
implementing CL global memory.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: make spirv_builder_emit_*op compatible with spec constants
This way we can use those builder functions to emit spec constant
operations.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: support more nir opcodes
There are sadly no SPIRV variants for hadd or iadd_sat we can use, so
lower those.
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: variable shared mem support
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: refactor spec constant handling
This makes it simpler to add more spec constants
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: pass entire pipe_grid_info into zink_program_update_compute_pipeline_state
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: copy has_variable_shared_mem cs property
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Tue, 19 Sep 2023 12:44:26 +0000 (14:44 +0200)]
zink: implement get_compute_state_info
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Mike Blumenkrantz [Tue, 26 Sep 2023 19:38:29 +0000 (15:38 -0400)]
zink: always clamp shader stage in descriptor handling
otherwise KERNEL leaks through and explodes
cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24839>
Karol Herbst [Fri, 13 Oct 2023 20:25:24 +0000 (22:25 +0200)]
ci: add half-life 2 freedreno flake
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25722>
Alejandro Piñeiro [Wed, 4 Oct 2023 11:55:35 +0000 (13:55 +0200)]
doc/features: update after last v3d changes
V3D v71 supports new hw features, like 8 draw buffers.
As we are here, we also update some features that have been working
for some time now, even on v41.
Reviewed-by: Juan A. Suarez <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 21 Jun 2023 08:29:07 +0000 (10:29 +0200)]
v3dv: expose scalarBlockLayout on V3D 7.x
This version of V3D doesn't have the restriction that vector accesses
must not cross 16-byte boundaries.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 31 May 2023 08:38:59 +0000 (10:38 +0200)]
v3dv: expose depthClamp in V3D 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 31 May 2023 07:23:51 +0000 (09:23 +0200)]
v3dv: expose fullDrawIndexUint32 in V3D 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Juan A. Suarez Romero [Mon, 20 Mar 2023 15:48:51 +0000 (16:48 +0100)]
broadcom/simulator: add per-hw version calls
Add a wrapper to allow calling the right simulator function based on
the hardware under simulation.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Juan A. Suarez Romero [Wed, 22 Feb 2023 08:43:40 +0000 (09:43 +0100)]
broadcom: add performance counters for V3D 7.x
Some of the counters need to be defined correctly.
v2: Remove references to extended performance counters. The hw does
not support them.
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Thu, 9 Mar 2023 18:05:19 +0000 (19:05 +0100)]
v3d,v3dv: fix compute for V3D 7.1.6+
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 8 Feb 2023 08:04:02 +0000 (09:04 +0100)]
v3d,v3dv: fix depth bias for v3d 7.x
In v3d 7.x we don't need to scale up depth bias for D16 buffers.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 8 Feb 2023 07:41:12 +0000 (08:41 +0100)]
v3dv: fix color write mask for v3d 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Mon, 15 May 2023 22:38:40 +0000 (00:38 +0200)]
v3dv: use new texture shader state rb_swap and reverse fields in v3d 7.x
In v3d 4.x we handle formats that are reversed or R/B swapped by
applying a format swizzle. This doesn't work on border colors though,
and for that there is a specific bit to reverse the border color in
the texture shader state.
In v3d 7.x we have new reverse and swap R/B bits and we no longer have
a bit to reverse the border color because the new reverse bit applies
to border texels too. Because of this, we absolutely need to use these
new bits in order to get correct border colors in all cases with these
formats.
When we enable the reverse and/or swap R/B bits, we are effectively
applying the format swizzle through them, so in these cases we need to
make sure the swizzle we program in the texture shader state is the
view swizzle provided by the API and not the composition of the format
swizzle with the view swizzle like we do in 4.x for all formats. The
same applies to custom border colors: we must not apply the format
swizzle to them for formats that are reversed or R/B swapped, because
again, this format swizzle is already applied through these new bits.
While we are doing this, we also fully adopt the texture shader state
spec from v3d 7.1.5 for v3d 7.x instead of using a description from
7.1.2 which is incompatible and required the driver to manually pack
some of the bits.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Fri, 3 Dec 2021 12:20:22 +0000 (13:20 +0100)]
v3d,v3dv: propagate NaNs bits in shader state records are reserved in v7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 19 Nov 2021 09:51:37 +0000 (10:51 +0100)]
v3dv: implement depthBounds support for v71
Just for for v71, as that feature is not supported by older hw.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 16 Nov 2021 10:26:17 +0000 (11:26 +0100)]
v3d,v3dv: don't use max internal bpp for tile sizing in V3D 7.x
We can use the actual bpp of each color attachment to compute real
tile memory requirements, which may allow us to choose a larger tile
size configuration than in V3D 4.2 in certain scenarios.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Fri, 12 Nov 2021 09:35:59 +0000 (10:35 +0100)]
v3d,v3dv: support up to 8 render targets in v7.1+
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Mon, 15 May 2023 22:28:27 +0000 (00:28 +0200)]
v3d/v3dv: fix texture state array stride packing for V3D 7.1.5
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Wed, 27 Oct 2021 00:03:10 +0000 (02:03 +0200)]
v3d: add support for TFU blit in v71
TFU has changed on v71, specially on which registers to use, so that
means that support code change across versions. So as part of this
commit TFU copying is moved to a v3dx file.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 22 Oct 2021 12:26:29 +0000 (14:26 +0200)]
v3d: handle Z clipping in v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 22 Oct 2021 11:41:09 +0000 (13:41 +0200)]
v3d: don't convert floating point border colors in v71
The TMU does this for us now.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 22 Oct 2021 10:17:45 +0000 (12:17 +0200)]
v3d: GFX-1461 does not affect V3D 7.x
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 22 Oct 2021 09:40:49 +0000 (11:40 +0200)]
v3d: setup render pass color clears for any format bpp in v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 22 Oct 2021 08:54:24 +0000 (10:54 +0200)]
v3d: handle new TEXTURE_SHADER_STATE v71 YCbCr fields
There are some new fields for YCbCr with pointers for the various
planes in multi-planar formats. These need to match the base address
pointer in the texture state, or the hardware will assume this is a
multi-planar texture.
Notice we don't use an address type for these fields in the XML
description. This is because the addresses are 64-bit aligned (even
though the PRM doesn't say it) which means the 6 LSB bits are
implicitly 0, but the fields are encoded before the 6th bit of their
starting byte, so we can't use the usual trick we do with address
types where the first 6 bits in the byte are implicitly overwritten by
other fields and we have to encode this manually as a uint field. This
would mean that if we had an actual BO we would also need to add it
manually to the job's list, but since we don't have one, we don't have
to do anything about it.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 21:21:02 +0000 (23:21 +0200)]
v3d: handle new texture state transfer functions in v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 11:46:11 +0000 (13:46 +0200)]
v3d/uniforms: update VIEWPORT_X/Y_SCALE uniforms for v71
As the packet CLIPPER_XY scaling, this needs to be computed on 1/64ths
of pixel, instead of 1/256ths of pixels.
As this is the usual values that we get from macros, we add manually a
v42 and v71 macro, and define a new helper to get those.
Those granularity values are the same for Vulkan and OpenGL, so
perhaps we should move them to a common place.
As with v3dv, V3D_X macro name is somewhat confusing. It is
specifically created to ask for define values that depends on the
version. But I also felt that V3D_DEFINE_X was too long.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 11:37:46 +0000 (13:37 +0200)]
v3d: default vertex attributes values are not needed for v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 11:19:49 +0000 (13:19 +0200)]
v3d: no specific separate_segments flag for V3D 7.1
On V3D 7.1 there is not a flag on the Shader State Record to specify
if we are using shared or separate segments. This is done by setting
the vpm input size to 0 (so we need to ensure that the output would be
the max needed for input/output).
We were already doing the latter on the prog_data_vs, so we just need
to use those values, instead of assigning default values.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 11:14:32 +0000 (13:14 +0200)]
v3d: emit CLIPPER_XY_SCALING for v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Thu, 21 Oct 2021 11:09:03 +0000 (13:09 +0200)]
v3d: just don't fill up early-z fields for CFG_BITS for v71
v71 doesn't include early_z_enable/early_z_updates_enable. They are
configured with packet 121.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Wed, 20 Oct 2021 23:47:29 +0000 (01:47 +0200)]
v3d: emit CLEAR_RENDER_TARGETS for v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Wed, 20 Oct 2021 13:12:15 +0000 (15:12 +0200)]
v3d: TILE_RENDERING_MODE_CFG_RENDER_TARGET_PART1
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Wed, 20 Oct 2021 12:31:10 +0000 (14:31 +0200)]
v3d: emit TILE_BINNING_MODE_CFG and TILE_RENDERING_MODE_CFG_COMMON for v71
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Tue, 23 May 2023 21:32:37 +0000 (23:32 +0200)]
v3d: add v71 hw generation
Starting point for v71 version inclusion:
* Adds as one of the versions to be compiled on meson
* Updated the v3d_X and v3dX macros to include version 71
* Update the code enough to get it building when using v71.
Any real v71 support will be implemented on following commits.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 14 Feb 2023 09:09:53 +0000 (10:09 +0100)]
v3dv: fix depth clipping then Z scale is too small in V3D 7.x
When the Z scale is too small guardband clipping may not clip
correctly, so disable it, which is a new option in V3D 7.x.
This fixes this test in V3D 7.x without needing any workarounds:
dEQP-VK.draw.renderpass.inverted_depth_ranges.nodepthclamp_deltazero
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 20 Oct 2021 09:22:11 +0000 (11:22 +0200)]
v3dv: make v3dv_viewport_compute_xform depend on the V3D version
For 4.x we have a workaround for too small Z scale values that is not
required for V3D 7.x.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Wed, 17 Nov 2021 10:33:59 +0000 (11:33 +0100)]
v3dv: add support for TFU jobs in v71
This includes update the simulator.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Fri, 15 Oct 2021 11:06:31 +0000 (13:06 +0200)]
v3dv: handle Z clipping in v71
Fixes the following tests:
dEQP-VK.clipping.clip_volume.*
dEQP-VK.draw.inverted_depth_ranges.nodepthclamp_* (except deltazero)
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Thu, 7 Oct 2021 10:43:49 +0000 (12:43 +0200)]
v3dv: don't convert floating point border colors in v71
The TMU does this for us now.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Alejandro Piñeiro [Fri, 1 Oct 2021 13:18:38 +0000 (15:18 +0200)]
v3dv: no specific separate_segments flag for V3D 7.1
On V3D 7.1 there is not a flag on the Shader State Record to specify
if we are using shared or separate segments. This is done by setting
the vpm input size to 0 (so we need to ensure that the output would be
the max needed for input/output).
We were already doing the latter on the prog_data_vs, so we just need
to use those values, instead of assigning default values.
As we are here, we also add some comments on the compiler part.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 29 Sep 2021 07:07:28 +0000 (09:07 +0200)]
v3dv: handle RTs with no color targets in v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Wed, 29 Sep 2021 06:22:59 +0000 (08:22 +0200)]
v3dv: handle early Z/S clears for v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 28 Sep 2021 06:59:08 +0000 (08:59 +0200)]
broadcom/compiler: update thread end restrictions validation for v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 28 Sep 2021 06:31:04 +0000 (08:31 +0200)]
v3dv: GFX-1461 does not affect V3D 7.x
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 28 Sep 2021 06:23:48 +0000 (08:23 +0200)]
v3dv: handle render pass global clear for v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Tue, 28 Sep 2021 06:14:11 +0000 (08:14 +0200)]
v3dv: implement noop job for v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Sun, 24 Oct 2021 23:38:31 +0000 (01:38 +0200)]
v3dv: handle new texture state transfer functions in v71
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>
Iago Toral Quiroga [Sun, 24 Oct 2021 23:37:12 +0000 (01:37 +0200)]
v3dv: fix up texture shader state for v71
There are some new fields for YCbCr with pointers for the various
planes in multi-planar formats. These need to match the base address
pointer in the texture state, or the hardware will assume this is a
multi-planar texture.
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25450>