Vec Log
This commit is contained in:
parent
1d4190af02
commit
13049912ee
|
@ -740,6 +740,9 @@ void SpirvShaderTranslator::ProcessVectorAluInstruction(
|
||||||
dest = b.createBinOp(spv::Op::OpFAdd, vec4_float_type_, dest, sources[2]);
|
dest = b.createBinOp(spv::Op::OpFAdd, vec4_float_type_, dest, sources[2]);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case AluVectorOpcode::kMax4: {
|
||||||
|
} break;
|
||||||
|
|
||||||
case AluVectorOpcode::kMaxA: {
|
case AluVectorOpcode::kMaxA: {
|
||||||
// a0 = clamp(floor(src0.w + 0.5), -256, 255)
|
// a0 = clamp(floor(src0.w + 0.5), -256, 255)
|
||||||
auto addr = b.createCompositeExtract(sources[0], float_type_, 3);
|
auto addr = b.createCompositeExtract(sources[0], float_type_, 3);
|
||||||
|
@ -984,6 +987,15 @@ void SpirvShaderTranslator::ProcessScalarAluInstruction(
|
||||||
dest = b.makeFloatConstant(0.f);
|
dest = b.makeFloatConstant(0.f);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
|
case AluScalarOpcode::kLogc: {
|
||||||
|
} break;
|
||||||
|
|
||||||
|
case AluScalarOpcode::kLog: {
|
||||||
|
auto log = CreateGlslStd450InstructionCall(
|
||||||
|
spv::Decoration::DecorationInvariant, float_type_,
|
||||||
|
spv::GLSLstd450::kLog2, {sources[0]});
|
||||||
|
} break;
|
||||||
|
|
||||||
case AluScalarOpcode::kMaxAsf: {
|
case AluScalarOpcode::kMaxAsf: {
|
||||||
auto addr =
|
auto addr =
|
||||||
b.createUnaryOp(spv::Op::OpConvertFToS, int_type_, sources[0]);
|
b.createUnaryOp(spv::Op::OpConvertFToS, int_type_, sources[0]);
|
||||||
|
|
Loading…
Reference in New Issue