Browse Source

evil staging buffers for PS4

eden-orbis-ps4
lizzie 4 days ago
parent
commit
9ea08d843f
  1. 6
      src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp
  2. 2
      src/video_core/vulkan_common/vulkan_surface.cpp

6
src/video_core/renderer_vulkan/vk_staging_buffer_pool.cpp

@ -33,7 +33,11 @@ constexpr VkDeviceSize MAX_ALIGNMENT = 256;
// Windows ones however, can intake bigger buffers and generally do not OOM. // Windows ones however, can intake bigger buffers and generally do not OOM.
// - GTX 960 on Windows will not OOM with 256mib // - GTX 960 on Windows will not OOM with 256mib
// - GT 1030 on ^NIX will OOM with 256mib // - GT 1030 on ^NIX will OOM with 256mib
#if defined(__FreeBSD__)
// With Orbis we need to be insanely chary with our allocations
// anything over 64MB is prone to crash the GPU, I'm sorry.
#if defined(__OPENORBIS__)
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 32_MiB;
#elif defined(__FreeBSD__)
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 128_MiB; constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 128_MiB;
#else #else
constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 256_MiB; constexpr VkDeviceSize MAX_STREAM_BUFFER_SIZE = 256_MiB;

2
src/video_core/vulkan_common/vulkan_surface.cpp

@ -108,10 +108,12 @@ vk::SurfaceKHR CreateSurface(
} }
#endif #endif
#ifndef __OPENORBIS__
if (!unsafe_surface) { if (!unsafe_surface) {
LOG_ERROR(Render_Vulkan, "Presentation not supported on this platform"); LOG_ERROR(Render_Vulkan, "Presentation not supported on this platform");
throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED); throw vk::Exception(VK_ERROR_INITIALIZATION_FAILED);
} }
#endif
return vk::SurfaceKHR(unsafe_surface, *instance, dld); return vk::SurfaceKHR(unsafe_surface, *instance, dld);
} }

Loading…
Cancel
Save