forked from ShuriZma/suyu
1
0
Fork 0

Merge pull request #885 from greggameplayer/R32-Float

Implement R32_FLOAT RenderTargetFormat
This commit is contained in:
bunnei 2018-08-01 11:51:59 -04:00 committed by GitHub
commit 99a1d7440d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,7 @@ u32 RenderTargetBytesPerPixel(RenderTargetFormat format) {
case RenderTargetFormat::RGBA8_UNORM:
case RenderTargetFormat::RGB10_A2_UNORM:
case RenderTargetFormat::BGRA8_UNORM:
case RenderTargetFormat::R32_FLOAT:
return 4;
default:
UNIMPLEMENTED_MSG("Unimplemented render target format {}", static_cast<u32>(format));

View File

@ -29,6 +29,7 @@ enum class RenderTargetFormat : u32 {
RG16_UINT = 0xDD,
RG16_FLOAT = 0xDE,
R11G11B10_FLOAT = 0xE0,
R32_FLOAT = 0xE5,
R16_FLOAT = 0xF2,
R8_UNORM = 0xF3,
};

View File

@ -232,6 +232,8 @@ struct SurfaceParams {
return PixelFormat::RG16S;
case Tegra::RenderTargetFormat::R16_FLOAT:
return PixelFormat::R16F;
case Tegra::RenderTargetFormat::R32_FLOAT:
return PixelFormat::R32F;
default:
LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
UNREACHABLE();
@ -439,6 +441,7 @@ struct SurfaceParams {
case Tegra::RenderTargetFormat::RG32_FLOAT:
case Tegra::RenderTargetFormat::RG16_FLOAT:
case Tegra::RenderTargetFormat::R16_FLOAT:
case Tegra::RenderTargetFormat::R32_FLOAT:
return ComponentType::Float;
case Tegra::RenderTargetFormat::RGBA32_UINT:
case Tegra::RenderTargetFormat::RG16_UINT: