GPU: Implemented the A1B5G5R5 texture format (0x14)
This commit is contained in:
parent
b16e5c6a81
commit
7ddc872b52
4 changed files with 21 additions and 5 deletions
|
@ -55,6 +55,7 @@ u32 BytesPerPixel(TextureFormat format) {
|
|||
case TextureFormat::A8R8G8B8:
|
||||
case TextureFormat::A2B10G10R10:
|
||||
return 4;
|
||||
case TextureFormat::A1B5G5R5:
|
||||
case TextureFormat::B5G6R5:
|
||||
return 2;
|
||||
default:
|
||||
|
@ -80,6 +81,7 @@ std::vector<u8> UnswizzleTexture(VAddr address, TextureFormat format, u32 width,
|
|||
break;
|
||||
case TextureFormat::A8R8G8B8:
|
||||
case TextureFormat::A2B10G10R10:
|
||||
case TextureFormat::A1B5G5R5:
|
||||
case TextureFormat::B5G6R5:
|
||||
CopySwizzledData(width, height, bytes_per_pixel, bytes_per_pixel, data,
|
||||
unswizzled_data.data(), true, block_height);
|
||||
|
@ -103,6 +105,7 @@ std::vector<u8> DecodeTexture(const std::vector<u8>& texture_data, TextureFormat
|
|||
case TextureFormat::DXT45:
|
||||
case TextureFormat::A8R8G8B8:
|
||||
case TextureFormat::A2B10G10R10:
|
||||
case TextureFormat::A1B5G5R5:
|
||||
case TextureFormat::B5G6R5:
|
||||
// TODO(Subv): For the time being just forward the same data without any decoding.
|
||||
rgba_data = texture_data;
|
||||
|
|
|
@ -16,6 +16,7 @@ namespace Texture {
|
|||
enum class TextureFormat : u32 {
|
||||
A8R8G8B8 = 0x8,
|
||||
A2B10G10R10 = 0x9,
|
||||
A1B5G5R5 = 0x14,
|
||||
B5G6R5 = 0x15,
|
||||
DXT1 = 0x24,
|
||||
DXT23 = 0x25,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue