Skip to content
Snippets Groups Projects
Unverified Commit 704824d5 authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #814 from Subv/rt_r8

GPU: Allow the usage of R8 as a render target format.
parents 184324c2 4f574201
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,7 @@ enum class RenderTargetFormat : u32 { ...@@ -24,6 +24,7 @@ enum class RenderTargetFormat : u32 {
RGBA8_UNORM = 0xD5, RGBA8_UNORM = 0xD5,
RGBA8_SRGB = 0xD6, RGBA8_SRGB = 0xD6,
R11G11B10_FLOAT = 0xE0, R11G11B10_FLOAT = 0xE0,
R8_UNORM = 0xF3,
}; };
enum class DepthFormat : u32 { enum class DepthFormat : u32 {
......
...@@ -194,6 +194,8 @@ struct SurfaceParams { ...@@ -194,6 +194,8 @@ struct SurfaceParams {
return PixelFormat::R11FG11FB10F; return PixelFormat::R11FG11FB10F;
case Tegra::RenderTargetFormat::RGBA32_UINT: case Tegra::RenderTargetFormat::RGBA32_UINT:
return PixelFormat::RGBA32UI; return PixelFormat::RGBA32UI;
case Tegra::RenderTargetFormat::R8_UNORM:
return PixelFormat::R8;
default: default:
LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format)); LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
UNREACHABLE(); UNREACHABLE();
...@@ -351,6 +353,7 @@ struct SurfaceParams { ...@@ -351,6 +353,7 @@ struct SurfaceParams {
case Tegra::RenderTargetFormat::RGBA8_SRGB: case Tegra::RenderTargetFormat::RGBA8_SRGB:
case Tegra::RenderTargetFormat::BGRA8_UNORM: case Tegra::RenderTargetFormat::BGRA8_UNORM:
case Tegra::RenderTargetFormat::RGB10_A2_UNORM: case Tegra::RenderTargetFormat::RGB10_A2_UNORM:
case Tegra::RenderTargetFormat::R8_UNORM:
return ComponentType::UNorm; return ComponentType::UNorm;
case Tegra::RenderTargetFormat::RGBA16_FLOAT: case Tegra::RenderTargetFormat::RGBA16_FLOAT:
case Tegra::RenderTargetFormat::R11G11B10_FLOAT: case Tegra::RenderTargetFormat::R11G11B10_FLOAT:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment