Signed-off-by: Samuel Iglesias Gonsálvez <sigles...@igalia.com> --- src/intel/vulkan/anv_device.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+)
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 67ea86c4b66..1b57e7b56f5 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -1245,6 +1245,37 @@ void anv_GetPhysicalDeviceProperties2( properties->quadOperationsInAllStages = VK_TRUE; break; } + case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_KHR : { + VkPhysicalDeviceFloatControlsPropertiesKHR *properties = (void *)ext; + properties->separateDenormSettings = true; + properties->separateRoundingModeSettings = false; + + /* Broadwell does not support HF denorms and there are restrictions + * other gens. According to Kabylake's PRM: + * + * "math - Extended Math Function + * [...] + * Restriction : Half-float denorms are always retained." + */ + properties->shaderDenormFlushToZeroFloat16 = false; + properties->shaderDenormPreserveFloat16 = pdevice->info.gen > 8; + properties->shaderRoundingModeRTEFloat16 = true; + properties->shaderRoundingModeRTZFloat16 = true; + properties->shaderSignedZeroInfNanPreserveFloat16 = true; + + properties->shaderDenormFlushToZeroFloat32 = true; + properties->shaderDenormPreserveFloat32 = true; + properties->shaderRoundingModeRTEFloat32 = true; + properties->shaderRoundingModeRTZFloat32 = true; + properties->shaderSignedZeroInfNanPreserveFloat32 = true; + + properties->shaderDenormFlushToZeroFloat64 = true; + properties->shaderDenormPreserveFloat64 = true; + properties->shaderRoundingModeRTEFloat64 = true; + properties->shaderRoundingModeRTZFloat64 = true; + properties->shaderSignedZeroInfNanPreserveFloat64 = true; + break; + } case VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_VERTEX_ATTRIBUTE_DIVISOR_PROPERTIES_EXT: { VkPhysicalDeviceVertexAttributeDivisorPropertiesEXT *props = -- 2.19.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev