Implement RGB32F PixelFormat (#886) (used by Go Vacation)
This commit is contained in:
parent
d0bd01146e
commit
fe64e1d38e
3 changed files with 23 additions and 9 deletions
|
@ -57,6 +57,8 @@ u32 BytesPerPixel(TextureFormat format) {
|
|||
case TextureFormat::BC7U:
|
||||
// In this case a 'pixel' actually refers to a 4x4 tile.
|
||||
return 16;
|
||||
case TextureFormat::R32_G32_B32:
|
||||
return 12;
|
||||
case TextureFormat::ASTC_2D_4X4:
|
||||
case TextureFormat::A8R8G8B8:
|
||||
case TextureFormat::A2B10G10R10:
|
||||
|
@ -131,6 +133,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
|
|||
case TextureFormat::R16_G16:
|
||||
case TextureFormat::BF10GF11RF11:
|
||||
case TextureFormat::ASTC_2D_4X4:
|
||||
case TextureFormat::R32_G32_B32:
|
||||
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
|
||||
unswizzled_data.data(), true, block_height);
|
||||
break;
|
||||
|
@ -190,6 +193,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
|
|||
case TextureFormat::R32:
|
||||
case TextureFormat::R16:
|
||||
case TextureFormat::R16_G16:
|
||||
case TextureFormat::R32_G32_B32:
|
||||
// TODO(Subv): For the time being just forward the same data without any decoding.
|
||||
rgba_data = texture_data;
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue