From 3be30e68c36f289af1f71a99729a96413ac78400 Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Sat, 22 Jan 2022 15:01:42 +0000 Subject: [PATCH] Add D16 depth format and ZF32 TIC format Used by One Piece Unlimited World Red --- app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h | 3 +++ app/src/main/cpp/skyline/gpu/texture/format.h | 1 + 2 files changed, 4 insertions(+) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h index 84cd1efd..bf6be23a 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h +++ b/app/src/main/cpp/skyline/gpu/interconnect/graphics_context.h @@ -247,6 +247,8 @@ namespace skyline::gpu::interconnect { depthRenderTarget.guest.format = [&]() -> texture::Format { using MaxwellDepthRtFormat = maxwell3d::DepthRtFormat; switch (format) { + case MaxwellDepthRtFormat::D16Unorm: + return format::D16Unorm; case MaxwellDepthRtFormat::D32Float: return format::D32Float; case MaxwellDepthRtFormat::S8D24Unorm: @@ -1691,6 +1693,7 @@ namespace skyline::gpu::interconnect { TIC_FORMAT_CASE_ST(Dxn1, Bc4111R, Unorm, OneFloat, OneFloat, OneFloat, R); TIC_FORMAT_CASE_ST(Dxn1, Bc4RRR1, Unorm, R, R, R, OneFloat); TIC_FORMAT_CASE_ST(BC7U, Bc7, Unorm, R, G, B, A); + TIC_FORMAT_CASE_ST(ZF32, D32, Float, R, R, R, OneFloat); default: throw exception("Cannot translate TIC format: 0x{:X}", static_cast(format.Raw())); diff --git a/app/src/main/cpp/skyline/gpu/texture/format.h b/app/src/main/cpp/skyline/gpu/texture/format.h index 13639fbf..be336eab 100644 --- a/app/src/main/cpp/skyline/gpu/texture/format.h +++ b/app/src/main/cpp/skyline/gpu/texture/format.h @@ -144,6 +144,7 @@ namespace skyline::gpu::format { ); // Depth/Stencil Formats + FORMAT(D16Unorm, 16, eD16Unorm, vka::eDepth); FORMAT(D32Float, 32, eD32Sfloat, vka::eDepth); FORMAT(S8D24Unorm, 32, eD24UnormS8Uint, .vkAspect = { vka::eStencil | vka::eDepth