Răsfoiți Sursa

vk_stream_buffer: Fix initializing Vulkan with NVIDIA on Linux

The previous fix only partially solved the issue, as only certain GPUs that needed 9 or less MiB subtracted would work (i.e. GTX 980 Ti, GT 730). This takes from DXVK's example to divide `heap_size` by 2 to determine `allocable_size`. Additionally tested on my Quadro K4200, which previously required setting it to 12 to boot.
lat9nq 5 ani în urmă
părinte
comite
ca26fd0f42
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      src/video_core/renderer_vulkan/vk_stream_buffer.cpp

+ 2 - 1
src/video_core/renderer_vulkan/vk_stream_buffer.cpp

@@ -120,7 +120,8 @@ void VKStreamBuffer::CreateBuffers(VkBufferUsageFlags usage) {
 
     // Substract from the preferred heap size some bytes to avoid getting out of memory.
     const VkDeviceSize heap_size = memory_properties.memoryHeaps[preferred_heap].size;
-    const VkDeviceSize allocable_size = heap_size - 9 * 1024 * 1024;
+    // As per DXVK's example, using `heap_size / 2`
+    const VkDeviceSize allocable_size = heap_size / 2;
     buffer = device.GetLogical().CreateBuffer({
         .sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
         .pNext = nullptr,