shader: Implement early Z tests

This commit is contained in:
ReinUsesLisp 2021-04-13 16:56:22 -03:00 committed by ameerj
parent 09165ae189
commit a83579b50a
3 changed files with 5 additions and 0 deletions

View file

@ -178,6 +178,9 @@ void DefineEntryPoint(const IR::Program& program, EmitContext& ctx, Id main) {
if (program.info.stores_frag_depth) {
ctx.AddExecutionMode(main, spv::ExecutionMode::DepthReplacing);
}
if (ctx.profile.force_early_z) {
ctx.AddExecutionMode(main, spv::ExecutionMode::EarlyFragmentTests);
}
break;
default:
throw NotImplementedException("Stage {}", program.stage);