mirror of
https://github.com/yuzu-emu/yuzu.git
synced 2024-07-04 23:31:19 +01:00
shader: Implement FragDepth
This commit is contained in:
parent
fda0835300
commit
f5672777c8
2 changed files with 7 additions and 1 deletions
|
@ -359,6 +359,12 @@ void EmitContext::DefineOutputs(const Info& info) {
|
||||||
Decorate(frag_color[i], spv::Decoration::Location, static_cast<u32>(i));
|
Decorate(frag_color[i], spv::Decoration::Location, static_cast<u32>(i));
|
||||||
Name(frag_color[i], fmt::format("frag_color{}", i));
|
Name(frag_color[i], fmt::format("frag_color{}", i));
|
||||||
}
|
}
|
||||||
|
if (!info.stores_frag_depth) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
frag_depth = DefineOutput(*this, F32[1]);
|
||||||
|
Decorate(frag_depth, spv::Decoration::BuiltIn, static_cast<u32>(spv::BuiltIn::FragDepth));
|
||||||
|
Name(frag_depth, "frag_depth");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ void ExitFragment(TranslatorVisitor& v) {
|
||||||
throw NotImplementedException("Sample mask");
|
throw NotImplementedException("Sample mask");
|
||||||
}
|
}
|
||||||
if (sph.ps.omap.depth != 0) {
|
if (sph.ps.omap.depth != 0) {
|
||||||
throw NotImplementedException("Fragment depth");
|
v.ir.SetFragDepth(v.F(src_reg + 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // Anonymous namespace
|
} // Anonymous namespace
|
||||||
|
|
Loading…
Reference in a new issue