summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2021-07-26 23:30:45 +0200
committerGitHub <noreply@github.com>2021-07-26 23:30:45 +0200
commitc6991fa9003cceaaadd4d4c016b7318ff1fb0b8b (patch)
tree2c340b58a114a686efc6ba818b9ea42a8f18fec8
parentMerge pull request #6729 from ReinUsesLisp/quad-indexed-barrier (diff)
parentvk_buffer_cache: Add transform feedback usage to null buffer (diff)
downloadyuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar.gz
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar.bz2
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar.lz
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar.xz
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.tar.zst
yuzu-c6991fa9003cceaaadd4d4c016b7318ff1fb0b8b.zip
-rw-r--r--src/video_core/renderer_vulkan/vk_buffer_cache.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
index f4b3ee95c..8ac58bc2f 100644
--- a/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_buffer_cache.cpp
@@ -358,7 +358,7 @@ void BufferCacheRuntime::ReserveNullBuffer() {
if (null_buffer) {
return;
}
- null_buffer = device.GetLogical().CreateBuffer(VkBufferCreateInfo{
+ VkBufferCreateInfo create_info{
.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO,
.pNext = nullptr,
.flags = 0,
@@ -367,9 +367,13 @@ void BufferCacheRuntime::ReserveNullBuffer() {
.sharingMode = VK_SHARING_MODE_EXCLUSIVE,
.queueFamilyIndexCount = 0,
.pQueueFamilyIndices = nullptr,
- });
+ };
+ if (device.IsExtTransformFeedbackSupported()) {
+ create_info.usage |= VK_BUFFER_USAGE_TRANSFORM_FEEDBACK_BUFFER_BIT_EXT;
+ }
+ null_buffer = device.GetLogical().CreateBuffer(create_info);
if (device.HasDebuggingToolAttached()) {
- null_buffer.SetObjectNameEXT("Null index buffer");
+ null_buffer.SetObjectNameEXT("Null buffer");
}
null_buffer_commit = memory_allocator.Commit(null_buffer, MemoryUsage::DeviceLocal);