From db3c5c33c436efed51fc26b0068bc1fa24b3239d Mon Sep 17 00:00:00 2001 From: Billy Laws Date: Fri, 11 Nov 2022 21:26:44 +0000 Subject: [PATCH] Clamp depth bounds into 0-1 range --- .../cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp index 4e11c34f..aae21195 100644 --- a/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp +++ b/app/src/main/cpp/skyline/gpu/interconnect/maxwell_3d/active_state.cpp @@ -346,7 +346,7 @@ namespace skyline::gpu::interconnect::maxwell3d { DepthBoundsState::DepthBoundsState(dirty::Handle dirtyHandle, DirtyManager &manager, const EngineRegisters &engine) : engine{manager, dirtyHandle, engine} {} void DepthBoundsState::Flush(InterconnectContext &ctx, StateUpdateBuilder &builder) { - builder.SetDepthBounds(engine->depthBoundsMin, engine->depthBoundsMax); + builder.SetDepthBounds(std::clamp(engine->depthBoundsMin, 0.0f, 1.0f), std::clamp(engine->depthBoundsMax, 0.0f, 1.0f)); } /* Stencil Values */