This commit is contained in:
Dr. Chat 2016-02-21 17:12:08 -06:00
parent 1d4190af02
commit 13049912ee
1 changed files with 12 additions and 0 deletions

View File

@ -740,6 +740,9 @@ void SpirvShaderTranslator::ProcessVectorAluInstruction(
dest = b.createBinOp(spv::Op::OpFAdd, vec4_float_type_, dest, sources[2]);
} break;
case AluVectorOpcode::kMax4: {
} break;
case AluVectorOpcode::kMaxA: {
// a0 = clamp(floor(src0.w + 0.5), -256, 255)
auto addr = b.createCompositeExtract(sources[0], float_type_, 3);
@ -984,6 +987,15 @@ void SpirvShaderTranslator::ProcessScalarAluInstruction(
dest = b.makeFloatConstant(0.f);
} 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: {
auto addr =
b.createUnaryOp(spv::Op::OpConvertFToS, int_type_, sources[0]);