summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Marcec <dmarcecguzman@gmail.com>2020-07-21 15:06:18 +0200
committerDavid Marcec <dmarcecguzman@gmail.com>2020-07-21 15:06:18 +0200
commit8abb31a19df4e4c2ca282f5415a6ad916fc50ed8 (patch)
treecbe2773545afb6a604d49bac53a25b9609a76c0a
parentMerge pull request #4359 from ReinUsesLisp/clamp-shared (diff)
downloadyuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar.gz
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar.bz2
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar.lz
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar.xz
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.tar.zst
yuzu-8abb31a19df4e4c2ca282f5415a6ad916fc50ed8.zip
Diffstat (limited to '')
-rw-r--r--src/core/hle/service/vi/vi.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp
index ea7b4ae13..b9dcd38e7 100644
--- a/src/core/hle/service/vi/vi.cpp
+++ b/src/core/hle/service/vi/vi.cpp
@@ -1199,6 +1199,23 @@ private:
}
}
+ void GetIndirectLayerImageRequiredMemoryInfo(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const auto width = rp.Pop<u64>();
+ const auto height = rp.Pop<u64>();
+ LOG_DEBUG(Service_VI, "called width={}, height={}", width, height);
+
+ constexpr std::size_t base_size = 0x20000;
+ constexpr std::size_t alignment = 0x1000;
+ const auto texture_size = width * height * 4;
+ const auto out_size = (texture_size + base_size - 1) / base_size * base_size;
+
+ IPC::ResponseBuilder rb{ctx, 6};
+ rb.Push(RESULT_SUCCESS);
+ rb.Push(out_size);
+ rb.Push(alignment);
+ }
+
static ResultVal<ConvertedScaleMode> ConvertScalingModeImpl(NintendoScaleMode mode) {
switch (mode) {
case NintendoScaleMode::None:
@@ -1243,7 +1260,8 @@ IApplicationDisplayService::IApplicationDisplayService(
{2102, &IApplicationDisplayService::ConvertScalingMode, "ConvertScalingMode"},
{2450, nullptr, "GetIndirectLayerImageMap"},
{2451, nullptr, "GetIndirectLayerImageCropMap"},
- {2460, nullptr, "GetIndirectLayerImageRequiredMemoryInfo"},
+ {2460, &IApplicationDisplayService::GetIndirectLayerImageRequiredMemoryInfo,
+ "GetIndirectLayerImageRequiredMemoryInfo"},
{5202, &IApplicationDisplayService::GetDisplayVsyncEvent, "GetDisplayVsyncEvent"},
{5203, nullptr, "GetDisplayVsyncEventForDebug"},
};