diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/engines/fermi_2d.cpp | 4 | ||||
| -rw-r--r-- | src/video_core/gpu.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/gpu.h | 1 | ||||
| -rw-r--r-- | src/video_core/morton.cpp | 2 | ||||
| -rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/renderer_vulkan/maxwell_to_vk.cpp | 1 | ||||
| -rw-r--r-- | src/video_core/surface.cpp | 3 | ||||
| -rw-r--r-- | src/video_core/surface.h | 50 |
8 files changed, 39 insertions, 24 deletions
diff --git a/src/video_core/engines/fermi_2d.cpp b/src/video_core/engines/fermi_2d.cpp index 98a8b5337..7ff44f06d 100644 --- a/src/video_core/engines/fermi_2d.cpp +++ b/src/video_core/engines/fermi_2d.cpp | |||
| @@ -29,8 +29,8 @@ void Fermi2D::CallMethod(const GPU::MethodCall& method_call) { | |||
| 29 | } | 29 | } |
| 30 | 30 | ||
| 31 | void Fermi2D::HandleSurfaceCopy() { | 31 | void Fermi2D::HandleSurfaceCopy() { |
| 32 | LOG_WARNING(HW_GPU, "Requested a surface copy with operation {}", | 32 | LOG_DEBUG(HW_GPU, "Requested a surface copy with operation {}", |
| 33 | static_cast<u32>(regs.operation)); | 33 | static_cast<u32>(regs.operation)); |
| 34 | 34 | ||
| 35 | // TODO(Subv): Only raw copies are implemented. | 35 | // TODO(Subv): Only raw copies are implemented. |
| 36 | ASSERT(regs.operation == Operation::SrcCopy); | 36 | ASSERT(regs.operation == Operation::SrcCopy); |
diff --git a/src/video_core/gpu.cpp b/src/video_core/gpu.cpp index 2c47541cb..76cfe8107 100644 --- a/src/video_core/gpu.cpp +++ b/src/video_core/gpu.cpp | |||
| @@ -122,6 +122,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) { | |||
| 122 | case RenderTargetFormat::RGBA16_UINT: | 122 | case RenderTargetFormat::RGBA16_UINT: |
| 123 | case RenderTargetFormat::RGBA16_UNORM: | 123 | case RenderTargetFormat::RGBA16_UNORM: |
| 124 | case RenderTargetFormat::RGBA16_FLOAT: | 124 | case RenderTargetFormat::RGBA16_FLOAT: |
| 125 | case RenderTargetFormat::RGBX16_FLOAT: | ||
| 125 | case RenderTargetFormat::RG32_FLOAT: | 126 | case RenderTargetFormat::RG32_FLOAT: |
| 126 | case RenderTargetFormat::RG32_UINT: | 127 | case RenderTargetFormat::RG32_UINT: |
| 127 | return 8; | 128 | return 8; |
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h index 78bc0601a..29fa8e95b 100644 --- a/src/video_core/gpu.h +++ b/src/video_core/gpu.h | |||
| @@ -42,6 +42,7 @@ enum class RenderTargetFormat : u32 { | |||
| 42 | RGBA16_FLOAT = 0xCA, | 42 | RGBA16_FLOAT = 0xCA, |
| 43 | RG32_FLOAT = 0xCB, | 43 | RG32_FLOAT = 0xCB, |
| 44 | RG32_UINT = 0xCD, | 44 | RG32_UINT = 0xCD, |
| 45 | RGBX16_FLOAT = 0xCE, | ||
| 45 | BGRA8_UNORM = 0xCF, | 46 | BGRA8_UNORM = 0xCF, |
| 46 | BGRA8_SRGB = 0xD0, | 47 | BGRA8_SRGB = 0xD0, |
| 47 | RGB10_A2_UNORM = 0xD1, | 48 | RGB10_A2_UNORM = 0xD1, |
diff --git a/src/video_core/morton.cpp b/src/video_core/morton.cpp index 084f85e67..ab71870ab 100644 --- a/src/video_core/morton.cpp +++ b/src/video_core/morton.cpp | |||
| @@ -83,6 +83,7 @@ static constexpr ConversionArray morton_to_linear_fns = { | |||
| 83 | MortonCopy<true, PixelFormat::RG8U>, | 83 | MortonCopy<true, PixelFormat::RG8U>, |
| 84 | MortonCopy<true, PixelFormat::RG8S>, | 84 | MortonCopy<true, PixelFormat::RG8S>, |
| 85 | MortonCopy<true, PixelFormat::RG32UI>, | 85 | MortonCopy<true, PixelFormat::RG32UI>, |
| 86 | MortonCopy<true, PixelFormat::RGBX16F>, | ||
| 86 | MortonCopy<true, PixelFormat::R32UI>, | 87 | MortonCopy<true, PixelFormat::R32UI>, |
| 87 | MortonCopy<true, PixelFormat::ASTC_2D_8X8>, | 88 | MortonCopy<true, PixelFormat::ASTC_2D_8X8>, |
| 88 | MortonCopy<true, PixelFormat::ASTC_2D_8X5>, | 89 | MortonCopy<true, PixelFormat::ASTC_2D_8X5>, |
| @@ -151,6 +152,7 @@ static constexpr ConversionArray linear_to_morton_fns = { | |||
| 151 | MortonCopy<false, PixelFormat::RG8U>, | 152 | MortonCopy<false, PixelFormat::RG8U>, |
| 152 | MortonCopy<false, PixelFormat::RG8S>, | 153 | MortonCopy<false, PixelFormat::RG8S>, |
| 153 | MortonCopy<false, PixelFormat::RG32UI>, | 154 | MortonCopy<false, PixelFormat::RG32UI>, |
| 155 | MortonCopy<false, PixelFormat::RGBX16F>, | ||
| 154 | MortonCopy<false, PixelFormat::R32UI>, | 156 | MortonCopy<false, PixelFormat::R32UI>, |
| 155 | nullptr, | 157 | nullptr, |
| 156 | nullptr, | 158 | nullptr, |
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 4f135fe03..173b76c4e 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp | |||
| @@ -97,6 +97,7 @@ constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex_format | |||
| 97 | {GL_RG8, GL_RG, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // RG8U | 97 | {GL_RG8, GL_RG, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // RG8U |
| 98 | {GL_RG8, GL_RG, GL_BYTE, ComponentType::SNorm, false}, // RG8S | 98 | {GL_RG8, GL_RG, GL_BYTE, ComponentType::SNorm, false}, // RG8S |
| 99 | {GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // RG32UI | 99 | {GL_RG32UI, GL_RG_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // RG32UI |
| 100 | {GL_RGB16F, GL_RGBA16, GL_HALF_FLOAT, ComponentType::Float, false}, // RGBX16F | ||
| 100 | {GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // R32UI | 101 | {GL_R32UI, GL_RED_INTEGER, GL_UNSIGNED_INT, ComponentType::UInt, false}, // R32UI |
| 101 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X8 | 102 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X8 |
| 102 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X5 | 103 | {GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE, ComponentType::UNorm, false}, // ASTC_2D_8X5 |
diff --git a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp index 0bbbf6851..3c5acda3e 100644 --- a/src/video_core/renderer_vulkan/maxwell_to_vk.cpp +++ b/src/video_core/renderer_vulkan/maxwell_to_vk.cpp | |||
| @@ -143,6 +143,7 @@ static constexpr std::array<FormatTuple, VideoCore::Surface::MaxPixelFormat> tex | |||
| 143 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG8U | 143 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG8U |
| 144 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG8S | 144 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG8S |
| 145 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG32UI | 145 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RG32UI |
| 146 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // RGBX16F | ||
| 146 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // R32UI | 147 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // R32UI |
| 147 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // ASTC_2D_8X8 | 148 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // ASTC_2D_8X8 |
| 148 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // ASTC_2D_8X5 | 149 | {vk::Format::eUndefined, ComponentType::Invalid, false}, // ASTC_2D_8X5 |
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index 53d0142cb..250afc6d6 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp | |||
| @@ -159,6 +159,8 @@ PixelFormat PixelFormatFromRenderTargetFormat(Tegra::RenderTargetFormat format) | |||
| 159 | return PixelFormat::R32UI; | 159 | return PixelFormat::R32UI; |
| 160 | case Tegra::RenderTargetFormat::RG32_UINT: | 160 | case Tegra::RenderTargetFormat::RG32_UINT: |
| 161 | return PixelFormat::RG32UI; | 161 | return PixelFormat::RG32UI; |
| 162 | case Tegra::RenderTargetFormat::RGBX16_FLOAT: | ||
| 163 | return PixelFormat::RGBX16F; | ||
| 162 | default: | 164 | default: |
| 163 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); | 165 | LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); |
| 164 | UNREACHABLE(); | 166 | UNREACHABLE(); |
| @@ -415,6 +417,7 @@ ComponentType ComponentTypeFromRenderTarget(Tegra::RenderTargetFormat format) { | |||
| 415 | case Tegra::RenderTargetFormat::RG8_SNORM: | 417 | case Tegra::RenderTargetFormat::RG8_SNORM: |
| 416 | return ComponentType::SNorm; | 418 | return ComponentType::SNorm; |
| 417 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: | 419 | case Tegra::RenderTargetFormat::RGBA16_FLOAT: |
| 420 | case Tegra::RenderTargetFormat::RGBX16_FLOAT: | ||
| 418 | case Tegra::RenderTargetFormat::R11G11B10_FLOAT: | 421 | case Tegra::RenderTargetFormat::R11G11B10_FLOAT: |
| 419 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: | 422 | case Tegra::RenderTargetFormat::RGBA32_FLOAT: |
| 420 | case Tegra::RenderTargetFormat::RG32_FLOAT: | 423 | case Tegra::RenderTargetFormat::RG32_FLOAT: |
diff --git a/src/video_core/surface.h b/src/video_core/surface.h index 19268b7cd..1e1c432a5 100644 --- a/src/video_core/surface.h +++ b/src/video_core/surface.h | |||
| @@ -57,36 +57,37 @@ enum class PixelFormat { | |||
| 57 | RG8U = 39, | 57 | RG8U = 39, |
| 58 | RG8S = 40, | 58 | RG8S = 40, |
| 59 | RG32UI = 41, | 59 | RG32UI = 41, |
| 60 | R32UI = 42, | 60 | RGBX16F = 42, |
| 61 | ASTC_2D_8X8 = 43, | 61 | R32UI = 43, |
| 62 | ASTC_2D_8X5 = 44, | 62 | ASTC_2D_8X8 = 44, |
| 63 | ASTC_2D_5X4 = 45, | 63 | ASTC_2D_8X5 = 45, |
| 64 | BGRA8_SRGB = 46, | 64 | ASTC_2D_5X4 = 46, |
| 65 | DXT1_SRGB = 47, | 65 | BGRA8_SRGB = 47, |
| 66 | DXT23_SRGB = 48, | 66 | DXT1_SRGB = 48, |
| 67 | DXT45_SRGB = 49, | 67 | DXT23_SRGB = 49, |
| 68 | BC7U_SRGB = 50, | 68 | DXT45_SRGB = 50, |
| 69 | ASTC_2D_4X4_SRGB = 51, | 69 | BC7U_SRGB = 51, |
| 70 | ASTC_2D_8X8_SRGB = 52, | 70 | ASTC_2D_4X4_SRGB = 52, |
| 71 | ASTC_2D_8X5_SRGB = 53, | 71 | ASTC_2D_8X8_SRGB = 53, |
| 72 | ASTC_2D_5X4_SRGB = 54, | 72 | ASTC_2D_8X5_SRGB = 54, |
| 73 | ASTC_2D_5X5 = 55, | 73 | ASTC_2D_5X4_SRGB = 55, |
| 74 | ASTC_2D_5X5_SRGB = 56, | 74 | ASTC_2D_5X5 = 56, |
| 75 | ASTC_2D_10X8 = 57, | 75 | ASTC_2D_5X5_SRGB = 57, |
| 76 | ASTC_2D_10X8_SRGB = 58, | 76 | ASTC_2D_10X8 = 58, |
| 77 | ASTC_2D_10X8_SRGB = 59, | ||
| 77 | 78 | ||
| 78 | MaxColorFormat, | 79 | MaxColorFormat, |
| 79 | 80 | ||
| 80 | // Depth formats | 81 | // Depth formats |
| 81 | Z32F = 59, | 82 | Z32F = 60, |
| 82 | Z16 = 60, | 83 | Z16 = 61, |
| 83 | 84 | ||
| 84 | MaxDepthFormat, | 85 | MaxDepthFormat, |
| 85 | 86 | ||
| 86 | // DepthStencil formats | 87 | // DepthStencil formats |
| 87 | Z24S8 = 61, | 88 | Z24S8 = 62, |
| 88 | S8Z24 = 62, | 89 | S8Z24 = 63, |
| 89 | Z32FS8 = 63, | 90 | Z32FS8 = 64, |
| 90 | 91 | ||
| 91 | MaxDepthStencilFormat, | 92 | MaxDepthStencilFormat, |
| 92 | 93 | ||
| @@ -166,6 +167,7 @@ constexpr std::array<u32, MaxPixelFormat> compression_factor_shift_table = {{ | |||
| 166 | 0, // RG8U | 167 | 0, // RG8U |
| 167 | 0, // RG8S | 168 | 0, // RG8S |
| 168 | 0, // RG32UI | 169 | 0, // RG32UI |
| 170 | 0, // RGBX16F | ||
| 169 | 0, // R32UI | 171 | 0, // R32UI |
| 170 | 2, // ASTC_2D_8X8 | 172 | 2, // ASTC_2D_8X8 |
| 171 | 2, // ASTC_2D_8X5 | 173 | 2, // ASTC_2D_8X5 |
| @@ -249,6 +251,7 @@ constexpr std::array<u32, MaxPixelFormat> block_width_table = {{ | |||
| 249 | 1, // RG8U | 251 | 1, // RG8U |
| 250 | 1, // RG8S | 252 | 1, // RG8S |
| 251 | 1, // RG32UI | 253 | 1, // RG32UI |
| 254 | 1, // RGBX16F | ||
| 252 | 1, // R32UI | 255 | 1, // R32UI |
| 253 | 8, // ASTC_2D_8X8 | 256 | 8, // ASTC_2D_8X8 |
| 254 | 8, // ASTC_2D_8X5 | 257 | 8, // ASTC_2D_8X5 |
| @@ -324,6 +327,7 @@ constexpr std::array<u32, MaxPixelFormat> block_height_table = {{ | |||
| 324 | 1, // RG8U | 327 | 1, // RG8U |
| 325 | 1, // RG8S | 328 | 1, // RG8S |
| 326 | 1, // RG32UI | 329 | 1, // RG32UI |
| 330 | 1, // RGBX16F | ||
| 327 | 1, // R32UI | 331 | 1, // R32UI |
| 328 | 8, // ASTC_2D_8X8 | 332 | 8, // ASTC_2D_8X8 |
| 329 | 5, // ASTC_2D_8X5 | 333 | 5, // ASTC_2D_8X5 |
| @@ -399,6 +403,7 @@ constexpr std::array<u32, MaxPixelFormat> bpp_table = {{ | |||
| 399 | 16, // RG8U | 403 | 16, // RG8U |
| 400 | 16, // RG8S | 404 | 16, // RG8S |
| 401 | 64, // RG32UI | 405 | 64, // RG32UI |
| 406 | 64, // RGBX16F | ||
| 402 | 32, // R32UI | 407 | 32, // R32UI |
| 403 | 128, // ASTC_2D_8X8 | 408 | 128, // ASTC_2D_8X8 |
| 404 | 128, // ASTC_2D_8X5 | 409 | 128, // ASTC_2D_8X5 |
| @@ -489,6 +494,7 @@ constexpr std::array<SurfaceCompression, MaxPixelFormat> compression_type_table | |||
| 489 | SurfaceCompression::None, // RG8U | 494 | SurfaceCompression::None, // RG8U |
| 490 | SurfaceCompression::None, // RG8S | 495 | SurfaceCompression::None, // RG8S |
| 491 | SurfaceCompression::None, // RG32UI | 496 | SurfaceCompression::None, // RG32UI |
| 497 | SurfaceCompression::None, // RGBX16F | ||
| 492 | SurfaceCompression::None, // R32UI | 498 | SurfaceCompression::None, // R32UI |
| 493 | SurfaceCompression::Converted, // ASTC_2D_8X8 | 499 | SurfaceCompression::Converted, // ASTC_2D_8X8 |
| 494 | SurfaceCompression::Converted, // ASTC_2D_8X5 | 500 | SurfaceCompression::Converted, // ASTC_2D_8X5 |