shadps4-emu / shadPS4

PS4 emulator for Windows,Linux,MacOS
https://shadps4.net/
GNU General Public License v2.0
10.63k stars 646 forks source link

Linux - Bloodborne - very low ingame fps due to Vulkan errors #804

Closed enzi closed 1 month ago

enzi commented 1 month ago

Log is getting spammed with these errors and getting 1 frame very 3 seconds or so. Full log here: output3.zip

[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:59: VUID-VkBufferViewCreateInfo-format-08779: Validation Error: [ VUID-VkBufferViewCreateInfo-format-08779 ] Object 0: handle = 0xf225e20000002e13, name = Buffer 0x46253000:0x2000, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xb7c39078 | vkCreateBufferView(): pCreateInfo->buffer was created with usage (VK_BUFFER_USAGE_2_TRANSFER_SRC_BIT_KHR|VK_BUFFER_USAGE_2_TRANSFER_DST_BIT_KHR|VK_BUFFER_USAGE_2_UNIFORM_TEXEL_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_TEXEL_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_UNIFORM_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_STORAGE_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_INDEX_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_VERTEX_BUFFER_BIT_KHR|VK_BUFFER_USAGE_2_INDIRECT_BUFFER_BIT_KHR) containing VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, format (VK_FORMAT_R32G32B32_UINT) must be supported for storage texel buffers. (supported bufferFeatures: VK_FORMAT_FEATURE_2_UNIFORM_TEXEL_BUFFER_BIT|VK_FORMAT_FEATURE_2_VERTEX_BUFFER_BIT). The Vulkan spec states: If the buffer view usage contains VK_BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, then format features of format must contain VK_FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT (https://www.khronos.org/registry/vulkan/specs/1.3-extensions/html/vkspec.html#VUID-VkBufferViewCreateInfo-format-08779)

[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:59: SYNC-HAZARD-READ-AFTER-WRITE: Validation Error: [ SYNC-HAZARD-READ-AFTER-WRITE ] Object 0: handle = 0x530f2b00000021f9, name = Buffer 0x4ebd8000:0xa4199000, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xe4d96472 | vkCmdDrawIndexed(): Hazard READ_AFTER_WRITE for vertex VkBuffer 0x530f2b00000021f9[Buffer 0x4ebd8000:0xa4199000] in VkCommandBuffer 0x6046e59562b0[]. Access info (usage: SYNC_VERTEX_ATTRIBUTE_INPUT_VERTEX_ATTRIBUTE_READ, prior_usage: SYNC_COMPUTE_SHADER_SHADER_STORAGE_WRITE, write_barriers: 0, command: vkCmdDispatch, seq_no: 1124, reset_no: 271).

[Render.Vulkan] <Error> vk_platform.cpp:DebugUtilsCallback:59: SYNC-HAZARD-READ-AFTER-WRITE: Validation Error: [ SYNC-HAZARD-READ-AFTER-WRITE ] Object 0: handle = 0x530f2b00000021f9, name = Buffer 0x4ebd8000:0xa4199000, type = VK_OBJECT_TYPE_BUFFER; | MessageID = 0xe4d96472 | vkCmdDrawIndexed(): Hazard READ_AFTER_WRITE for VkBuffer 0x530f2b00000021f9[Buffer 0x4ebd8000:0xa4199000] in VkCommandBuffer 0x6046e59562b0[], VkPipeline 0x8c91f700000024d7[], and VkDescriptorSet 0x0[], type: VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, binding #1 index 0. Access info (usage: SYNC_FRAGMENT_SHADER_UNIFORM_READ, prior_usage: SYNC_COMPUTE_SHADER_SHADER_STORAGE_WRITE, write_barriers: 0, command: vkCmdDispatch, seq_no: 1124, reset_no: 271).

Jaswanth-Vardireddy commented 1 month ago

I keep getting vulkan errors too, they're purple and have been occuring since recent patches. I am unable to even get into the main title screen.

enzi commented 1 month ago

These are the format that support the usage flag: vk::FormatFeatureFlagBits::eStorageTexelBuffer

What's bad here is that uint 32/32/32 is requested and there's no 96bit format, only 128, so it takes more of an hack to translate this buffer.

Where this confuses me: Is Windows using DX instead of Vulkan and this problem doesn't apply or is this just not supported in Linux drivers?

Hermiten commented 1 month ago

I'm closing this one, not followed up and the report need more information (like specs, etc ...)