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 | 70 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_rasterizer_cache.h | 78 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/maxwell_to_gl.h | 2 |
5 files changed, 101 insertions, 53 deletions
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 19e7f1161..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; |
| @@ -67,6 +68,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | |||
| 67 | case RenderTargetFormat::R16_UINT: | 68 | case RenderTargetFormat::R16_UINT: |
| 68 | case RenderTargetFormat::R16_SINT: | 69 | case RenderTargetFormat::R16_SINT: |
| 69 | case RenderTargetFormat::R16_FLOAT: | 70 | case RenderTargetFormat::R16_FLOAT: |
| 71 | case RenderTargetFormat::RG8_UNORM: | ||
| 70 | case RenderTargetFormat::RG8_SNORM: | 72 | case RenderTargetFormat::RG8_SNORM: |
| 71 | return 2; | 73 | return 2; |
| 72 | case RenderTargetFormat::R8_UNORM: | 74 | case RenderTargetFormat::R8_UNORM: |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index e008d8f26..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, |
| @@ -35,6 +36,7 @@ enum class RenderTargetFormat : u32 { | |||
| 35 | R11G11B10_FLOAT = 0xE0, | 36 | R11G11B10_FLOAT = 0xE0, |
| 36 | R32_FLOAT = 0xE5, | 37 | R32_FLOAT = 0xE5, |
| 37 | B5G6R5_UNORM = 0xE8, | 38 | B5G6R5_UNORM = 0xE8, |
| 39 | RG8_UNORM = 0xEA, | ||
| 38 | RG8_SNORM = 0xEB, | 40 | RG8_SNORM = 0xEB, |
| 39 | R16_UNORM = 0xEE, | 41 | R16_UNORM = 0xEE, |
| 40 | R16_SNORM = 0xEF, | 42 | R16_SNORM = 0xEF, |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp index 84c250c63..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 |
| @@ -134,6 +135,7 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form | |||
| 134 | {GL_RG16_SNORM, GL_RG, GL_SHORT, ComponentType::SNorm, false}, // RG16S | 135 | {GL_RG16_SNORM, GL_RG, GL_SHORT, ComponentType::SNorm, false}, // RG16S |
| 135 | {GL_RGB32F, GL_RGB, GL_FLOAT, ComponentType::Float, false}, // RGB32F | 136 | {GL_RGB32F, GL_RGB, GL_FLOAT, ComponentType::Float, false}, // RGB32F |
| 136 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8 | 137 | {GL_SRGB8_ALPHA8, GL_RGBA, GL_UNSIGNED_INT_8_8_8_8_REV, ComponentType::UNorm, false}, // SRGBA8 |
| 138 | {GL_RG8, GL_RG, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // RG8U | ||
| 137 | {GL_RG8, GL_RG, GL_BYTE, ComponentType::SNorm, false}, // RG8S | 139 | {GL_RG8, GL_RG, GL_BYTE, ComponentType::SNorm, false}, // RG8S |
| 138 | 140 | ||
| 139 | // DepthStencil formats | 141 | // DepthStencil formats |
| @@ -234,32 +236,57 @@ void MortonCopy(u32 stride, u32 block_height, u32 height, std::vector<u8>& gl_bu | |||
| 234 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), | 236 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), |
| 235 | SurfaceParams::MaxPixelFormat> | 237 | SurfaceParams::MaxPixelFormat> |
| 236 | morton_to_gl_fns = { | 238 | morton_to_gl_fns = { |
| 237 | MortonCopy<true, PixelFormat::ABGR8U>, MortonCopy<true, PixelFormat::ABGR8S>, | 239 | // clang-format off |
| 238 | MortonCopy<true, PixelFormat::B5G6R5>, MortonCopy<true, PixelFormat::A2B10G10R10>, | 240 | MortonCopy<true, PixelFormat::ABGR8U>, |
| 239 | MortonCopy<true, PixelFormat::A1B5G5R5>, MortonCopy<true, PixelFormat::R8>, | 241 | MortonCopy<true, PixelFormat::ABGR8S>, |
| 240 | MortonCopy<true, PixelFormat::R8UI>, MortonCopy<true, PixelFormat::RGBA16F>, | 242 | MortonCopy<true, PixelFormat::B5G6R5>, |
| 241 | MortonCopy<true, PixelFormat::R11FG11FB10F>, MortonCopy<true, PixelFormat::RGBA32UI>, | 243 | MortonCopy<true, PixelFormat::A2B10G10R10>, |
| 242 | MortonCopy<true, PixelFormat::DXT1>, MortonCopy<true, PixelFormat::DXT23>, | 244 | MortonCopy<true, PixelFormat::A1B5G5R5>, |
| 243 | MortonCopy<true, PixelFormat::DXT45>, MortonCopy<true, PixelFormat::DXN1>, | 245 | MortonCopy<true, PixelFormat::R8>, |
| 244 | MortonCopy<true, PixelFormat::DXN2UNORM>, MortonCopy<true, PixelFormat::DXN2SNORM>, | 246 | MortonCopy<true, PixelFormat::R8UI>, |
| 245 | MortonCopy<true, PixelFormat::BC7U>, MortonCopy<true, PixelFormat::ASTC_2D_4X4>, | 247 | MortonCopy<true, PixelFormat::RGBA16F>, |
| 246 | MortonCopy<true, PixelFormat::G8R8>, MortonCopy<true, PixelFormat::BGRA8>, | 248 | MortonCopy<true, PixelFormat::RGBA16UI>, |
| 247 | MortonCopy<true, PixelFormat::RGBA32F>, MortonCopy<true, PixelFormat::RG32F>, | 249 | MortonCopy<true, PixelFormat::R11FG11FB10F>, |
| 248 | MortonCopy<true, PixelFormat::R32F>, MortonCopy<true, PixelFormat::R16F>, | 250 | MortonCopy<true, PixelFormat::RGBA32UI>, |
| 249 | MortonCopy<true, PixelFormat::R16UNORM>, MortonCopy<true, PixelFormat::R16S>, | 251 | MortonCopy<true, PixelFormat::DXT1>, |
| 250 | MortonCopy<true, PixelFormat::R16UI>, MortonCopy<true, PixelFormat::R16I>, | 252 | MortonCopy<true, PixelFormat::DXT23>, |
| 251 | MortonCopy<true, PixelFormat::RG16>, MortonCopy<true, PixelFormat::RG16F>, | 253 | MortonCopy<true, PixelFormat::DXT45>, |
| 252 | MortonCopy<true, PixelFormat::RG16UI>, MortonCopy<true, PixelFormat::RG16I>, | 254 | MortonCopy<true, PixelFormat::DXN1>, |
| 253 | MortonCopy<true, PixelFormat::RG16S>, MortonCopy<true, PixelFormat::RGB32F>, | 255 | MortonCopy<true, PixelFormat::DXN2UNORM>, |
| 254 | MortonCopy<true, PixelFormat::SRGBA8>, MortonCopy<true, PixelFormat::RG8S>, | 256 | MortonCopy<true, PixelFormat::DXN2SNORM>, |
| 255 | MortonCopy<true, PixelFormat::Z24S8>, MortonCopy<true, PixelFormat::S8Z24>, | 257 | MortonCopy<true, PixelFormat::BC7U>, |
| 256 | MortonCopy<true, PixelFormat::Z32F>, MortonCopy<true, PixelFormat::Z16>, | 258 | MortonCopy<true, PixelFormat::ASTC_2D_4X4>, |
| 259 | MortonCopy<true, PixelFormat::G8R8>, | ||
| 260 | MortonCopy<true, PixelFormat::BGRA8>, | ||
| 261 | MortonCopy<true, PixelFormat::RGBA32F>, | ||
| 262 | MortonCopy<true, PixelFormat::RG32F>, | ||
| 263 | MortonCopy<true, PixelFormat::R32F>, | ||
| 264 | MortonCopy<true, PixelFormat::R16F>, | ||
| 265 | MortonCopy<true, PixelFormat::R16UNORM>, | ||
| 266 | MortonCopy<true, PixelFormat::R16S>, | ||
| 267 | MortonCopy<true, PixelFormat::R16UI>, | ||
| 268 | MortonCopy<true, PixelFormat::R16I>, | ||
| 269 | MortonCopy<true, PixelFormat::RG16>, | ||
| 270 | MortonCopy<true, PixelFormat::RG16F>, | ||
| 271 | MortonCopy<true, PixelFormat::RG16UI>, | ||
| 272 | MortonCopy<true, PixelFormat::RG16I>, | ||
| 273 | MortonCopy<true, PixelFormat::RG16S>, | ||
| 274 | MortonCopy<true, PixelFormat::RGB32F>, | ||
| 275 | MortonCopy<true, PixelFormat::SRGBA8>, | ||
| 276 | MortonCopy<true, PixelFormat::RG8U>, | ||
| 277 | MortonCopy<true, PixelFormat::RG8S>, | ||
| 278 | MortonCopy<true, PixelFormat::Z24S8>, | ||
| 279 | MortonCopy<true, PixelFormat::S8Z24>, | ||
| 280 | MortonCopy<true, PixelFormat::Z32F>, | ||
| 281 | MortonCopy<true, PixelFormat::Z16>, | ||
| 257 | MortonCopy<true, PixelFormat::Z32FS8>, | 282 | MortonCopy<true, PixelFormat::Z32FS8>, |
| 283 | // clang-format on | ||
| 258 | }; | 284 | }; |
| 259 | 285 | ||
| 260 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), | 286 | static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPUVAddr), |
| 261 | SurfaceParams::MaxPixelFormat> | 287 | SurfaceParams::MaxPixelFormat> |
| 262 | gl_to_morton_fns = { | 288 | gl_to_morton_fns = { |
| 289 | // clang-format off | ||
| 263 | MortonCopy<false, PixelFormat::ABGR8U>, | 290 | MortonCopy<false, PixelFormat::ABGR8U>, |
| 264 | MortonCopy<false, PixelFormat::ABGR8S>, | 291 | MortonCopy<false, PixelFormat::ABGR8S>, |
| 265 | MortonCopy<false, PixelFormat::B5G6R5>, | 292 | MortonCopy<false, PixelFormat::B5G6R5>, |
| @@ -268,6 +295,7 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU | |||
| 268 | MortonCopy<false, PixelFormat::R8>, | 295 | MortonCopy<false, PixelFormat::R8>, |
| 269 | MortonCopy<false, PixelFormat::R8UI>, | 296 | MortonCopy<false, PixelFormat::R8UI>, |
| 270 | MortonCopy<false, PixelFormat::RGBA16F>, | 297 | MortonCopy<false, PixelFormat::RGBA16F>, |
| 298 | MortonCopy<false, PixelFormat::RGBA16UI>, | ||
| 271 | MortonCopy<false, PixelFormat::R11FG11FB10F>, | 299 | MortonCopy<false, PixelFormat::R11FG11FB10F>, |
| 272 | MortonCopy<false, PixelFormat::RGBA32UI>, | 300 | MortonCopy<false, PixelFormat::RGBA32UI>, |
| 273 | // 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 |
| @@ -297,12 +325,14 @@ static constexpr std::array<void (*)(u32, u32, u32, std::vector<u8>&, Tegra::GPU | |||
| 297 | MortonCopy<false, PixelFormat::RG16S>, | 325 | MortonCopy<false, PixelFormat::RG16S>, |
| 298 | MortonCopy<false, PixelFormat::RGB32F>, | 326 | MortonCopy<false, PixelFormat::RGB32F>, |
| 299 | MortonCopy<false, PixelFormat::SRGBA8>, | 327 | MortonCopy<false, PixelFormat::SRGBA8>, |
| 328 | MortonCopy<false, PixelFormat::RG8U>, | ||
| 300 | MortonCopy<false, PixelFormat::RG8S>, | 329 | MortonCopy<false, PixelFormat::RG8S>, |
| 301 | MortonCopy<false, PixelFormat::Z24S8>, | 330 | MortonCopy<false, PixelFormat::Z24S8>, |
| 302 | MortonCopy<false, PixelFormat::S8Z24>, | 331 | MortonCopy<false, PixelFormat::S8Z24>, |
| 303 | MortonCopy<false, PixelFormat::Z32F>, | 332 | MortonCopy<false, PixelFormat::Z32F>, |
| 304 | MortonCopy<false, PixelFormat::Z16>, | 333 | MortonCopy<false, PixelFormat::Z16>, |
| 305 | MortonCopy<false, PixelFormat::Z32FS8>, | 334 | MortonCopy<false, PixelFormat::Z32FS8>, |
| 335 | // clang-format on | ||
| 306 | }; | 336 | }; |
| 307 | 337 | ||
| 308 | // Allocate an uninitialized texture of appropriate size and format for the surface | 338 | // Allocate an uninitialized texture of appropriate size and format for the surface |
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h index 202257b58..4ab74342e 100644 --- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h +++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h | |||
| @@ -31,43 +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 | RG8S = 35, | 61 | SRGBA8 = 35, |
| 62 | RG8U = 36, | ||
| 63 | RG8S = 37, | ||
| 62 | 64 | ||
| 63 | MaxColorFormat, | 65 | MaxColorFormat, |
| 64 | 66 | ||
| 65 | // DepthStencil formats | 67 | // DepthStencil formats |
| 66 | Z24S8 = 36, | 68 | Z24S8 = 38, |
| 67 | S8Z24 = 37, | 69 | S8Z24 = 39, |
| 68 | Z32F = 38, | 70 | Z32F = 40, |
| 69 | Z16 = 39, | 71 | Z16 = 41, |
| 70 | Z32FS8 = 40, | 72 | Z32FS8 = 42, |
| 71 | 73 | ||
| 72 | MaxDepthStencilFormat, | 74 | MaxDepthStencilFormat, |
| 73 | 75 | ||
| @@ -113,6 +115,7 @@ struct SurfaceParams { | |||
| 113 | 1, // R8 | 115 | 1, // R8 |
| 114 | 1, // R8UI | 116 | 1, // R8UI |
| 115 | 1, // RGBA16F | 117 | 1, // RGBA16F |
| 118 | 1, // RGBA16UI | ||
| 116 | 1, // R11FG11FB10F | 119 | 1, // R11FG11FB10F |
| 117 | 1, // RGBA32UI | 120 | 1, // RGBA32UI |
| 118 | 4, // DXT1 | 121 | 4, // DXT1 |
| @@ -140,6 +143,7 @@ struct SurfaceParams { | |||
| 140 | 1, // RG16S | 143 | 1, // RG16S |
| 141 | 1, // RGB32F | 144 | 1, // RGB32F |
| 142 | 1, // SRGBA8 | 145 | 1, // SRGBA8 |
| 146 | 1, // RG8U | ||
| 143 | 1, // RG8S | 147 | 1, // RG8S |
| 144 | 1, // Z24S8 | 148 | 1, // Z24S8 |
| 145 | 1, // S8Z24 | 149 | 1, // S8Z24 |
| @@ -165,6 +169,7 @@ struct SurfaceParams { | |||
| 165 | 8, // R8 | 169 | 8, // R8 |
| 166 | 8, // R8UI | 170 | 8, // R8UI |
| 167 | 64, // RGBA16F | 171 | 64, // RGBA16F |
| 172 | 64, // RGBA16UI | ||
| 168 | 32, // R11FG11FB10F | 173 | 32, // R11FG11FB10F |
| 169 | 128, // RGBA32UI | 174 | 128, // RGBA32UI |
| 170 | 64, // DXT1 | 175 | 64, // DXT1 |
| @@ -192,6 +197,7 @@ struct SurfaceParams { | |||
| 192 | 32, // RG16S | 197 | 32, // RG16S |
| 193 | 96, // RGB32F | 198 | 96, // RGB32F |
| 194 | 32, // SRGBA8 | 199 | 32, // SRGBA8 |
| 200 | 16, // RG8U | ||
| 195 | 16, // RG8S | 201 | 16, // RG8S |
| 196 | 32, // Z24S8 | 202 | 32, // Z24S8 |
| 197 | 32, // S8Z24 | 203 | 32, // S8Z24 |
| @@ -241,6 +247,8 @@ struct SurfaceParams { | |||
| 241 | return PixelFormat::A2B10G10R10; | 247 | return PixelFormat::A2B10G10R10; |
| 242 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: | 248 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: |
| 243 | return PixelFormat::RGBA16F; | 249 | return PixelFormat::RGBA16F; |
| 250 | case Tegra::RenderTargetFormat::RGBA16_UINT: | ||
| 251 | return PixelFormat::RGBA16UI; | ||
| 244 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: | 252 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: |
| 245 | return PixelFormat::RGBA32F; | 253 | return PixelFormat::RGBA32F; |
| 246 | case Tegra::RenderTargetFormat::RG32_FLOAT: | 254 | case Tegra::RenderTargetFormat::RG32_FLOAT: |
| @@ -265,6 +273,8 @@ struct SurfaceParams { | |||
| 265 | return PixelFormat::RG16; | 273 | return PixelFormat::RG16; |
| 266 | case Tegra::RenderTargetFormat::RG16_SNORM: | 274 | case Tegra::RenderTargetFormat::RG16_SNORM: |
| 267 | return PixelFormat::RG16S; | 275 | return PixelFormat::RG16S; |
| 276 | case Tegra::RenderTargetFormat::RG8_UNORM: | ||
| 277 | return PixelFormat::RG8U; | ||
| 268 | case Tegra::RenderTargetFormat::RG8_SNORM: | 278 | case Tegra::RenderTargetFormat::RG8_SNORM: |
| 269 | return PixelFormat::RG8S; | 279 | return PixelFormat::RG8S; |
| 270 | case Tegra::RenderTargetFormat::R16_FLOAT: | 280 | case Tegra::RenderTargetFormat::R16_FLOAT: |
| @@ -432,6 +442,7 @@ struct SurfaceParams { | |||
| 432 | case Tegra::RenderTargetFormat::RG16_UNORM: | 442 | case Tegra::RenderTargetFormat::RG16_UNORM: |
| 433 | case Tegra::RenderTargetFormat::R16_UNORM: | 443 | case Tegra::RenderTargetFormat::R16_UNORM: |
| 434 | case Tegra::RenderTargetFormat::B5G6R5_UNORM: | 444 | case Tegra::RenderTargetFormat::B5G6R5_UNORM: |
| 445 | case Tegra::RenderTargetFormat::RG8_UNORM: | ||
| 435 | return ComponentType::UNorm; | 446 | return ComponentType::UNorm; |
| 436 | case Tegra::RenderTargetFormat::RGBA8_SNORM: | 447 | case Tegra::RenderTargetFormat::RGBA8_SNORM: |
| 437 | case Tegra::RenderTargetFormat::RG16_SNORM: | 448 | case Tegra::RenderTargetFormat::RG16_SNORM: |
| @@ -447,6 +458,7 @@ struct SurfaceParams { | |||
| 447 | case Tegra::RenderTargetFormat::R32_FLOAT: | 458 | case Tegra::RenderTargetFormat::R32_FLOAT: |
| 448 | return ComponentType::Float; | 459 | return ComponentType::Float; |
| 449 | case Tegra::RenderTargetFormat::RGBA32_UINT: | 460 | case Tegra::RenderTargetFormat::RGBA32_UINT: |
| 461 | case Tegra::RenderTargetFormat::RGBA16_UINT: | ||
| 450 | case Tegra::RenderTargetFormat::RG16_UINT: | 462 | case Tegra::RenderTargetFormat::RG16_UINT: |
| 451 | case Tegra::RenderTargetFormat::R8_UINT: | 463 | case Tegra::RenderTargetFormat::R8_UINT: |
| 452 | case Tegra::RenderTargetFormat::R16_UINT: | 464 | case Tegra::RenderTargetFormat::R16_UINT: |
diff --git a/src/video_core/renderer_opengl/maxwell_to_gl.h b/src/video_core/renderer_opengl/maxwell_to_gl.h index 5afd20dbe..679e5ceb2 100644 --- a/src/video_core/renderer_opengl/maxwell_to_gl.h +++ b/src/video_core/renderer_opengl/maxwell_to_gl.h | |||
| @@ -91,6 +91,8 @@ inline GLenum PrimitiveTopology(Maxwell::PrimitiveTopology topology) { | |||
| 91 | switch (topology) { | 91 | switch (topology) { |
| 92 | case Maxwell::PrimitiveTopology::Points: | 92 | case Maxwell::PrimitiveTopology::Points: |
| 93 | return GL_POINTS; | 93 | return GL_POINTS; |
| 94 | case Maxwell::PrimitiveTopology::LineStrip: | ||
| 95 | return GL_LINE_STRIP; | ||
| 94 | case Maxwell::PrimitiveTopology::Triangles: | 96 | case Maxwell::PrimitiveTopology::Triangles: |
| 95 | return GL_TRIANGLES; | 97 | return GL_TRIANGLES; |
| 96 | case Maxwell::PrimitiveTopology::TriangleStrip: | 98 | case Maxwell::PrimitiveTopology::TriangleStrip: |