mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-15 11:22:44 +01:00
video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMD
This commit is contained in:
parent
7fab7b829c
commit
0c8aeb09d2
1 changed files with 8 additions and 1 deletions
|
@ -69,10 +69,17 @@ 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);
|
||||
if (regs.screen_y_control.y_negate) {
|
||||
bool y_negate = regs.screen_y_control.y_negate;
|
||||
|
||||
if (!device.IsNvViewportSwizzleSupported()) {
|
||||
y_negate = y_negate != (src.swizzle.y == Maxwell::ViewportSwizzle::NegativeY);
|
||||
}
|
||||
|
||||
if (y_negate) {
|
||||
y += height;
|
||||
height = -height;
|
||||
}
|
||||
|
||||
const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f;
|
||||
VkViewport viewport{
|
||||
.x = x,
|
||||
|
|
Loading…
Reference in a new issue