diff options
author | bunnei <bunneidev@gmail.com> | 2020-02-19 17:27:28 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-19 17:27:28 +0100 |
commit | fd4c5463e88bbf07f290812851b115ef0303afe2 (patch) | |
tree | 089ff102ee78da1f1d5e9a3bb86ae1e36dce1e8c | |
parent | Merge pull request #3410 from ReinUsesLisp/vk-draw-index (diff) | |
parent | shader_conversion: I2F : add Assert for case src_size is Short (diff) | |
download | yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar.gz yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar.bz2 yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar.lz yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar.xz yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.tar.zst yuzu-fd4c5463e88bbf07f290812851b115ef0303afe2.zip |
-rw-r--r-- | src/video_core/shader/decode/conversion.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp index 0eeb75559..6ead42070 100644 --- a/src/video_core/shader/decode/conversion.cpp +++ b/src/video_core/shader/decode/conversion.cpp @@ -83,14 +83,14 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) { const bool input_signed = instr.conversion.is_input_signed; - if (instr.conversion.src_size == Register::Size::Byte) { - const u32 offset = static_cast<u32>(instr.conversion.int_src.selector) * 8; - if (offset > 0) { - value = SignedOperation(OperationCode::ILogicalShiftRight, input_signed, - std::move(value), Immediate(offset)); + if (const u32 offset = static_cast<u32>(instr.conversion.int_src.selector); offset > 0) { + ASSERT(instr.conversion.src_size == Register::Size::Byte || + instr.conversion.src_size == Register::Size::Short); + if (instr.conversion.src_size == Register::Size::Short) { + ASSERT(offset == 0 || offset == 2); } - } else { - UNIMPLEMENTED_IF(instr.conversion.int_src.selector != 0); + value = SignedOperation(OperationCode::ILogicalShiftRight, input_signed, + std::move(value), Immediate(offset * 8)); } value = ConvertIntegerSize(value, instr.conversion.src_size, input_signed); |