Clamp depth bounds into 0-1 range

This commit is contained in:
Billy Laws 2022-11-11 21:26:44 +00:00
parent e1bbd521d9
commit db3c5c33c4

View File

@ -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 */