summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-07-14 05:25:11 +0200
committerbunnei <bunneidev@gmail.com>2018-07-15 05:43:28 +0200
commite21190f47f2fdc0b24f1220700640ed854972ccc (patch)
treed924ea8185ab9a6e9da0421b5c56f2628a61418f /src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
parentMerge pull request #598 from bunnei/makedonecurrent (diff)
downloadyuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar.gz
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar.bz2
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar.lz
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar.xz
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.tar.zst
yuzu-e21190f47f2fdc0b24f1220700640ed854972ccc.zip
Diffstat (limited to '')
-rw-r--r--src/video_core/renderer_opengl/gl_rasterizer_cache.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
index 323ff7408..361a09626 100644
--- a/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
@@ -112,6 +112,8 @@ static constexpr std::array<FormatTuple, SurfaceParams::MaxPixelFormat> tex_form
{GL_DEPTH24_STENCIL8, GL_DEPTH_STENCIL, GL_UNSIGNED_INT_24_8, ComponentType::UNorm,
false}, // S8Z24
{GL_DEPTH_COMPONENT32F, GL_DEPTH_COMPONENT, GL_FLOAT, ComponentType::Float, false}, // Z32F
+ {GL_DEPTH_COMPONENT16, GL_DEPTH_COMPONENT, GL_UNSIGNED_SHORT, ComponentType::UNorm,
+ false}, // Z16
}};
static const FormatTuple& GetFormatTuple(PixelFormat pixel_format, ComponentType component_type) {
@@ -195,7 +197,7 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr),
MortonCopy<true, PixelFormat::DXT45>, MortonCopy<true, PixelFormat::DXN1>,
MortonCopy<true, PixelFormat::BC7U>, MortonCopy<true, PixelFormat::ASTC_2D_4X4>,
MortonCopy<true, PixelFormat::Z24S8>, MortonCopy<true, PixelFormat::S8Z24>,
- MortonCopy<true, PixelFormat::Z32F>,
+ MortonCopy<true, PixelFormat::Z32F>, MortonCopy<true, PixelFormat::Z16>,
};
static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr),
@@ -219,6 +221,7 @@ static constexpr std::array<void (*)(u32, u32, u32, u8*, Tegra::GPUVAddr),
MortonCopy<false, PixelFormat::Z24S8>,
MortonCopy<false, PixelFormat::S8Z24>,
MortonCopy<false, PixelFormat::Z32F>,
+ MortonCopy<false, PixelFormat::Z16>,
};
// Allocate an uninitialized texture of appropriate size and format for the surface