Trivial promotion alias of VK_EXT_mutable_descriptor_type which is
already supported on v9+.
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com>
Reviewed-by: Christoph Pillmayer <christoph.pillmayer@arm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40254>
Add checks for integer coordinates and array indexing HW features
Features require HW support and the PCO_DEBUG env var to contain the
adv_smp entry
Integer coordinates are supported for images and textures without an LOD
setting
Array indexing is not supported and will trigger an abort
Reviewed-by: Simon Perretta <simon.perretta@imgtec.com>
Signed-off-by: Radu Costas <radu.costas@imgtec.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40139>
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>
In some cases CL has higher precision requirements for format support.
Add a PIPE_BIND_x flag so that drivers can expose formats in GL(ES) that
they cannot expose in CL.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40028>
The original MR switched to use a float raw_timestamp_period to scale
the raw timestamp outside of the gallium driver. This better matched
how vulkan works.
But unlike vulkan, gallium has timestamp related queries/APIs that
return already scaled time, resulting in small errors if the way the
scaling is done differs between driver scaling and frontend scaling.
The important thing is that any error introduced by scaling must be
the same error across APIs.
(In particular, a f64 value cannot preciesly represent an arbitrary
u64 value. OTOH the driver's scaling could be simply multiply be an
integer. But differing precision errors of the two approachs causes
problems when comparing between timestamps that are converted in
different ways.)
In some, but not all, cases this could be addressed by changing the
driver to use the same scaling function, but this is not always possible
(if, for ex, the scaling is done on the GPU CP). So switch back to
the original approach from !39995, using a pscreen->convert_timestamp()
callback, to put the control back in the hands of the driver.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40051>
Add support for the use of vertex input registers as additional general
purpose registers which previously was restricted to temporary
registers. Use of vertex input registers as additional general purpose
registers is not available for fragment shaders.
Vertex input registers are similar to temporary registers. The only
difference is that vertex input registers can contain pre-initialised
data when the shader starts.
By default, the number of vertex input registers used for register
allocation is the number of vertex input registers used for their
pre-initialised data rounded up to the nearest multiple of 4, as vertex
input registers are allocated in blocks of 4.
If PCO_DEBUG=alloc_extra_vtxins is used, a mimimum of 12 vertex input
registers are available for register allocation.
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/39886>
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>
This is intended to enable rusticl to use get_query_result_resource()
for timestamp queries, for hw which cannot convert ticks to us on the
GPU (or for which doing the conversion on the GPU is expensive). In
this case, the query result buffer is not exposed to the app, so we
can still do the necessary conversion on the CPU.
Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39995>
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>
Those old driver TODOs don't have anything useful. We don't want piglit
coverage just for the sake of piglit, but want increased coverage. And
better instructions on writing and submitting code are fully
documented elsewhere.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39741>