diff --git a/docs/features.txt b/docs/features.txt index e5b5ddc61c8..449828093e9 100644 --- a/docs/features.txt +++ b/docs/features.txt @@ -473,7 +473,7 @@ Vulkan 1.2 -- all DONE: anv, hk, nvk, panvk/v10+, tu, vn VK_KHR_separate_depth_stencil_layouts DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_atomic_int64 DONE (anv, lvp, nvk, panvk/v10+, radv, vn, tu/a740+) VK_KHR_shader_float16_int8 DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, vn) - VK_KHR_shader_float_controls DONE (anv, dzn, hasvk, lvp, nvk, panvk, radv, tu, v3dv, vn) + VK_KHR_shader_float_controls DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) VK_KHR_shader_subgroup_extended_types DONE (anv, hasvk, lvp, nvk, panvk/v10+, radv, tu, vn) VK_KHR_spirv_1_4 DONE (anv, dzn, hasvk, lvp, nvk, panvk/v10+, radv, tu, v3dv, vn) VK_KHR_timeline_semaphore DONE (anv, dzn, hasvk, lvp, nvk, panvk, pvr, radv, tu, v3dv, vn) diff --git a/src/imagination/common/device_info/bxs-4-64.h b/src/imagination/common/device_info/bxs-4-64.h index fb1267dc933..092cf3c6f5a 100644 --- a/src/imagination/common/device_info/bxs-4-64.h +++ b/src/imagination/common/device_info/bxs-4-64.h @@ -68,6 +68,7 @@ static const struct pvr_device_features pvr_device_features_36_V_104_796 = { .has_tpu_image_state_v2 = true, .has_tpu_parallel_instances = true, .has_unified_store_depth = true, + .has_usc_alu_roundingmode_rne = true, .has_usc_f16sop_u8 = true, .has_usc_itrsmp = true, .has_usc_itrsmp_enhanced = true, diff --git a/src/imagination/common/pvr_device_info.h b/src/imagination/common/pvr_device_info.h index 60e18166faa..d92fb0f6199 100644 --- a/src/imagination/common/pvr_device_info.h +++ b/src/imagination/common/pvr_device_info.h @@ -293,6 +293,7 @@ struct pvr_device_features { bool has_tpu_image_state_v2 : 1; bool has_tpu_parallel_instances : 1; bool has_unified_store_depth : 1; + bool has_usc_alu_roundingmode_rne : 1; bool has_usc_f16sop_u8 : 1; bool has_usc_itrsmp : 1; bool has_usc_itrsmp_enhanced : 1; diff --git a/src/imagination/vulkan/pvr_device.c b/src/imagination/vulkan/pvr_device.c index 8ce77a40861..3cf85e26ce7 100644 --- a/src/imagination/vulkan/pvr_device.c +++ b/src/imagination/vulkan/pvr_device.c @@ -194,6 +194,7 @@ static void pvr_physical_device_get_supported_extensions( .KHR_present_wait2 = PVR_USE_WSI_PLATFORM, .KHR_separate_depth_stencil_layouts = true, .KHR_shader_expect_assume = false, + .KHR_shader_float_controls = true, .KHR_swapchain = PVR_USE_WSI_PLATFORM, .KHR_swapchain_mutable_format = PVR_USE_WSI_PLATFORM, .KHR_timeline_semaphore = true, @@ -378,6 +379,9 @@ static bool pvr_physical_device_get_properties( UNUSED const uint32_t max_user_vertex_components = pvr_get_max_user_vertex_output_components(dev_info); + const bool usc_alu_roundingmode_rne = + PVR_HAS_FEATURE(dev_info, usc_alu_roundingmode_rne); + /* The workgroup invocations are limited by the case where we have a compute * barrier - each slot has a fixed number of invocations, the whole workgroup * may need to span multiple slots. As each slot will WAIT at the barrier @@ -587,6 +591,26 @@ static bool pvr_physical_device_get_properties( .provokingVertexModePerPipeline = true, .transformFeedbackPreservesTriangleFanProvokingVertex = false, + /* Vulkan 1.2 / VK_KHR_shader_float_controls */ + .denormBehaviorIndependence = + VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_32_BIT_ONLY, + .roundingModeIndependence = VK_SHADER_FLOAT_CONTROLS_INDEPENDENCE_NONE, + .shaderSignedZeroInfNanPreserveFloat16 = true, + .shaderSignedZeroInfNanPreserveFloat32 = true, + .shaderSignedZeroInfNanPreserveFloat64 = true, + .shaderDenormPreserveFloat16 = true, + .shaderDenormPreserveFloat32 = false, + .shaderDenormPreserveFloat64 = true, + .shaderDenormFlushToZeroFloat16 = false, + .shaderDenormFlushToZeroFloat32 = false, + .shaderDenormFlushToZeroFloat64 = false, + .shaderRoundingModeRTEFloat16 = usc_alu_roundingmode_rne, + .shaderRoundingModeRTEFloat32 = usc_alu_roundingmode_rne, + .shaderRoundingModeRTEFloat64 = usc_alu_roundingmode_rne, + .shaderRoundingModeRTZFloat16 = !usc_alu_roundingmode_rne, + .shaderRoundingModeRTZFloat32 = !usc_alu_roundingmode_rne, + .shaderRoundingModeRTZFloat64 = !usc_alu_roundingmode_rne, + /* Vulkan 1.2 / VK_KHR_timeline_semaphore */ .maxTimelineSemaphoreValueDifference = UINT64_MAX,