diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/gpu.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 47 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 106 |
4 files changed, 93 insertions, 64 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index ceaf86654..834940b83 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -50,6 +50,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | |||
| 50 | case RenderTargetFormat::RG32_FLOAT: | 50 | case RenderTargetFormat::RG32_FLOAT: |
| 51 | return 8; | 51 | return 8; |
| 52 | case RenderTargetFormat::RGBA8_UNORM: | 52 | case RenderTargetFormat::RGBA8_UNORM: |
| 53 | case RenderTargetFormat::RGBA8_SNORM: | ||
| 53 | case RenderTargetFormat::RGBA8_SRGB: | 54 | case RenderTargetFormat::RGBA8_SRGB: |
| 54 | case RenderTargetFormat::RGB10_A2_UNORM: | 55 | case RenderTargetFormat::RGB10_A2_UNORM: |
| 55 | case RenderTargetFormat::BGRA8_UNORM: | 56 | case RenderTargetFormat::BGRA8_UNORM: |
| @@ -66,6 +67,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | |||
| 66 | case RenderTargetFormat::R16_UINT: | 67 | case RenderTargetFormat::R16_UINT: |
| 67 | case RenderTargetFormat::R16_SINT: | 68 | case RenderTargetFormat::R16_SINT: |
| 68 | case RenderTargetFormat::R16_FLOAT: | 69 | case RenderTargetFormat::R16_FLOAT: |
| 70 | case RenderTargetFormat::RG8_SNORM: | ||
| 69 | return 2; | 71 | return 2; |
| 70 | case RenderTargetFormat::R8_UNORM: | 72 | case RenderTargetFormat::R8_UNORM: |
| 71 | return 1; | 73 | return 1; |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index b57312b3b..de5b037be 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -26,6 +26,7 @@ enum class RenderTargetFormat : u32 { | |||
| 26 | RGB10_A2_UNORM = 0xD1, | 26 | RGB10_A2_UNORM = 0xD1, |
| 27 | RGBA8_UNORM = 0xD5, | 27 | RGBA8_UNORM = 0xD5, |
| 28 | RGBA8_SRGB = 0xD6, | 28 | RGBA8_SRGB = 0xD6, |
| 29 | RGBA8_SNORM = 0xD7, | ||
| 29 | RG16_UNORM = 0xDA, | 30 | RG16_UNORM = 0xDA, |
| 30 | RG16_SNORM = 0xDB, | 31 | RG16_SNORM = 0xDB, |
| 31 | RG16_SINT = 0xDC, | 32 | RG16_SINT = 0xDC, |
| @@ -34,6 +35,7 @@ enum class RenderTargetFormat : u32 { | |||
| 34 | R11G11B10_FLOAT = 0xE0, | 35 | R11G11B10_FLOAT = 0xE0, |
| 35 | R32_FLOAT = 0xE5, | 36 | R32_FLOAT = 0xE5, |
| 36 | B5G6R5_UNORM = 0xE8, | 37 | B5G6R5_UNORM = 0xE8, |
| 38 | RG8_SNORM = 0xEB, | ||
| 37 | R16_UNORM = 0xEE, | 39 | R16_UNORM = 0xEE, |
| 38 | R16_SNORM = 0xEF, | 40 | R16_SNORM = 0xEF, |
| 39 | R16_SINT = 0xF0, | 41 | R16_SINT = 0xF0, |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 15a33ed9b..d055b1dfa 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -92,7 +92,8 @@ struct FormatTuple { | |||
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_format_tuples = {{ | 94 | static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_format_tuples = {{ |
| 95 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // ABGR8 | 95 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // ABGR8U |
| 96 | {GL_RGBA8, GL_RGBA, GL_BYTE, ComponentType::SNorm, false}, // ABGR8S | ||
| 96 | {GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, ComponentType::UNorm, false}, // B5G6R5 | 97 | {GL_RGB, GL_RGB, GL_UNSIGNED_SHORT_5_6_5_REV, ComponentType::UNorm, false}, // B5G6R5 |
| 97 | {GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, ComponentType::UNorm, | 98 | {GL_RGB10_A2, GL_RGBA, GL_UNSIGNED_INT_2_10_10_10_REV, ComponentType::UNorm, |
| 98 | false}, // A2B10G10R10 | 99 | false}, // A2B10G10R10 |
| @@ -132,6 +133,7 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form | |||
| 132 | {GL_RG16_SNORM, GL_RG, GL_SHORT, ComponentType::SNorm, false}, // RG16S | 133 | {GL_RG16_SNORM, GL_RG, GL_SHORT, ComponentType::SNorm, false}, // RG16S |
| 133 | {GL_RGB32F, GL_RGB, GL_FLOAT, ComponentType::Float, false}, // RGB32F | 134 | {GL_RGB32F, GL_RGB, GL_FLOAT, ComponentType::Float, false}, // RGB32F |
| 134 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8 | 135 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8 |
| 136 | {GL_RG8, GL_RG, GL_BYTE, ComponentType::SNorm, false}, // RG8S | ||
| 135 | 137 | ||
| 136 | // DepthStencil formats | 138 | // DepthStencil formats |
| 137 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, | 139 | {GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm, |
| @@ -231,31 +233,33 @@ void MortonCopy(u32 stride, u32 block_height, u32 height, std::vector<u8>& gl_bu | |||
| 231 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), | 233 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), |
| 232 | SurfaceParams::MaxPixelFormat> | 234 | SurfaceParams::MaxPixelFormat> |
| 233 | morton_to_gl_fns = { | 235 | morton_to_gl_fns = { |
| 234 | MortonCopy<true, PixelFormat::ABGR8>, MortonCopy<true, PixelFormat::B5G6R5>, | 236 | MortonCopy<true, PixelFormat::ABGR8U>, MortonCopy<true, PixelFormat::ABGR8S>, |
| 235 | MortonCopy<true, PixelFormat::A2B10G10R10>, MortonCopy<true, PixelFormat::A1B5G5R5>, | 237 | MortonCopy<true, PixelFormat::B5G6R5>, MortonCopy<true, PixelFormat::A2B10G10R10>, |
| 236 | MortonCopy<true, PixelFormat::R8>, MortonCopy<true, PixelFormat::RGBA16F>, | 238 | MortonCopy<true, PixelFormat::A1B5G5R5>, MortonCopy<true, PixelFormat::R8>, |
| 237 | MortonCopy<true, PixelFormat::R11FG11FB10F>, MortonCopy<true, PixelFormat::RGBA32UI>, | 239 | MortonCopy<true, PixelFormat::RGBA16F>, MortonCopy<true, PixelFormat::R11FG11FB10F>, |
| 238 | MortonCopy<true, PixelFormat::DXT1>, MortonCopy<true, PixelFormat::DXT23>, | 240 | MortonCopy<true, PixelFormat::RGBA32UI>, MortonCopy<true, PixelFormat::DXT1>, |
| 239 | MortonCopy<true, PixelFormat::DXT45>, MortonCopy<true, PixelFormat::DXN1>, | 241 | MortonCopy<true, PixelFormat::DXT23>, MortonCopy<true, PixelFormat::DXT45>, |
| 240 | MortonCopy<true, PixelFormat::DXN2UNORM>, MortonCopy<true, PixelFormat::DXN2SNORM>, | 242 | MortonCopy<true, PixelFormat::DXN1>, MortonCopy<true, PixelFormat::DXN2UNORM>, |
| 241 | MortonCopy<true, PixelFormat::BC7U>, MortonCopy<true, PixelFormat::ASTC_2D_4X4>, | 243 | MortonCopy<true, PixelFormat::DXN2SNORM>, MortonCopy<true, PixelFormat::BC7U>, |
| 242 | MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>, | 244 | MortonCopy<true, PixelFormat::ASTC_2D_4X4>, MortonCopy<true, PixelFormat::G8R8>, |
| 243 | MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>, | 245 | MortonCopy<true, PixelFormat::BGRA8>, MortonCopy<true, PixelFormat::RGBA32F>, |
| 244 | MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::R16F>, | 246 | MortonCopy<true, PixelFormat::RG32F>, MortonCopy<true, PixelFormat::R32F>, |
| 245 | MortonCopy<true, PixelFormat::R16UNORM>, MortonCopy<true, PixelFormat::R16S>, | 247 | MortonCopy<true, PixelFormat::R16F>, MortonCopy<true, PixelFormat::R16UNORM>, |
| 246 | MortonCopy<true, PixelFormat::R16UI>, MortonCopy<true, PixelFormat::R16I>, | 248 | MortonCopy<true, PixelFormat::R16S>, MortonCopy<true, PixelFormat::R16UI>, |
| 247 | MortonCopy<true, PixelFormat::RG16>, MortonCopy<true, PixelFormat::RG16F>, | 249 | MortonCopy<true, PixelFormat::R16I>, MortonCopy<true, PixelFormat::RG16>, |
| 248 | MortonCopy<true, PixelFormat::RG16UI>, MortonCopy<true, PixelFormat::RG16I>, | 250 | MortonCopy<true, PixelFormat::RG16F>, MortonCopy<true, PixelFormat::RG16UI>, |
| 249 | MortonCopy<true, PixelFormat::RG16S>, MortonCopy<true, PixelFormat::RGB32F>, | 251 | MortonCopy<true, PixelFormat::RG16I>, MortonCopy<true, PixelFormat::RG16S>, |
| 250 | MortonCopy<true, PixelFormat::SRGBA8>, MortonCopy<true, PixelFormat::Z24S8>, | 252 | MortonCopy<true, PixelFormat::RGB32F>, MortonCopy<true, PixelFormat::SRGBA8>, |
| 251 | MortonCopy<true, PixelFormat::S8Z24>, MortonCopy<true, PixelFormat::Z32F>, | 253 | MortonCopy<true, PixelFormat::RG8S>, MortonCopy<true, PixelFormat::Z24S8>, |
| 252 | MortonCopy<true, PixelFormat::Z16>, MortonCopy<true, PixelFormat::Z32FS8>, | 254 | MortonCopy<true, PixelFormat::S8Z24>, MortonCopy<true, PixelFormat::Z32F>, |
| 255 | MortonCopy<true, PixelFormat::Z16>, MortonCopy<true, PixelFormat::Z32FS8>, | ||
| 253 | }; | 256 | }; |
| 254 | 257 | ||
| 255 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), | 258 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), |
| 256 | SurfaceParams::MaxPixelFormat> | 259 | SurfaceParams::MaxPixelFormat> |
| 257 | gl_to_morton_fns = { | 260 | gl_to_morton_fns = { |
| 258 | MortonCopy<false, PixelFormat::ABGR8>, | 261 | MortonCopy<false, PixelFormat::ABGR8U>, |
| 262 | MortonCopy<false, PixelFormat::ABGR8S>, | ||
| 259 | MortonCopy<false, PixelFormat::B5G6R5>, | 263 | MortonCopy<false, PixelFormat::B5G6R5>, |
| 260 | MortonCopy<false, PixelFormat::A2B10G10R10>, | 264 | MortonCopy<false, PixelFormat::A2B10G10R10>, |
| 261 | MortonCopy<false, PixelFormat::A1B5G5R5>, | 265 | MortonCopy<false, PixelFormat::A1B5G5R5>, |
| @@ -290,6 +294,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU | |||
| 290 | MortonCopy<false, PixelFormat::RG16S>, | 294 | MortonCopy<false, PixelFormat::RG16S>, |
| 291 | MortonCopy<false, PixelFormat::RGB32F>, | 295 | MortonCopy<false, PixelFormat::RGB32F>, |
| 292 | MortonCopy<false, PixelFormat::SRGBA8>, | 296 | MortonCopy<false, PixelFormat::SRGBA8>, |
| 297 | MortonCopy<false, PixelFormat::RG8S>, | ||
| 293 | MortonCopy<false, PixelFormat::Z24S8>, | 298 | MortonCopy<false, PixelFormat::Z24S8>, |
| 294 | MortonCopy<false, PixelFormat::S8Z24>, | 299 | MortonCopy<false, PixelFormat::S8Z24>, |
| 295 | MortonCopy<false, PixelFormat::Z32F>, | 300 | MortonCopy<false, PixelFormat::Z32F>, |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index e24ba8cfe..d7a43652e 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -23,48 +23,50 @@ using PageMap = boost::icl::interval_map<u64, int>; | |||
| 23 | 23 | ||
| 24 | struct SurfaceParams { | 24 | struct SurfaceParams { |
| 25 | enum class PixelFormat { | 25 | enum class PixelFormat { |
| 26 | ABGR8 = 0, | 26 | ABGR8U = 0, |
| 27 | B5G6R5 = 1, | 27 | ABGR8S = 1, |
| 28 | A2B10G10R10 = 2, | 28 | B5G6R5 = 2, |
| 29 | A1B5G5R5 = 3, | 29 | A2B10G10R10 = 3, |
| 30 | R8 = 4, | 30 | A1B5G5R5 = 4, |
| 31 | RGBA16F = 5, | 31 | R8 = 5, |
| 32 | R11FG11FB10F = 6, | 32 | RGBA16F = 6, |
| 33 | RGBA32UI = 7, | 33 | R11FG11FB10F = 7, |
| 34 | DXT1 = 8, | 34 | RGBA32UI = 8, |
| 35 | DXT23 = 9, | 35 | DXT1 = 9, |
| 36 | DXT45 = 10, | 36 | DXT23 = 10, |
| 37 | DXN1 = 11, // This is also known as BC4 | 37 | DXT45 = 11, |
| 38 | DXN2UNORM = 12, | 38 | DXN1 = 12, // This is also known as BC4 |
| 39 | DXN2SNORM = 13, | 39 | DXN2UNORM = 13, |
| 40 | BC7U = 14, | 40 | DXN2SNORM = 14, |
| 41 | ASTC_2D_4X4 = 15, | 41 | BC7U = 15, |
| 42 | G8R8 = 16, | 42 | ASTC_2D_4X4 = 16, |
| 43 | BGRA8 = 17, | 43 | G8R8 = 17, |
| 44 | RGBA32F = 18, | 44 | BGRA8 = 18, |
| 45 | RG32F = 19, | 45 | RGBA32F = 19, |
| 46 | R32F = 20, | 46 | RG32F = 20, |
| 47 | R16F = 21, | 47 | R32F = 21, |
| 48 | R16UNORM = 22, | 48 | R16F = 22, |
| 49 | R16S = 23, | 49 | R16UNORM = 23, |
| 50 | R16UI = 24, | 50 | R16S = 24, |
| 51 | R16I = 25, | 51 | R16UI = 25, |
| 52 | RG16 = 26, | 52 | R16I = 26, |
| 53 | RG16F = 27, | 53 | RG16 = 27, |
| 54 | RG16UI = 28, | 54 | RG16F = 28, |
| 55 | RG16I = 29, | 55 | RG16UI = 29, |
| 56 | RG16S = 30, | 56 | RG16I = 30, |
| 57 | RGB32F = 31, | 57 | RG16S = 31, |
| 58 | SRGBA8 = 32, | 58 | RGB32F = 32, |
| 59 | SRGBA8 = 33, | ||
| 60 | RG8S = 34, | ||
| 59 | 61 | ||
| 60 | MaxColorFormat, | 62 | MaxColorFormat, |
| 61 | 63 | ||
| 62 | // DepthStencil formats | 64 | // DepthStencil formats |
| 63 | Z24S8 = 33, | 65 | Z24S8 = 35, |
| 64 | S8Z24 = 34, | 66 | S8Z24 = 36, |
| 65 | Z32F = 35, | 67 | Z32F = 37, |
| 66 | Z16 = 36, | 68 | Z16 = 38, |
| 67 | Z32FS8 = 37, | 69 | Z32FS8 = 39, |
| 68 | 70 | ||
| 69 | MaxDepthStencilFormat, | 71 | MaxDepthStencilFormat, |
| 70 | 72 | ||
| @@ -102,7 +104,8 @@ struct SurfaceParams { | |||
| 102 | return 0; | 104 | return 0; |
| 103 | 105 | ||
| 104 | constexpr std::array<u32, MaxPixelFormat> compression_factor_table = {{ | 106 | constexpr std::array<u32, MaxPixelFormat> compression_factor_table = {{ |
| 105 | 1, // ABGR8 | 107 | 1, // ABGR8U |
| 108 | 1, // ABGR8S | ||
| 106 | 1, // B5G6R5 | 109 | 1, // B5G6R5 |
| 107 | 1, // A2B10G10R10 | 110 | 1, // A2B10G10R10 |
| 108 | 1, // A1B5G5R5 | 111 | 1, // A1B5G5R5 |
| @@ -135,6 +138,7 @@ struct SurfaceParams { | |||
| 135 | 1, // RG16S | 138 | 1, // RG16S |
| 136 | 1, // RGB32F | 139 | 1, // RGB32F |
| 137 | 1, // SRGBA8 | 140 | 1, // SRGBA8 |
| 141 | 1, // RG8S | ||
| 138 | 1, // Z24S8 | 142 | 1, // Z24S8 |
| 139 | 1, // S8Z24 | 143 | 1, // S8Z24 |
| 140 | 1, // Z32F | 144 | 1, // Z32F |
| @@ -151,7 +155,8 @@ struct SurfaceParams { | |||
| 151 | return 0; | 155 | return 0; |
| 152 | 156 | ||
| 153 | constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ | 157 | constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ |
| 154 | 32, // ABGR8 | 158 | 32, // ABGR8U |
| 159 | 32, // ABGR8S | ||
| 155 | 16, // B5G6R5 | 160 | 16, // B5G6R5 |
| 156 | 32, // A2B10G10R10 | 161 | 32, // A2B10G10R10 |
| 157 | 16, // A1B5G5R5 | 162 | 16, // A1B5G5R5 |
| @@ -184,6 +189,7 @@ struct SurfaceParams { | |||
| 184 | 32, // RG16S | 189 | 32, // RG16S |
| 185 | 96, // RGB32F | 190 | 96, // RGB32F |
| 186 | 32, // SRGBA8 | 191 | 32, // SRGBA8 |
| 192 | 16, // RG8S | ||
| 187 | 32, // Z24S8 | 193 | 32, // Z24S8 |
| 188 | 32, // S8Z24 | 194 | 32, // S8Z24 |
| 189 | 32, // Z32F | 195 | 32, // Z32F |
| @@ -223,7 +229,9 @@ struct SurfaceParams { | |||
| 223 | // gamma. | 229 | // gamma. |
| 224 | case Tegra::RenderTargetFormat::RGBA8_SRGB: | 230 | case Tegra::RenderTargetFormat::RGBA8_SRGB: |
| 225 | case Tegra::RenderTargetFormat::RGBA8_UNORM: | 231 | case Tegra::RenderTargetFormat::RGBA8_UNORM: |
| 226 | return PixelFormat::ABGR8; | 232 | return PixelFormat::ABGR8U; |
| 233 | case Tegra::RenderTargetFormat::RGBA8_SNORM: | ||
| 234 | return PixelFormat::ABGR8S; | ||
| 227 | case Tegra::RenderTargetFormat::BGRA8_UNORM: | 235 | case Tegra::RenderTargetFormat::BGRA8_UNORM: |
| 228 | return PixelFormat::BGRA8; | 236 | return PixelFormat::BGRA8; |
| 229 | case Tegra::RenderTargetFormat::RGB10_A2_UNORM: | 237 | case Tegra::RenderTargetFormat::RGB10_A2_UNORM: |
| @@ -252,6 +260,8 @@ struct SurfaceParams { | |||
| 252 | return PixelFormat::RG16; | 260 | return PixelFormat::RG16; |
| 253 | case Tegra::RenderTargetFormat::RG16_SNORM: | 261 | case Tegra::RenderTargetFormat::RG16_SNORM: |
| 254 | return PixelFormat::RG16S; | 262 | return PixelFormat::RG16S; |
| 263 | case Tegra::RenderTargetFormat::RG8_SNORM: | ||
| 264 | return PixelFormat::RG8S; | ||
| 255 | case Tegra::RenderTargetFormat::R16_FLOAT: | 265 | case Tegra::RenderTargetFormat::R16_FLOAT: |
| 256 | return PixelFormat::R16F; | 266 | return PixelFormat::R16F; |
| 257 | case Tegra::RenderTargetFormat::R16_UNORM: | 267 | case Tegra::RenderTargetFormat::R16_UNORM: |
| @@ -275,7 +285,15 @@ struct SurfaceParams { | |||
| 275 | // TODO(Subv): Properly implement this | 285 | // TODO(Subv): Properly implement this |
| 276 | switch (format) { | 286 | switch (format) { |
| 277 | case Tegra::Texture::TextureFormat::A8R8G8B8: | 287 | case Tegra::Texture::TextureFormat::A8R8G8B8: |
| 278 | return PixelFormat::ABGR8; | 288 | switch (component_type) { |
| 289 | case Tegra::Texture::ComponentType::UNORM: | ||
| 290 | return PixelFormat::ABGR8U; | ||
| 291 | case Tegra::Texture::ComponentType::SNORM: | ||
| 292 | return PixelFormat::ABGR8S; | ||
| 293 | } | ||
| 294 | LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", | ||
| 295 | static_cast<u32>(component_type)); | ||
| 296 | UNREACHABLE(); | ||
| 279 | case Tegra::Texture::TextureFormat::B5G6R5: | 297 | case Tegra::Texture::TextureFormat::B5G6R5: |
| 280 | return PixelFormat::B5G6R5; | 298 | return PixelFormat::B5G6R5; |
| 281 | case Tegra::Texture::TextureFormat::A2B10G10R10: | 299 | case Tegra::Texture::TextureFormat::A2B10G10R10: |
| @@ -402,8 +420,10 @@ struct SurfaceParams { | |||
| 402 | case Tegra::RenderTargetFormat::R16_UNORM: | 420 | case Tegra::RenderTargetFormat::R16_UNORM: |
| 403 | case Tegra::RenderTargetFormat::B5G6R5_UNORM: | 421 | case Tegra::RenderTargetFormat::B5G6R5_UNORM: |
| 404 | return ComponentType::UNorm; | 422 | return ComponentType::UNorm; |
| 423 | case Tegra::RenderTargetFormat::RGBA8_SNORM: | ||
| 405 | case Tegra::RenderTargetFormat::RG16_SNORM: | 424 | case Tegra::RenderTargetFormat::RG16_SNORM: |
| 406 | case Tegra::RenderTargetFormat::R16_SNORM: | 425 | case Tegra::RenderTargetFormat::R16_SNORM: |
| 426 | case Tegra::RenderTargetFormat::RG8_SNORM: | ||
| 407 | return ComponentType::SNorm; | 427 | return ComponentType::SNorm; |
| 408 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: | 428 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: |
| 409 | case Tegra::RenderTargetFormat::R11G11B10_FLOAT: | 429 | case Tegra::RenderTargetFormat::R11G11B10_FLOAT: |
| @@ -429,7 +449,7 @@ struct SurfaceParams { | |||
| 429 | static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) { | 449 | static PixelFormat PixelFormatFromGPUPixelFormat(Tegra::FramebufferConfig::PixelFormat format) { |
| 430 | switch (format) { | 450 | switch (format) { |
| 431 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: | 451 | case Tegra::FramebufferConfig::PixelFormat::ABGR8: |
| 432 | return PixelFormat::ABGR8; | 452 | return PixelFormat::ABGR8U; |
| 433 | default: | 453 | default: |
| 434 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 454 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 435 | UNREACHABLE(); | 455 | UNREACHABLE(); |