From b442dc23fdf652b3d4e5925ae09e192833cb47eb Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Thu, 26 Feb 2026 15:20:14 +0100 Subject: [PATCH] panvk: advertise VK_EXT_nested_command_buffer on v10+ 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 Reviewed-by: Lars-Ivar Hesselberg Simonsen Part-of: --- docs/features.txt | 2 +- docs/relnotes/new_features.txt | 1 + src/panfrost/vulkan/panvk_vX_physical_device.c | 9 +++++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/features.txt b/docs/features.txt index ee9557a1fd7..bdfafe5418a 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -656,7 +656,7 @@ Khronos extensions that are not part of any Vulkan version: VK_EXT_mesh_shader DONE (anv/gfx12.5+, lvp, radv, vn) VK_EXT_multi_draw DONE (anv, hasvk, hk, lvp, nvk, radv, tu, vn, v3dv) VK_EXT_multisampled_render_to_single_sampled DONE (lvp, vn, panvk, tu) - VK_EXT_nested_command_buffer DONE (anv, lvp, nvk, radv, tu, vn) + VK_EXT_nested_command_buffer DONE (anv, lvp, nvk, panvk/v10+, radv, tu, vn) VK_EXT_non_seamless_cube_map DONE (anv, hasvk, hk, lvp, nvk, panvk, radv, tu, vn) VK_EXT_pageable_device_local_memory DONE (lvp) VK_EXT_pci_bus_info DONE (anv, hasvk, nvk, radv, vn) diff --git a/docs/relnotes/new_features.txt b/docs/relnotes/new_features.txt index 58fe9cba4c9..9c02b2dffee 100644 --- a/docs/relnotes/new_features.txt +++ b/docs/relnotes/new_features.txt @@ -29,3 +29,4 @@ cl_khr_subgroup_extended_types on asahi, iris, llvmpipe, radeonsi and zink cl_khr_subgroup_non_uniform_arithmetic on asahi, llvmpipe, radeonsi and zink cl_khr_subgroup_non_uniform_vote on asahi, iris, llvmpipe, radeonsi and zink cl_khr_subgroup_rotate on asahi, llvmpipe and zink +VK_EXT_nested_command_buffer on panvk diff --git a/src/panfrost/vulkan/panvk_vX_physical_device.c b/src/panfrost/vulkan/panvk_vX_physical_device.c index c06944a05a8..ff48257d3b9 100644 --- a/src/panfrost/vulkan/panvk_vX_physical_device.c +++ b/src/panfrost/vulkan/panvk_vX_physical_device.c @@ -164,6 +164,7 @@ panvk_per_arch(get_physical_device_extensions)( .EXT_legacy_dithering = true, .EXT_line_rasterization = true, .EXT_load_store_op_none = true, + .EXT_nested_command_buffer = PAN_ARCH >= 10, .EXT_non_seamless_cube_map = true, .EXT_mutable_descriptor_type = PAN_ARCH >= 9, .EXT_multisampled_render_to_single_sampled = true, @@ -558,6 +559,11 @@ panvk_per_arch(get_physical_device_features)( /* VK_EXT_legacy_dithering */ .legacyDithering = true, + /* VK_EXT_nested_command_buffer */ + .nestedCommandBuffer = PAN_ARCH >= 10, + .nestedCommandBufferRendering = PAN_ARCH >= 10, + .nestedCommandBufferSimultaneousUse = PAN_ARCH >= 10, + /* VK_EXT_non_seamless_cube_map */ .nonSeamlessCubeMap = true, @@ -1106,6 +1112,9 @@ panvk_per_arch(get_physical_device_properties)( .graphicsPipelineLibraryFastLinking = true, .graphicsPipelineLibraryIndependentInterpolationDecoration = true, + /* VK_EXT_nested_command_buffer */ + .maxCommandBufferNestingLevel = 5, + /* VK_EXT_provoking_vertex */ .provokingVertexModePerPipeline = false, .transformFeedbackPreservesTriangleFanProvokingVertex = false,