From 1b6308727ca2cdd256175d90018abd54bbb7921d Mon Sep 17 00:00:00 2001 From: Nguyen Dac Nam Date: Wed, 19 Feb 2020 11:40:35 +0700 Subject: shader_conversion: I2F : add Assert for case src_size is Short --- src/video_core/shader/decode/conversion.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/video_core') diff --git a/src/video_core/shader/decode/conversion.cpp b/src/video_core/shader/decode/conversion.cpp index 7da857af5..6ead42070 100644 --- a/src/video_core/shader/decode/conversion.cpp +++ b/src/video_core/shader/decode/conversion.cpp @@ -86,6 +86,9 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) { if (const u32 offset = static_cast(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); + } value = SignedOperation(OperationCode::ILogicalShiftRight, input_signed, std::move(value), Immediate(offset * 8)); } -- cgit v1.2.3