summaryrefslogtreecommitdiffstats
path: root/src/video_core/texture_cache/surface_params.cpp
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2020-07-01 07:28:53 +0200
committerReinUsesLisp <reinuseslisp@airmail.cc>2020-07-13 06:44:23 +0200
commitfbc232426d8ff739b0028fb5b41fb5124f7e1792 (patch)
treef3e99246a2b398151b409a1d331f27780a9a28ef /src/video_core/texture_cache/surface_params.cpp
parentvideo_core: Fix DXT4 and RGB565 (diff)
downloadyuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar.gz
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar.bz2
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar.lz
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar.xz
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.tar.zst
yuzu-fbc232426d8ff739b0028fb5b41fb5124f7e1792.zip
Diffstat (limited to 'src/video_core/texture_cache/surface_params.cpp')
-rw-r--r--src/video_core/texture_cache/surface_params.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/video_core/texture_cache/surface_params.cpp b/src/video_core/texture_cache/surface_params.cpp
index 0b2b2b8c4..1803fce15 100644
--- a/src/video_core/texture_cache/surface_params.cpp
+++ b/src/video_core/texture_cache/surface_params.cpp
@@ -83,12 +83,12 @@ SurfaceParams SurfaceParams::CreateForTexture(const FormatLookupTable& lookup_ta
params.type = GetFormatType(params.pixel_format);
if (entry.is_shadow && params.type == SurfaceType::ColorTexture) {
switch (params.pixel_format) {
- case PixelFormat::R16U:
- case PixelFormat::R16F:
- params.pixel_format = PixelFormat::Z16;
+ case PixelFormat::R16_UNORM:
+ case PixelFormat::R16_FLOAT:
+ params.pixel_format = PixelFormat::D16_UNORM;
break;
- case PixelFormat::R32F:
- params.pixel_format = PixelFormat::Z32F;
+ case PixelFormat::R32_FLOAT:
+ params.pixel_format = PixelFormat::D32_FLOAT;
break;
default:
UNIMPLEMENTED_MSG("Unimplemented shadow convert format: {}",
@@ -195,8 +195,8 @@ SurfaceParams SurfaceParams::CreateForFramebuffer(Core::System& system, std::siz
SurfaceParams params;
params.is_tiled =
config.memory_layout.type == Tegra::Engines::Maxwell3D::Regs::InvMemoryLayout::BlockLinear;
- params.srgb_conversion = config.format == Tegra::RenderTargetFormat::BGRA8_SRGB ||
- config.format == Tegra::RenderTargetFormat::RGBA8_SRGB;
+ params.srgb_conversion = config.format == Tegra::RenderTargetFormat::B8G8R8A8_SRGB ||
+ config.format == Tegra::RenderTargetFormat::A8B8G8R8_SRGB;
params.block_width = config.memory_layout.block_width;
params.block_height = config.memory_layout.block_height;
params.block_depth = config.memory_layout.block_depth;
@@ -235,8 +235,8 @@ SurfaceParams SurfaceParams::CreateForFermiCopySurface(
const Tegra::Engines::Fermi2D::Regs::Surface& config) {
SurfaceParams params{};
params.is_tiled = !config.linear;
- params.srgb_conversion = config.format == Tegra::RenderTargetFormat::BGRA8_SRGB ||
- config.format == Tegra::RenderTargetFormat::RGBA8_SRGB;
+ params.srgb_conversion = config.format == Tegra::RenderTargetFormat::B8G8R8A8_SRGB ||
+ config.format == Tegra::RenderTargetFormat::A8B8G8R8_SRGB;
params.block_width = params.is_tiled ? std::min(config.BlockWidth(), 5U) : 0,
params.block_height = params.is_tiled ? std::min(config.BlockHeight(), 5U) : 0,
params.block_depth = params.is_tiled ? std::min(config.BlockDepth(), 5U) : 0,