vulkan: Remove VK_KHR_maintenance5 as it is no longer needed for buffer views.

This commit is contained in:
squidbus 2025-02-06 16:36:58 -08:00
parent 4f8a6ea81a
commit 10a528f3ec
3 changed files with 1 additions and 15 deletions

View File

@ -95,8 +95,7 @@ Buffer::Buffer(const Vulkan::Instance& instance_, Vulkan::Scheduler& scheduler_,
// Create buffer object.
const vk::BufferCreateInfo buffer_ci = {
.size = size_bytes,
// When maintenance5 is not supported, use all flags since we can't add flags to views.
.usage = instance->IsMaintenance5Supported() ? flags : AllFlags,
.usage = flags,
};
VmaAllocationInfo alloc_info{};
buffer.Create(buffer_ci, usage, &alloc_info);

View File

@ -268,7 +268,6 @@ bool Instance::CreateDevice() {
null_descriptor =
feature_chain.get<vk::PhysicalDeviceRobustness2FeaturesEXT>().nullDescriptor;
}
maintenance5 = add_extension(VK_KHR_MAINTENANCE_5_EXTENSION_NAME);
custom_border_color = add_extension(VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME);
depth_clip_control = add_extension(VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME);
vertex_input_dynamic_state = add_extension(VK_EXT_VERTEX_INPUT_DYNAMIC_STATE_EXTENSION_NAME);
@ -376,9 +375,6 @@ bool Instance::CreateDevice() {
.maintenance4 = true,
},
// Other extensions
vk::PhysicalDeviceMaintenance5FeaturesKHR{
.maintenance5 = true,
},
vk::PhysicalDeviceCustomBorderColorFeaturesEXT{
.customBorderColors = true,
.customBorderColorWithoutFormat = true,
@ -414,9 +410,6 @@ bool Instance::CreateDevice() {
if (!maintenance4) {
device_chain.unlink<vk::PhysicalDeviceMaintenance4FeaturesKHR>();
}
if (!maintenance5) {
device_chain.unlink<vk::PhysicalDeviceMaintenance5FeaturesKHR>();
}
if (!custom_border_color) {
device_chain.unlink<vk::PhysicalDeviceCustomBorderColorFeaturesEXT>();
}

View File

@ -114,11 +114,6 @@ public:
return null_descriptor;
}
/// Returns true when VK_KHR_maintenance5 is supported.
bool IsMaintenance5Supported() const {
return maintenance5;
}
/// Returns true when VK_KHR_fragment_shader_barycentric is supported.
bool IsFragmentShaderBarycentricSupported() const {
return fragment_shader_barycentric;
@ -307,7 +302,6 @@ private:
bool dynamic_color_write_mask{};
bool vertex_input_dynamic_state{};
bool null_descriptor{};
bool maintenance5{};
bool list_restart{};
bool legacy_vertex_attributes{};
bool shader_stencil_export{};