VS: Implement FLR and SLTI instructions.

This commit is contained in:
bunnei 2015-02-18 17:25:48 -05:00 committed by Darius Goad
parent fb52ee9cc7
commit 0980ae1a1c

View File

@ -229,6 +229,22 @@ static void ProcessShaderCode(VertexShaderState& state) {
break; break;
} }
case Instruction::OpCode::FLR:
{
for (int i = 0; i < 4; ++i)
dest[i] = float24::FromFloat32(floor(src1[i].ToFloat32()));
break;
}
case Instruction::OpCode::SLTI:
{
for (int i = 0; i < 4; ++i)
dest[i] = float24::FromFloat32((src1[i] < src2[i]) ? 1.0f : 0.0f);
break;
}
case Instruction::OpCode::MAX: case Instruction::OpCode::MAX:
for (int i = 0; i < 4; ++i) { for (int i = 0; i < 4; ++i) {
if (!swizzle.DestComponentEnabled(i)) if (!swizzle.DestComponentEnabled(i))