diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/gpu.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 74 |
4 files changed, 45 insertions, 34 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 9c73d7546..6f0343888 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -46,6 +46,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | |||
| 46 | case RenderTargetFormat::RGBA32_FLOAT: | 46 | case RenderTargetFormat::RGBA32_FLOAT: |
| 47 | case RenderTargetFormat::RGBA32_UINT: | 47 | case RenderTargetFormat::RGBA32_UINT: |
| 48 | return 16; | 48 | return 16; |
| 49 | case RenderTargetFormat::RGBA16_UINT: | ||
| 49 | case RenderTargetFormat::RGBA16_FLOAT: | 50 | case RenderTargetFormat::RGBA16_FLOAT: |
| 50 | case RenderTargetFormat::RG32_FLOAT: | 51 | case RenderTargetFormat::RG32_FLOAT: |
| 51 | return 8; | 52 | return 8; |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 0b6521985..73abb7a18 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -20,6 +20,7 @@ enum class RenderTargetFormat : u32 { | |||
| 20 | NONE = 0x0, | 20 | NONE = 0x0, |
| 21 | RGBA32_FLOAT = 0xC0, | 21 | RGBA32_FLOAT = 0xC0, |
| 22 | RGBA32_UINT = 0xC2, | 22 | RGBA32_UINT = 0xC2, |
| 23 | RGBA16_UINT = 0xC9, | ||
| 23 | RGBA16_FLOAT = 0xCA, | 24 | RGBA16_FLOAT = 0xCA, |
| 24 | RG32_FLOAT = 0xCB, | 25 | RG32_FLOAT = 0xCB, |
| 25 | BGRA8_UNORM = 0xCF, | 26 | BGRA8_UNORM = 0xCF, |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index a74ca3595..d635550d2 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp | |||
| @@ -101,6 +101,7 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form | |||
| 101 | {GL_R8, GL_RED, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // R8 | 101 | {GL_R8, GL_RED, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // R8 |
| 102 | {GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE, ComponentType::UInt, false}, // R8UI | 102 | {GL_R8UI, GL_RED_INTEGER, GL_UNSIGNED_BYTE, ComponentType::UInt, false}, // R8UI |
| 103 | {GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT, ComponentType::Float, false}, // RGBA16F | 103 | {GL_RGBA16F, GL_RGBA, GL_HALF_FLOAT, ComponentType::Float, false}, // RGBA16F |
| 104 | {GL_RGBA16UI, GL_RGBA, GL_UNSIGNED_SHORT, ComponentType::UInt, false}, // RGBA16UI | ||
| 104 | {GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, ComponentType::Float, | 105 | {GL_R11F_G11F_B10F, GL_RGB, GL_UNSIGNED_INT_10F_11F_11F_REV, ComponentType::Float, |
| 105 | false}, // R11FG11FB10F | 106 | false}, // R11FG11FB10F |
| 106 | {GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // RGBA32UI | 107 | {GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // RGBA32UI |
| @@ -244,6 +245,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU | |||
| 244 | MortonCopy<true, PixelFormat::R8>, | 245 | MortonCopy<true, PixelFormat::R8>, |
| 245 | MortonCopy<true, PixelFormat::R8UI>, | 246 | MortonCopy<true, PixelFormat::R8UI>, |
| 246 | MortonCopy<true, PixelFormat::RGBA16F>, | 247 | MortonCopy<true, PixelFormat::RGBA16F>, |
| 248 | MortonCopy<true, PixelFormat::RGBA16UI>, | ||
| 247 | MortonCopy<true, PixelFormat::R11FG11FB10F>, | 249 | MortonCopy<true, PixelFormat::R11FG11FB10F>, |
| 248 | MortonCopy<true, PixelFormat::RGBA32UI>, | 250 | MortonCopy<true, PixelFormat::RGBA32UI>, |
| 249 | MortonCopy<true, PixelFormat::DXT1>, | 251 | MortonCopy<true, PixelFormat::DXT1>, |
| @@ -293,6 +295,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU | |||
| 293 | MortonCopy<false, PixelFormat::R8>, | 295 | MortonCopy<false, PixelFormat::R8>, |
| 294 | MortonCopy<false, PixelFormat::R8UI>, | 296 | MortonCopy<false, PixelFormat::R8UI>, |
| 295 | MortonCopy<false, PixelFormat::RGBA16F>, | 297 | MortonCopy<false, PixelFormat::RGBA16F>, |
| 298 | MortonCopy<false, PixelFormat::RGBA16UI>, | ||
| 296 | MortonCopy<false, PixelFormat::R11FG11FB10F>, | 299 | MortonCopy<false, PixelFormat::R11FG11FB10F>, |
| 297 | MortonCopy<false, PixelFormat::RGBA32UI>, | 300 | MortonCopy<false, PixelFormat::RGBA32UI>, |
| 298 | // TODO(Subv): Swizzling DXT1/DXT23/DXT45/DXN1/DXN2/BC7U/ASTC_2D_4X4 formats is not | 301 | // TODO(Subv): Swizzling DXT1/DXT23/DXT45/DXN1/DXN2/BC7U/ASTC_2D_4X4 formats is not |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index ffed66394..4ab74342e 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -31,44 +31,45 @@ struct SurfaceParams { | |||
| 31 | R8 = 5, | 31 | R8 = 5, |
| 32 | R8UI = 6, | 32 | R8UI = 6, |
| 33 | RGBA16F = 7, | 33 | RGBA16F = 7, |
| 34 | R11FG11FB10F = 8, | 34 | RGBA16UI = 8, |
| 35 | RGBA32UI = 9, | 35 | R11FG11FB10F = 9, |
| 36 | DXT1 = 10, | 36 | RGBA32UI = 10, |
| 37 | DXT23 = 11, | 37 | DXT1 = 11, |
| 38 | DXT45 = 12, | 38 | DXT23 = 12, |
| 39 | DXN1 = 13, // This is also known as BC4 | 39 | DXT45 = 13, |
| 40 | DXN2UNORM = 14, | 40 | DXN1 = 14, // This is also known as BC4 |
| 41 | DXN2SNORM = 15, | 41 | DXN2UNORM = 15, |
| 42 | BC7U = 16, | 42 | DXN2SNORM = 16, |
| 43 | ASTC_2D_4X4 = 17, | 43 | BC7U = 17, |
| 44 | G8R8 = 18, | 44 | ASTC_2D_4X4 = 18, |
| 45 | BGRA8 = 19, | 45 | G8R8 = 19, |
| 46 | RGBA32F = 20, | 46 | BGRA8 = 20, |
| 47 | RG32F = 21, | 47 | RGBA32F = 21, |
| 48 | R32F = 22, | 48 | RG32F = 22, |
| 49 | R16F = 23, | 49 | R32F = 23, |
| 50 | R16UNORM = 24, | 50 | R16F = 24, |
| 51 | R16S = 25, | 51 | R16UNORM = 25, |
| 52 | R16UI = 26, | 52 | R16S = 26, |
| 53 | R16I = 27, | 53 | R16UI = 27, |
| 54 | RG16 = 28, | 54 | R16I = 28, |
| 55 | RG16F = 29, | 55 | RG16 = 29, |
| 56 | RG16UI = 30, | 56 | RG16F = 30, |
| 57 | RG16I = 31, | 57 | RG16UI = 31, |
| 58 | RG16S = 32, | 58 | RG16I = 32, |
| 59 | RGB32F = 33, | 59 | RG16S = 33, |
| 60 | SRGBA8 = 34, | 60 | RGB32F = 34, |
| 61 | RG8U = 35, | 61 | SRGBA8 = 35, |
| 62 | RG8S = 36, | 62 | RG8U = 36, |
| 63 | RG8S = 37, | ||
| 63 | 64 | ||
| 64 | MaxColorFormat, | 65 | MaxColorFormat, |
| 65 | 66 | ||
| 66 | // DepthStencil formats | 67 | // DepthStencil formats |
| 67 | Z24S8 = 37, | 68 | Z24S8 = 38, |
| 68 | S8Z24 = 38, | 69 | S8Z24 = 39, |
| 69 | Z32F = 39, | 70 | Z32F = 40, |
| 70 | Z16 = 40, | 71 | Z16 = 41, |
| 71 | Z32FS8 = 41, | 72 | Z32FS8 = 42, |
| 72 | 73 | ||
| 73 | MaxDepthStencilFormat, | 74 | MaxDepthStencilFormat, |
| 74 | 75 | ||
| @@ -114,6 +115,7 @@ struct SurfaceParams { | |||
| 114 | 1, // R8 | 115 | 1, // R8 |
| 115 | 1, // R8UI | 116 | 1, // R8UI |
| 116 | 1, // RGBA16F | 117 | 1, // RGBA16F |
| 118 | 1, // RGBA16UI | ||
| 117 | 1, // R11FG11FB10F | 119 | 1, // R11FG11FB10F |
| 118 | 1, // RGBA32UI | 120 | 1, // RGBA32UI |
| 119 | 4, // DXT1 | 121 | 4, // DXT1 |
| @@ -167,6 +169,7 @@ struct SurfaceParams { | |||
| 167 | 8, // R8 | 169 | 8, // R8 |
| 168 | 8, // R8UI | 170 | 8, // R8UI |
| 169 | 64, // RGBA16F | 171 | 64, // RGBA16F |
| 172 | 64, // RGBA16UI | ||
| 170 | 32, // R11FG11FB10F | 173 | 32, // R11FG11FB10F |
| 171 | 128, // RGBA32UI | 174 | 128, // RGBA32UI |
| 172 | 64, // DXT1 | 175 | 64, // DXT1 |
| @@ -244,6 +247,8 @@ struct SurfaceParams { | |||
| 244 | return PixelFormat::A2B10G10R10; | 247 | return PixelFormat::A2B10G10R10; |
| 245 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: | 248 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: |
| 246 | return PixelFormat::RGBA16F; | 249 | return PixelFormat::RGBA16F; |
| 250 | case Tegra::RenderTargetFormat::RGBA16_UINT: | ||
| 251 | return PixelFormat::RGBA16UI; | ||
| 247 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: | 252 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: |
| 248 | return PixelFormat::RGBA32F; | 253 | return PixelFormat::RGBA32F; |
| 249 | case Tegra::RenderTargetFormat::RG32_FLOAT: | 254 | case Tegra::RenderTargetFormat::RG32_FLOAT: |
| @@ -453,6 +458,7 @@ struct SurfaceParams { | |||
| 453 | case Tegra::RenderTargetFormat::R32_FLOAT: | 458 | case Tegra::RenderTargetFormat::R32_FLOAT: |
| 454 | return ComponentType::Float; | 459 | return ComponentType::Float; |
| 455 | case Tegra::RenderTargetFormat::RGBA32_UINT: | 460 | case Tegra::RenderTargetFormat::RGBA32_UINT: |
| 461 | case Tegra::RenderTargetFormat::RGBA16_UINT: | ||
| 456 | case Tegra::RenderTargetFormat::RG16_UINT: | 462 | case Tegra::RenderTargetFormat::RG16_UINT: |
| 457 | case Tegra::RenderTargetFormat::R8_UINT: | 463 | case Tegra::RenderTargetFormat::R8_UINT: |
| 458 | case Tegra::RenderTargetFormat::R16_UINT: | 464 | case Tegra::RenderTargetFormat::R16_UINT: |