mirror of
https://github.com/RPCSX/rpcsx.git
synced 2026-01-20 15:40:30 +01:00
[amdgpu/shader] Implement Vop3 ADD_F32
This commit is contained in:
parent
f8bd280e00
commit
f8a53b4ab4
|
|
@ -2334,6 +2334,19 @@ void convertVop3(Fragment &fragment, Vop3 inst) {
|
|||
break;
|
||||
}
|
||||
|
||||
case Vop3::Op::V3_ADD_F32: {
|
||||
auto floatT = fragment.context->getFloat32Type();
|
||||
auto src0 = getSrc(0, TypeId::Float32);
|
||||
auto src1 = getSrc(1, TypeId::Float32);
|
||||
auto resultValue = fragment.builder.createFAdd(
|
||||
floatT, spirv::cast<spirv::FloatValue>(src0.value),
|
||||
spirv::cast<spirv::FloatValue>(src1.value));
|
||||
auto result = applyClamp(applyOmod({floatT, resultValue}));
|
||||
|
||||
fragment.setVectorOperand(inst.vdst, result);
|
||||
break;
|
||||
}
|
||||
|
||||
case Vop3::Op::V3_SUB_F32: {
|
||||
auto floatT = fragment.context->getFloat32Type();
|
||||
auto src0 = getSrc(0, TypeId::Float32);
|
||||
|
|
|
|||
Loading…
Reference in a new issue