The CSF backend's cs_call() is a hardware call/return instruction that
nests naturally. The existing CmdExecuteCommands implementation already
performs caller-callee state merging without checking command buffer
level, so no functional changes are needed.
The hardware call stack has 8 levels. The kernel consumes one for the
ringbuffer CALL, and two are reserved for future internal driver use,
leaving maxCommandBufferNestingLevel at 5.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40120>
Expose the extension, feature bit, and properties for
VK_ARM_scheduling_controls on CSF architectures (>= v10).
The only supported scheduling control flag is
VK_PHYSICAL_DEVICE_SCHEDULING_CONTROLS_SHADER_CORE_COUNT_ARM, which
allows applications to limit the number of shader cores used by a
queue via VkDeviceQueueShaderCoreControlCreateInfoARM.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Reviewed-by: Lars-Ivar Hesselberg Simonsen <lars-ivar.simonsen@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40063>
This commit adds support for VK_KHR_maintenance4 extension by
implementing the required function.
Makes the following tests to pass/be supported:
dEQP-VK.api.info.get_physical_device_properties2.features.maintenance4_features
dEQP-VK.api.info.vulkan1p3_limits_validation.khr_maintenance4
dEQP-VK.api.device_init.create_device_unsupported_features.maintenance4_features
dEQP-VK.memory.requirements.create_info.buffer.regular
dEQP-VK.memory.requirements.create_info.image.regular_tiling_linear
dEQP-VK.memory.requirements.create_info.image.regular_tiling_optimal
dEQP-VK.memory.requirements.create_info.image.transient_tiling_linear
dEQP-VK.memory.requirements.create_info.image.transient_tiling_optimal
Signed-off-by: Leon Perianu <leon.perianu@imgtec.com>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39776>
Most of the work was already done for the Vulkan driver.
The main difference to handle is that OpenGL request to ignore sample
mask when the framebuffer is non-multisampled, while Vulkan applies it
always.
This also fixes KHR-GL31.frag_coord_conventions.multisample.
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40059>
Wire up the existing Panfrost dithering infrastructure to the Vulkan
extension. The library already supports dithered formats via
pan_dithered_format_from_pipe_format(), so this plumbs the
VK_RENDERING_ENABLE_LEGACY_DITHERING_BIT_EXT flag through to the blend
descriptor emission and color attachment internal conversion paths.
Dithering is only applied to color attachments, not depth or framebuffer
preloads.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39781>
The Mali GPUs have native support for user-defined depth clamp bounds
via the LOW_DEPTH_CLAMP/HIGH_DEPTH_CLAMP registers and the
depth_clamp_mode field. Wire up the existing runtime plumbing to these
registers so applications can specify a custom depth clamp range instead
of always clamping to the viewport's minDepth/maxDepth.
While at it, drop the redundant CLAMP on depth values in the CSF path.
Since VK_EXT_depth_range_unrestricted is not supported, panvk_depth_range()
is already guaranteed to produce values in the 0..1 range.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39925>
Pass the per-image-view minimum LOD clamp from the Vulkan runtime
(vk_image_view::min_lod) through pan_image_view into the Mali texture
descriptor's Minimum LOD field.
Mali v6+ hardware has per-texture-descriptor LOD clamp fields that
operate independently from the sampler's LOD clamps, so no shader
lowering or descriptor merging is needed.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39938>
The common Vulkan runtime already provides full support for this
extension (pipeline state parsing, dynamic command handler, dirty
tracking), and panvk already consumes color_write_enables in blend
descriptor emission and fs_required() determination. Just advertise
the extension and feature.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39913>
The Panfrost hardware already supports controlling ASTC decode
precision via the Decode Wide plane descriptor field. Wire up the
Vulkan extension by parsing VkImageViewASTCDecodeModeEXT from the
image view pNext chain and setting astc.narrow when the application
requests VK_FORMAT_R8G8B8A8_UNORM decode mode.
The extension is limited to v9+ since the ASTC plane descriptors
with Decode Wide/HDR fields only exist from Valhall onwards.
decodeModeSharedExponent is not supported.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39799>
Advertise the extension and enable the zeroInitializeDeviceMemory
feature. The panfrost and panthor kernel drivers uses drm_gem_shmem which
gets zeroed pages from the shmem subsystem, so memory is already
zero-initialized by default.
VK_IMAGE_LAYOUT_ZERO_INITIALIZED_EXT is treated the same as
VK_IMAGE_LAYOUT_UNDEFINED. Since panvk doesn't use image layouts
(layout transitions are no-ops), no special barrier handling is
needed for either layout.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39658>
This adds support for receiving additional statistics about PowerVR shaders for
the Rogue architecture.
vkGetPipelineExecutablePropertiesKHR and vkGetPipelineExecutableStatisticsKHR
are fully supported. vkGetPipelineExecutableInternalRepresentationsKHR does not
currently return any internal representations.
Tests used:
dEQP-VK.pipeline.monolithic.executable_properties.*
Signed-off-by: Duncan Brawley <duncan.brawley@imgtec.com>
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39607>
Advanced blend operations are lowered in the fragment shader using
nir_lower_blend, with the actual blending done via framebuffer fetch.
For monolithic pipelines, lowering happens at pipeline compilation.
For GPL, lowering happens at link time when blend state is known.
For shader objects, lowering happens at draw time with the result
cached until blend parameters, fragment shader, or color write state
changes.
The lvp_nir_lower_blend() helper handles the IO lowering sandwich
required by nir_lower_blend: lower derefs to IO intrinsics, run the
blend lowering, then convert back to derefs for llvmpipe.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39612>
Adds a trivial EXT_image_drm_format_modifier support that only handles
LINEAR modifier.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Acked-by: Luigi Santivetti <luigi.santivetti@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38991>
The implementation of this extension is part of the common Mesa WSI
code, and it's used by Zink without checking for the presence.
Advertise it for PowerVR open source driver.
With Headless WSI advertised, Tests in Vulkan CTS that is
incremental_present related can pass.
Signed-off-by: Icenowy Zheng <uwu@icenowy.me>
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39037>