Commit 7fc7684e authored by Erik Faye-Lund 's avatar Erik Faye-Lund

zink: set ExecutionModeDepthReplacing when depth is written

parent 0711d46c
......@@ -1523,9 +1523,13 @@ nir_to_spirv(struct nir_shader *s)
spirv_builder_emit_entry_point(&ctx.builder, exec_model, entry_point,
"main", ctx.entry_ifaces,
ctx.num_entry_ifaces);
if (s->info.stage == MESA_SHADER_FRAGMENT)
if (s->info.stage == MESA_SHADER_FRAGMENT) {
spirv_builder_emit_exec_mode(&ctx.builder, entry_point,
SpvExecutionModeOriginUpperLeft);
if (s->info.outputs_written & BITFIELD64_BIT(FRAG_RESULT_DEPTH))
spirv_builder_emit_exec_mode(&ctx.builder, entry_point,
SpvExecutionModeDepthReplacing);
}
spirv_builder_function(&ctx.builder, entry_point, type_void,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment