From 8e6e55d6f849c42ac3a1641e91d85ce8613dbc58 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Sun, 15 Mar 2020 20:50:20 -0300 Subject: [PATCH] shader/shader_ir: Fix clip distance usage stores --- src/video_core/shader/shader_ir.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/video_core/shader/shader_ir.cpp b/src/video_core/shader/shader_ir.cpp index bc75d400e..32bb28452 100644 --- a/src/video_core/shader/shader_ir.cpp +++ b/src/video_core/shader/shader_ir.cpp @@ -135,8 +135,7 @@ Node ShaderIR::GetOutputAttribute(Attribute::Index index, u64 element, Node buff break; case Attribute::Index::ClipDistances0123: case Attribute::Index::ClipDistances4567: { - const auto clip_index = - static_cast((index == Attribute::Index::ClipDistances4567 ? 1 : 0) + element); + const u64 clip_index = (index == Attribute::Index::ClipDistances4567 ? 4 : 0) + element; used_clip_distances.at(clip_index) = true; break; }