mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-04-10 05:28:56 +02:00
[vulkan] Query custom border color properties based on device report
This commit is contained in:
parent
13959f453f
commit
e470715cc0
2 changed files with 28 additions and 0 deletions
|
|
@ -1062,6 +1062,20 @@ bool Device::GetSuitability(bool requires_swapchain) {
|
||||||
// Unload extensions if feature support is insufficient.
|
// Unload extensions if feature support is insufficient.
|
||||||
RemoveUnsuitableExtensions();
|
RemoveUnsuitableExtensions();
|
||||||
|
|
||||||
|
// Query VK_EXT_custom_border_color properties if the extension is enabled.
|
||||||
|
if (extensions.custom_border_color) {
|
||||||
|
const auto fp = reinterpret_cast<PFN_vkGetPhysicalDeviceCustomBorderColorPropertiesEXT>(
|
||||||
|
dld.vkGetInstanceProcAddr(instance, "vkGetPhysicalDeviceCustomBorderColorPropertiesEXT"));
|
||||||
|
if (fp != nullptr) {
|
||||||
|
custom_border_color_properties.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_CUSTOM_BORDER_COLOR_PROPERTIES_EXT;
|
||||||
|
custom_border_color_properties.pNext = nullptr;
|
||||||
|
fp(physical, &custom_border_color_properties);
|
||||||
|
has_custom_border_color_properties = true;
|
||||||
|
} else {
|
||||||
|
has_custom_border_color_properties = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Check limits.
|
// Check limits.
|
||||||
struct Limit {
|
struct Limit {
|
||||||
u32 minimum;
|
u32 minimum;
|
||||||
|
|
|
||||||
|
|
@ -601,6 +601,16 @@ public:
|
||||||
return features.custom_border_color.customBorderColorWithoutFormat;
|
return features.custom_border_color.customBorderColorWithoutFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns true if physical device custom border color properties were queried.
|
||||||
|
bool HasCustomBorderColorProperties() const {
|
||||||
|
return has_custom_border_color_properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// Returns the queried VkPhysicalDeviceCustomBorderColorPropertiesEXT.
|
||||||
|
const VkPhysicalDeviceCustomBorderColorPropertiesEXT& GetCustomBorderColorProperties() const {
|
||||||
|
return custom_border_color_properties;
|
||||||
|
}
|
||||||
|
|
||||||
/// Returns true if the device supports VK_EXT_extended_dynamic_state.
|
/// Returns true if the device supports VK_EXT_extended_dynamic_state.
|
||||||
bool IsExtExtendedDynamicStateSupported() const {
|
bool IsExtExtendedDynamicStateSupported() const {
|
||||||
return extensions.extended_dynamic_state;
|
return extensions.extended_dynamic_state;
|
||||||
|
|
@ -625,6 +635,10 @@ public:
|
||||||
return extensions.filter_cubic;
|
return extensions.filter_cubic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Custom border color properties retrieved from the physical device (if available).
|
||||||
|
VkPhysicalDeviceCustomBorderColorPropertiesEXT custom_border_color_properties{};
|
||||||
|
bool has_custom_border_color_properties = false;
|
||||||
|
|
||||||
/// Returns true if the device supports VK_QCOM_filter_cubic_weights.
|
/// Returns true if the device supports VK_QCOM_filter_cubic_weights.
|
||||||
bool IsQcomFilterCubicWeightsSupported() const {
|
bool IsQcomFilterCubicWeightsSupported() const {
|
||||||
return extensions.filter_cubic_weights;
|
return extensions.filter_cubic_weights;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue