mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-12-24 03:30:04 +00:00
vk_buffer_cache: Add transform feedback usage to null buffer
Fixes bad API usages on Vulkan.
This commit is contained in:
parent
c09557acd8
commit
27ed6e7c2b
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user