summaryrefslogtreecommitdiffstats
path: root/src/video_core
diff options
context:
space:
mode:
authorNguyen Dac Nam <nam.kazt.91@gmail.com>2020-02-19 04:54:37 +0100
committerGitHub <noreply@github.com>2020-02-19 04:54:37 +0100
commit556f3a6e9af4973aa72b4848b634ccf2932b614d (patch)
treed9f7186ef579b070e8c0511697f7d3b9d4109c21 /src/video_core
parentMerge pull request #3410 from ReinUsesLisp/vk-draw-index (diff)
downloadyuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar.gz
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar.bz2
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar.lz
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar.xz
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.tar.zst
yuzu-556f3a6e9af4973aa72b4848b634ccf2932b614d.zip
Diffstat (limited to 'src/video_core')
-rw-r--r--src/video_core/shader/decode/conversion.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp
index 0eeb75559..6307d1524 100644
--- a/src/video_core/shader/decode/conversion.cpp
+++ b/src/video_core/shader/decode/conversion.cpp
@@ -83,16 +83,13 @@ 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));
- }
- } else {
- UNIMPLEMENTED_IF(instr.conversion.int_src.selector != 0);
+ if (const u32 offset = instr.conversion.int_src.selector; offset > 0) {
+ ASSERT(instr.conversion.src_size == Register::Size::Byte ||
+ instr.conversion.src_size == Register::Size::Short);
+ value = SignedOperation(OperationCode::ILogicalShiftRight, input_signed,
+ std::move(value), Immediate(offset * 8));
}
-
+
value = ConvertIntegerSize(value, instr.conversion.src_size, input_signed);
value = GetOperandAbsNegInteger(value, instr.conversion.abs_a, false, input_signed);
value = SignedOperation(OperationCode::FCastInteger, input_signed, PRECISE, value);