Compare commits

...

4 Commits

Author SHA1 Message Date
7297cc1ad5 Android #151 2023-12-05 00:57:39 +00:00
7827ea76a3 Merge PR 12271 2023-12-05 00:57:39 +00:00
90e87c40e8 Merge pull request #12235 from liamwhite/flip-clip
renderer_vulkan: adjust window origin and swizzle independently
2023-12-03 21:59:11 -05:00
e7dd968ac4 renderer_vulkan: adjust window origin and swizzle independently 2023-11-30 12:33:26 -05:00
3 changed files with 21 additions and 4 deletions

View File

@ -1,3 +1,12 @@
| Pull Request | Commit | Title | Author | Merged? |
|----|----|----|----|----|
| [12271](https://github.com/yuzu-emu/yuzu//pull/12271) | [`9de99839b`](https://github.com/yuzu-emu/yuzu//pull/12271/files) | nce: fix pre-text patch for single modules | [liamwhite](https://github.com/liamwhite/) | Yes |
End of merge log. You can find the original README.md below the break.
-----
<!--
SPDX-FileCopyrightText: 2018 yuzu Emulator Project
SPDX-License-Identifier: GPL-2.0-or-later

View File

@ -28,6 +28,8 @@ Patcher::~Patcher() = default;
void Patcher::PatchText(const Kernel::PhysicalMemory& program_image,
const Kernel::CodeSet::Segment& code) {
// Branch to the first instruction of the module.
this->BranchToModule(0);
// Write save context helper function.
c.l(m_save_context);

View File

@ -75,14 +75,20 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
const float width = conv(src.scale_x * 2.0f);
float y = conv(src.translate_y - src.scale_y);
float height = conv(src.scale_y * 2.0f);
bool y_negate = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
if (!device.IsNvViewportSwizzleSupported()) {
y_negate = y_negate != (src.swizzle.y == Maxwell::ViewportSwizzle::NegativeY);
const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
const bool y_negate = !device.IsNvViewportSwizzleSupported() &&
src.swizzle.y == Maxwell::ViewportSwizzle::NegativeY;
if (lower_left) {
// Flip by surface clip height
y += conv(static_cast<f32>(regs.surface_clip.height));
height = -height;
}
if (y_negate) {
y += conv(static_cast<f32>(regs.surface_clip.height));
// Flip by viewport height
y += height;
height = -height;
}