mirror of
https://github.com/xenia-project/xenia.git
synced 2026-04-05 06:35:11 +00:00
SetpPop/SetpRstr
This commit is contained in:
parent
5c2b5123ac
commit
9030c87386
1 changed files with 13 additions and 0 deletions
|
|
@ -1203,9 +1203,22 @@ void SpirvShaderTranslator::ProcessScalarAluInstruction(
|
|||
} break;
|
||||
|
||||
case AluScalarOpcode::kSetpPop: {
|
||||
auto src = b.createBinOp(spv::Op::OpFSub, float_type_, sources[0],
|
||||
b.makeFloatConstant(1.f));
|
||||
auto c = b.createBinOp(spv::Op::OpFOrdLessThanEqual, bool_type_, src,
|
||||
b.makeFloatConstant(0.f));
|
||||
b.createStore(c, p0_);
|
||||
|
||||
dest = CreateGlslStd450InstructionCall(
|
||||
spv::Decoration::DecorationInvariant, float_type_, GLSLstd450::kFMax,
|
||||
{sources[0], b.makeFloatConstant(0.f)});
|
||||
} break;
|
||||
|
||||
case AluScalarOpcode::kSetpRstr: {
|
||||
auto c = b.createBinOp(spv::Op::OpFOrdEqual, bool_type_, sources[0],
|
||||
b.makeFloatConstant(0.f));
|
||||
b.createStore(c, p0_);
|
||||
dest = sources[0];
|
||||
} break;
|
||||
|
||||
case AluScalarOpcode::kSin: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue