Skip to content
Snippets Groups Projects
Unverified Commit c881a67d authored by bunnei's avatar bunnei Committed by GitHub
Browse files

Merge pull request #8809 from german77/finally_is_fixed

video_core: vulkan: rasterizer: Workaround on viewport swizzle on AMD
parents d1ef4b2b 0c8aeb09
No related branches found
No related tags found
No related merge requests found
...@@ -69,10 +69,17 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in ...@@ -69,10 +69,17 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
const float width = conv(src.scale_x * 2.0f); const float width = conv(src.scale_x * 2.0f);
float y = conv(src.translate_y - src.scale_y); float y = conv(src.translate_y - src.scale_y);
float height = conv(src.scale_y * 2.0f); 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; y += height;
height = -height; height = -height;
} }
const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f; const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f;
VkViewport viewport{ VkViewport viewport{
.x = x, .x = x,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment