add mad, to_f32, trunc
enough for SkVM_mad, SkVM_madder Change-Id: Id5165e221ae9923f6ccffc6a987d973c7f11332c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/274026 Auto-Submit: Mike Klein <mtklein@google.com> Reviewed-by: Mike Klein <mtklein@google.com> Commit-Queue: Mike Klein <mtklein@google.com>
This commit is contained in:
parent
96380c2df4
commit
2ea588fe99
@ -1976,10 +1976,19 @@ namespace skvm {
|
||||
case Op::sub_f32: vals[i] = I(b->CreateFSub(F(vals[x]), F(vals[y]))); break;
|
||||
case Op::mul_f32: vals[i] = I(b->CreateFMul(F(vals[x]), F(vals[y]))); break;
|
||||
case Op::div_f32: vals[i] = I(b->CreateFDiv(F(vals[x]), F(vals[y]))); break;
|
||||
|
||||
case Op::mad_f32:
|
||||
vals[i] = I(b->CreateFAdd(b->CreateFMul(F(vals[x]), F(vals[y])),
|
||||
F(vals[z])));
|
||||
break;
|
||||
|
||||
case Op::floor:
|
||||
vals[i] = I(b->CreateUnaryIntrinsic(llvm::Intrinsic::floor, F(vals[x])));
|
||||
break;
|
||||
|
||||
case Op::to_f32: vals[i] = I(b->CreateSIToFP( vals[x] , F32)); break;
|
||||
case Op::trunc : vals[i] = b->CreateFPToSI(F(vals[x]), I32) ; break;
|
||||
|
||||
case Op::gather32: {
|
||||
// Our gather base pointer is immz bytes off of uniform immy.
|
||||
llvm::Value* base =
|
||||
|
Loading…
Reference in New Issue
Block a user