GPU: Allow using R16F as a render target format.

This commit is contained in:
Subv 2018-07-25 23:19:15 -05:00
parent 57cd80c410
commit f85cff0f48
2 changed files with 4 additions and 1 deletions

View file

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

View file

@ -230,7 +230,8 @@ struct SurfaceParams {
return PixelFormat::RG16; return PixelFormat::RG16;
case Tegra::RenderTargetFormat::RG16_SNORM: case Tegra::RenderTargetFormat::RG16_SNORM:
return PixelFormat::RG16S; return PixelFormat::RG16S;
case Tegra::RenderTargetFormat::R16_FLOAT:
return PixelFormat::R16F;
default: default:
LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
UNREACHABLE(); UNREACHABLE();
@ -437,6 +438,7 @@ struct SurfaceParams {
case Tegra::RenderTargetFormat::RGBA32_FLOAT: case Tegra::RenderTargetFormat::RGBA32_FLOAT:
case Tegra::RenderTargetFormat::RG32_FLOAT: case Tegra::RenderTargetFormat::RG32_FLOAT:
case Tegra::RenderTargetFormat::RG16_FLOAT: case Tegra::RenderTargetFormat::RG16_FLOAT:
case Tegra::RenderTargetFormat::R16_FLOAT:
return ComponentType::Float; return ComponentType::Float;
case Tegra::RenderTargetFormat::RGBA32_UINT: case Tegra::RenderTargetFormat::RGBA32_UINT:
case Tegra::RenderTargetFormat::RG16_UINT: case Tegra::RenderTargetFormat::RG16_UINT: