Browse Source

fix it goddamn

eds-true-adreno-fixes-pre-0.1.0
CamilleLaVey 1 month ago
committed by Caio Oliveira
parent
commit
7e846ed444
No known key found for this signature in database GPG Key ID: AAAE6C7FD4186B0C
  1. 8
      src/video_core/vulkan_common/vulkan_device.cpp
  2. 4
      src/video_core/vulkan_common/vulkan_device.h

8
src/video_core/vulkan_common/vulkan_device.cpp

@ -1188,9 +1188,13 @@ bool Device::GetSuitability(bool requires_swapchain) {
SetNext(next, properties.float_controls);
}
if (extensions.shader_float_controls2) {
#ifdef VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_2_KHR
properties.float_controls2.sType =
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_2_KHR;
SetNext(next, properties.float_controls2);
#else
LOG_INFO(Render_Vulkan, "VK_KHR_shader_float_controls2 available but Vulkan headers lack VkPhysicalDeviceFloatControlsProperties2KHR; skipping properties2 chaining");
#endif
}
if (extensions.push_descriptor) {
properties.push_descriptor.sType =
@ -1224,11 +1228,15 @@ bool Device::GetSuitability(bool requires_swapchain) {
// If VK_KHR_shader_float_controls2 is available, copy its inner properties for
// backwards compatibility with code that expects VkPhysicalDeviceFloatControlsProperties.
if (extensions.shader_float_controls2) {
#ifdef VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_2_KHR
properties.float_controls = properties.float_controls2.floatControls;
LOG_INFO(Render_Vulkan,
"VK_KHR_shader_float_controls2 supported: denormBehaviorIndependence={}, roundingModeIndependence={}",
properties.float_controls.denormBehaviorIndependence,
properties.float_controls.roundingModeIndependence);
#else
LOG_INFO(Render_Vulkan, "VK_KHR_shader_float_controls2 present but float_controls2 struct not available in headers; cannot copy floatControls");
#endif
}
// Store base properties

4
src/video_core/vulkan_common/vulkan_device.h

@ -345,10 +345,12 @@ public:
return properties.float_controls;
}
#ifdef VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_2_KHR
/// Returns float control properties (KHR v2) of the device.
const VkPhysicalDeviceFloatControlsProperties2KHR& FloatControlProperties2() const {
return properties.float_controls2;
}
#endif
/// Returns true if ASTC is natively supported.
@ -1055,7 +1057,9 @@ private:
VkPhysicalDeviceDriverProperties driver{};
VkPhysicalDeviceSubgroupProperties subgroup_properties{};
VkPhysicalDeviceFloatControlsProperties float_controls{};
#ifdef VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_FLOAT_CONTROLS_PROPERTIES_2_KHR
VkPhysicalDeviceFloatControlsProperties2KHR float_controls2{};
#endif
VkPhysicalDevicePushDescriptorPropertiesKHR push_descriptor{};
VkPhysicalDeviceSubgroupSizeControlProperties subgroup_size_control{};
VkPhysicalDeviceTransformFeedbackPropertiesEXT transform_feedback{};

Loading…
Cancel
Save