summaryrefslogtreecommitdiff
path: root/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
diff options
context:
space:
mode:
authorGravatar ameerj2021-04-24 00:49:14 -0400
committerGravatar ameerj2021-07-22 21:51:29 -0400
commit20e86fd61512626e267824c1a5469084c2d36c7a (patch)
treef6bae33e4025d744cfeeab3806e62e61a44f108c /src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
parentvk_compute_pipeline: Fix index comparison oversight on compute texture buffers (diff)
downloadyuzu-20e86fd61512626e267824c1a5469084c2d36c7a.tar.gz
yuzu-20e86fd61512626e267824c1a5469084c2d36c7a.tar.xz
yuzu-20e86fd61512626e267824c1a5469084c2d36c7a.zip
shader: Fix BFE s32 undefined check
Our unit tests were hitting this exception.
Diffstat (limited to 'src/shader_recompiler/ir_opt/constant_propagation_pass.cpp')
-rw-r--r--src/shader_recompiler/ir_opt/constant_propagation_pass.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
index f16c5e8f6..b1c45d13a 100644
--- a/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
+++ b/src/shader_recompiler/ir_opt/constant_propagation_pass.cpp
@@ -565,7 +565,7 @@ void ConstantPropagation(IR::Block& block, IR::Inst& inst) {
565 const size_t back_shift{static_cast<size_t>(shift) + static_cast<size_t>(count)}; 565 const size_t back_shift{static_cast<size_t>(shift) + static_cast<size_t>(count)};
566 const size_t left_shift{32 - back_shift}; 566 const size_t left_shift{32 - back_shift};
567 const size_t right_shift{static_cast<size_t>(32 - count)}; 567 const size_t right_shift{static_cast<size_t>(32 - count)};
568 if (back_shift >= 32 || left_shift >= 32 || right_shift >= 32) { 568 if (back_shift > 32 || left_shift >= 32 || right_shift >= 32) {
569 throw LogicError("Undefined result in {}({}, {}, {})", IR::Opcode::BitFieldSExtract, 569 throw LogicError("Undefined result in {}({}, {}, {})", IR::Opcode::BitFieldSExtract,
570 base, shift, count); 570 base, shift, count);
571 } 571 }