Browse Source

Test

pull/3090/head
MaranBr 2 months ago
parent
commit
b5fa170722
  1. 10
      src/video_core/renderer_vulkan/vk_rasterizer.cpp

10
src/video_core/renderer_vulkan/vk_rasterizer.cpp

@ -74,16 +74,16 @@ VkViewport GetViewportState(const Device& device, const Maxwell& regs, size_t in
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);
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) {
y += conv(static_cast<f32>(regs.surface_clip.height));
height = -height;
}
const bool lower_left = regs.window_origin.mode != Maxwell::WindowOrigin::Mode::UpperLeft;
if (y_negate) {
y += height;
height = -height;
}
if (lower_left) {
y += conv(static_cast<f32>(regs.surface_clip.height));
height = -height;
}
const float reduce_z = regs.depth_mode == Maxwell::DepthMode::MinusOneToOne ? 1.0f : 0.0f;
VkViewport viewport{
.x = x,

Loading…
Cancel
Save