-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vk] Check for BGRA8 linear image to support blitting #5092
Conversation
rpcs3/Emu/RSX/VK/VKTextureCache.h
Outdated
@@ -1043,6 +1043,11 @@ namespace vk | |||
|
|||
vk::image *upload_image_simple(vk::command_buffer& cmd, u32 address, u32 width, u32 height) | |||
{ | |||
if (!m_formats_support.bgra8_linear_blit) | |||
{ | |||
return NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return 'nullptr' for consistency. Also add a space between // and comment body. It was decided as the preferred method for new code and also makes clang-format happy
4964ce4
to
66fc0d4
Compare
@kd-11 thanks for the review! comments are addressed now. |
Its ok now. Its quite strange to have a GPU with the BGRA8 format not usable as a blit source, I wonder how many other formats cannot be easily copied to the backbuffer via blitting. |
@kd-11 Also, it's not BGRA8 that is problematic but the fact of placing it in HOST_VISIBLE memory (with linear tiling). Vulkan baseline requirements for HOST_VISIBLE images are super low, e.g. only 2D with a few formats, and they aren't required to support any graphics operations. Basically, they are glorified staging buffers, and that's how Metal portability backend implements them. Hence, they can only be used in transfers. |
Makes sense, otherwise it would have been strange as drivers often just implement blitting with a full-quad pass which would have made the user-side implementation of the same redundant. Thanks for that clearing up. |
The result of
upload_image_simple
is used as a blit source, so we need to make sure it's possible.