|
|
@ -660,6 +660,16 @@ Device::Device(VkInstance instance_, vk::PhysicalDevice physical_, VkSurfaceKHR
|
|
|
|
LOG_INFO(Render_Vulkan, "Device doesn't support depth range unrestricted");
|
|
|
|
LOG_INFO(Render_Vulkan, "Device doesn't support depth range unrestricted");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
VkPhysicalDeviceDepthClipControlFeaturesEXT depth_clip_control_features;
|
|
|
|
|
|
|
|
if (ext_depth_clip_control) {
|
|
|
|
|
|
|
|
depth_clip_control_features = {
|
|
|
|
|
|
|
|
.sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT,
|
|
|
|
|
|
|
|
.pNext = nullptr,
|
|
|
|
|
|
|
|
.depthClipControl = VK_TRUE,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
SetNext(next, depth_clip_control_features);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
VkDeviceDiagnosticsConfigCreateInfoNV diagnostics_nv;
|
|
|
|
VkDeviceDiagnosticsConfigCreateInfoNV diagnostics_nv;
|
|
|
|
if (Settings::values.enable_nsight_aftermath && nv_device_diagnostics_config) {
|
|
|
|
if (Settings::values.enable_nsight_aftermath && nv_device_diagnostics_config) {
|
|
|
|
nsight_aftermath_tracker = std::make_unique<NsightAftermathTracker>();
|
|
|
|
nsight_aftermath_tracker = std::make_unique<NsightAftermathTracker>();
|
|
|
@ -1083,6 +1093,7 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) {
|
|
|
|
bool has_ext_vertex_input_dynamic_state{};
|
|
|
|
bool has_ext_vertex_input_dynamic_state{};
|
|
|
|
bool has_ext_line_rasterization{};
|
|
|
|
bool has_ext_line_rasterization{};
|
|
|
|
bool has_ext_primitive_topology_list_restart{};
|
|
|
|
bool has_ext_primitive_topology_list_restart{};
|
|
|
|
|
|
|
|
bool has_ext_depth_clip_control{};
|
|
|
|
for (const std::string& extension : supported_extensions) {
|
|
|
|
for (const std::string& extension : supported_extensions) {
|
|
|
|
const auto test = [&](std::optional<std::reference_wrapper<bool>> status, const char* name,
|
|
|
|
const auto test = [&](std::optional<std::reference_wrapper<bool>> status, const char* name,
|
|
|
|
bool push) {
|
|
|
|
bool push) {
|
|
|
@ -1116,6 +1127,7 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) {
|
|
|
|
test(ext_shader_stencil_export, VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, true);
|
|
|
|
test(ext_shader_stencil_export, VK_EXT_SHADER_STENCIL_EXPORT_EXTENSION_NAME, true);
|
|
|
|
test(ext_conservative_rasterization, VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME,
|
|
|
|
test(ext_conservative_rasterization, VK_EXT_CONSERVATIVE_RASTERIZATION_EXTENSION_NAME,
|
|
|
|
true);
|
|
|
|
true);
|
|
|
|
|
|
|
|
test(has_ext_depth_clip_control, VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_transform_feedback, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_transform_feedback, VK_EXT_TRANSFORM_FEEDBACK_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_custom_border_color, VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_custom_border_color, VK_EXT_CUSTOM_BORDER_COLOR_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_extended_dynamic_state, VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, false);
|
|
|
|
test(has_ext_extended_dynamic_state, VK_EXT_EXTENDED_DYNAMIC_STATE_EXTENSION_NAME, false);
|
|
|
@ -1279,6 +1291,19 @@ std::vector<const char*> Device::LoadExtensions(bool requires_surface) {
|
|
|
|
ext_line_rasterization = true;
|
|
|
|
ext_line_rasterization = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (has_ext_depth_clip_control) {
|
|
|
|
|
|
|
|
VkPhysicalDeviceDepthClipControlFeaturesEXT depth_clip_control_features;
|
|
|
|
|
|
|
|
depth_clip_control_features.sType =
|
|
|
|
|
|
|
|
VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_DEPTH_CLIP_CONTROL_FEATURES_EXT;
|
|
|
|
|
|
|
|
depth_clip_control_features.pNext = nullptr;
|
|
|
|
|
|
|
|
features.pNext = &depth_clip_control_features;
|
|
|
|
|
|
|
|
physical.GetFeatures2(features);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (depth_clip_control_features.depthClipControl) {
|
|
|
|
|
|
|
|
extensions.push_back(VK_EXT_DEPTH_CLIP_CONTROL_EXTENSION_NAME);
|
|
|
|
|
|
|
|
ext_depth_clip_control = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (has_khr_workgroup_memory_explicit_layout) {
|
|
|
|
if (has_khr_workgroup_memory_explicit_layout) {
|
|
|
|
VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR layout;
|
|
|
|
VkPhysicalDeviceWorkgroupMemoryExplicitLayoutFeaturesKHR layout;
|
|
|
|
layout.sType =
|
|
|
|
layout.sType =
|
|
|
|