pvr, pco: implement VK_EXT_depth_clamp_zero_one

Signed-off-by: Simon Perretta <simon.perretta@imgtec.com>
Acked-by: Erik Faye-Lund <erik.faye-lund@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36412>
This commit is contained in:
Simon Perretta 2025-03-05 19:45:20 +00:00 committed by Marge Bot
parent 33620688a7
commit 92c5945060
3 changed files with 6 additions and 2 deletions

View file

@ -705,7 +705,7 @@ Khronos extensions that are not part of any Vulkan version:
VK_ARM_shader_core_properties DONE (panvk/v10+)
VK_EXT_mutable_descriptor_type DONE (anv, hk, lvp, nvk, panvk/v9+, radv, tu, vn)
VK_EXT_swapchain_colorspace DONE (anv, hk, lvp, nvk, radv, tu, v3dv, vn)
VK_EXT_depth_clamp_zero_one DONE (anv, nvk, panvk, radv, tu, v3dv/vc7+, vn)
VK_EXT_depth_clamp_zero_one DONE (anv, nvk, panvk, pvr, radv, tu, v3dv/vc7+, vn)
VK_INTEL_shader_integer_functions2 DONE (anv, hasvk, radv)
VK_EXT_map_memory_placed DONE (anv, hk, nvk, radv, tu)
VK_MESA_image_alignment_control DONE (anv, nvk, radv)

View file

@ -911,7 +911,7 @@ static nir_def *lower_pfo(nir_builder *b, nir_instr *instr, void *cb_data)
if (sem.location == FRAG_RESULT_DEPTH) {
assert(!state->depth_feedback_src);
state->depth_feedback_src = nir_mov(b, intr->src[0].ssa);
state->depth_feedback_src = nir_fsat(b, intr->src[0].ssa);
return NIR_LOWER_INSTR_PROGRESS_REPLACE;
}

View file

@ -190,6 +190,7 @@ static void pvr_physical_device_get_supported_extensions(
.KHR_timeline_semaphore = true,
.KHR_uniform_buffer_standard_layout = true,
.KHR_zero_initialize_workgroup_memory = false,
.EXT_depth_clamp_zero_one = true,
.EXT_external_memory_dma_buf = true,
.EXT_host_query_reset = true,
.EXT_image_2d_view_of_3d = true,
@ -264,6 +265,9 @@ static void pvr_physical_device_get_supported_features(
.variableMultisampleRate = false,
.inheritedQueries = false,
/* VK_EXT_depth_clamp_zero_one */
.depthClampZeroOne = true,
/* VK_KHR_index_type_uint8 */
.indexTypeUint8 = true,