Explorar o código

Turn off robust buffer access by default.

It can be a performance bottleneck in some hardware.
reduz %!s(int64=4) %!d(string=hai) anos
pai
achega
985892bfec
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      drivers/vulkan/vulkan_context.cpp

+ 2 - 0
drivers/vulkan/vulkan_context.cpp

@@ -493,6 +493,8 @@ Error VulkanContext::_create_physical_device() {
 	//  features based on this query
 	//  features based on this query
 	vkGetPhysicalDeviceFeatures(gpu, &physical_device_features);
 	vkGetPhysicalDeviceFeatures(gpu, &physical_device_features);
 
 
+	physical_device_features.robustBufferAccess = false; //turn off robust buffer access, which can hamper performance on some hardware
+
 #define GET_INSTANCE_PROC_ADDR(inst, entrypoint)                                            \
 #define GET_INSTANCE_PROC_ADDR(inst, entrypoint)                                            \
 	{                                                                                       \
 	{                                                                                       \
 		fp##entrypoint = (PFN_vk##entrypoint)vkGetInstanceProcAddr(inst, "vk" #entrypoint); \
 		fp##entrypoint = (PFN_vk##entrypoint)vkGetInstanceProcAddr(inst, "vk" #entrypoint); \