renderer_vulkan: Rework format handling
* This is a pretty large commit that aims to solve some issues with the current format system * The instance now builds at application initialization an array of format traits for each pixel format that includes information such as blit/attachment/storage support and fallback formats * The runtime doesn't ask the instance for formats but receives these traits and can dedice on its own what to build For now we do the same as before, we require both blit and attachment support * Morton swizzling also sees many bug fixes. The previous code was very hacky and didn't work for partial texture updates. It was also inconsistent, as it would take a tiled_buffer and write to the middle of linear * Now the functions have been greatly simplified and adjusted to work better with std::span. This fixes out of bounds errors and texture glitches (like the display in Mario Kart 7)
This commit is contained in:
@ -80,4 +80,12 @@ void ConvertBGRToRGBA(std::span<const std::byte> source, std::span<std::byte> de
|
||||
*/
|
||||
void ConvertABGRToRGBA(std::span<const std::byte> source, std::span<std::byte> dest);
|
||||
|
||||
void ConvertD32S8ToD24S8(std::span<const std::byte> source, std::span<std::byte> dest);
|
||||
|
||||
void ConvertRGBA4ToRGBA8(std::span<const std::byte> source, std::span<std::byte> dest);
|
||||
|
||||
void ConvertRGBA8ToRGBA4(std::span<const std::byte> source, std::span<std::byte> dest);
|
||||
|
||||
void InterleaveD24S8(std::span<const std::byte> source, std::span<std::byte> dest);
|
||||
|
||||
} // namespace Pica::Texture
|
||||
|
Reference in New Issue
Block a user