summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-25 16:32:18 +0200
committerGitHub <noreply@github.com>2018-07-25 16:32:18 +0200
commit704824d50a2a99ed44e80bd37dfdc6e84ac91fe2 (patch)
treebb938542bf0e534f51e85e91ba04dd38541754fb
parentMerge pull request #818 from MerryMage/dynarmic (diff)
parentGPU: Allow the usage of R8 as a render target format. (diff)
downloadyuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar.gz
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar.bz2
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar.lz
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar.xz
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.tar.zst
yuzu-704824d50a2a99ed44e80bd37dfdc6e84ac91fe2.zip
-rw-r--r--src/video_core/gpu.h1
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/src/video_core/gpu.h b/src/video_core/gpu.h
index 58501ca8b..ba7b81571 100644
--- a/src/video_core/gpu.h
+++ b/src/video_core/gpu.h
@@ -24,6 +24,7 @@ enum class RenderTargetFormat : u32 {
RGBA8_UNORM = 0xD5,
RGBA8_SRGB = 0xD6,
R11G11B10_FLOAT = 0xE0,
+ R8_UNORM = 0xF3,
};
enum class DepthFormat : u32 {
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.h b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
index e1d3670d9..ae449ee25 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.h
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.h
@@ -194,6 +194,8 @@ struct SurfaceParams {
return PixelFormat::R11FG11FB10F;
case Tegra::RenderTargetFormat::RGBA32_UINT:
return PixelFormat::RGBA32UI;
+ case Tegra::RenderTargetFormat::R8_UNORM:
+ return PixelFormat::R8;
default:
LOG_CRITICAL(HW_GPU, "Unimplemented format={}", static_cast<u32>(format));
UNREACHABLE();
@@ -351,6 +353,7 @@ struct SurfaceParams {
case Tegra::RenderTargetFormat::RGBA8_SRGB:
case Tegra::RenderTargetFormat::BGRA8_UNORM:
case Tegra::RenderTargetFormat::RGB10_A2_UNORM:
+ case Tegra::RenderTargetFormat::R8_UNORM:
return ComponentType::UNorm;
case Tegra::RenderTargetFormat::RGBA16_FLOAT:
case Tegra::RenderTargetFormat::R11G11B10_FLOAT: