diff options
author | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-10-29 00:44:27 +0200 |
---|---|---|
committer | Ameer J <52414509+ameerj@users.noreply.github.com> | 2023-11-01 01:10:54 +0100 |
commit | 7d348005317c1d5f88b2472de64a083defa2feab (patch) | |
tree | 6f5b26390e2d9794c9031b4887d9e96cdb0a0e8b /src/video_core/renderer_vulkan | |
parent | Merge pull request #11931 from t895/applet-launcher (diff) | |
download | yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar.gz yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar.bz2 yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar.lz yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar.xz yuzu-7d348005317c1d5f88b2472de64a083defa2feab.tar.zst yuzu-7d348005317c1d5f88b2472de64a083defa2feab.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.cpp | 4 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_buffer_cache.h | 2 | ||||
-rw-r--r-- | src/video_core/renderer_vulkan/vk_pipeline_cache.cpp | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp index d8148e89a..976c3f6a6 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp @@ -355,6 +355,10 @@ bool BufferCacheRuntime::CanReportMemoryUsage() const { return device.CanReportMemoryUsage(); } +u32 BufferCacheRuntime::GetStorageBufferAlignment() const { + return static_cast<u32>(device.GetStorageBufferAlignment()); +} + void BufferCacheRuntime::Finish() { scheduler.Finish(); } diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.h b/src/video_core/renderer_vulkan/vk_buffer_cache.h index 95446c732..833dfac45 100644 --- a/src/video_core/renderer_vulkan/vk_buffer_cache.h +++ b/src/video_core/renderer_vulkan/vk_buffer_cache.h @@ -75,6 +75,8 @@ public: bool CanReportMemoryUsage() const; + u32 GetStorageBufferAlignment() const; + [[nodiscard]] StagingBufferRef UploadStagingBuffer(size_t size); [[nodiscard]] StagingBufferRef DownloadStagingBuffer(size_t size, bool deferred = false); diff --git a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp index 22bf8cc77..5e4380175 100644 --- a/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_pipeline_cache.cpp @@ -369,6 +369,7 @@ PipelineCache::PipelineCache(RasterizerVulkan& rasterizer_, const Device& device driver_id == VK_DRIVER_ID_AMD_PROPRIETARY || driver_id == VK_DRIVER_ID_AMD_OPEN_SOURCE, .support_snorm_render_buffer = true, .support_viewport_index_layer = device.IsExtShaderViewportIndexLayerSupported(), + .min_ssbo_alignment = static_cast<u32>(device.GetStorageBufferAlignment()), .support_geometry_shader_passthrough = device.IsNvGeometryShaderPassthroughSupported(), .support_conditional_barrier = device.SupportsConditionalBarriers(), }; |