1
0
Fork 0
forked from suyu/suyu

shader_conversion: I2F : add Assert for case src_size is Short

This commit is contained in:
Nguyen Dac Nam 2020-02-19 11:40:35 +07:00 committed by GitHub
parent a2c2c5768f
commit 1b6308727c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -86,6 +86,9 @@ u32 ShaderIR::DecodeConversion(NodeBlock& bb, u32 pc) {
if (const u32 offset = static_cast<u32>(instr.conversion.int_src.selector); offset > 0) { if (const u32 offset = static_cast<u32>(instr.conversion.int_src.selector); offset > 0) {
ASSERT(instr.conversion.src_size == Register::Size::Byte || ASSERT(instr.conversion.src_size == Register::Size::Byte ||
instr.conversion.src_size == Register::Size::Short); 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, value = SignedOperation(OperationCode::ILogicalShiftRight, input_signed,
std::move(value), Immediate(offset * 8)); std::move(value), Immediate(offset * 8));
} }