broadcom/compiler: Set up passthrough Z when doing FS discards.
In order to keep early-Z from writing early in a discard shader, you need to set the "modifies Z" bit in the shader state (which the new prog_data.discards will indicate). Then, in the shader we do a TLB write to make Z passthrough happen (the QPU result is ignored, so we use a NULL source).
This commit is contained in:
@@ -762,8 +762,9 @@ uint64_t *v3d_compile_fs(const struct v3d_compiler *compiler,
|
||||
|
||||
v3d_set_prog_data(c, &prog_data->base);
|
||||
v3d_set_fs_prog_data_inputs(c, prog_data);
|
||||
if (c->s->info.outputs_written & (1 << FRAG_RESULT_DEPTH))
|
||||
prog_data->writes_z = true;
|
||||
prog_data->writes_z = (c->s->info.outputs_written &
|
||||
(1 << FRAG_RESULT_DEPTH));
|
||||
prog_data->discard = c->s->info.fs.uses_discard;
|
||||
|
||||
return v3d_return_qpu_insts(c, final_assembly_size);
|
||||
}
|
||||
|
Reference in New Issue
Block a user