broadcom/compiler: track passthrough Z writes
In some cases we need to make the shaders write the Z value produced from rasterization (FEP). Track these instances because they are relevant to early EZ setup. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14037>
This commit is contained in:

committed by
Marge Bot

parent
6d4a645c90
commit
a65c605365
@@ -1741,6 +1741,7 @@ emit_frag_end(struct v3d_compile *c)
|
|||||||
/* Shader doesn't write to gl_FragDepth, take Z from
|
/* Shader doesn't write to gl_FragDepth, take Z from
|
||||||
* FEP.
|
* FEP.
|
||||||
*/
|
*/
|
||||||
|
c->writes_z_from_fep = true;
|
||||||
inst = vir_MOV_dest(c, tlbu_reg, vir_nop_reg());
|
inst = vir_MOV_dest(c, tlbu_reg, vir_nop_reg());
|
||||||
|
|
||||||
if (c->devinfo->ver >= 42) {
|
if (c->devinfo->ver >= 42) {
|
||||||
|
@@ -655,6 +655,7 @@ struct v3d_compile {
|
|||||||
|
|
||||||
bool uses_center_w;
|
bool uses_center_w;
|
||||||
bool writes_z;
|
bool writes_z;
|
||||||
|
bool writes_z_from_fep;
|
||||||
bool reads_z;
|
bool reads_z;
|
||||||
bool uses_implicit_point_line_varyings;
|
bool uses_implicit_point_line_varyings;
|
||||||
|
|
||||||
@@ -968,6 +969,7 @@ struct v3d_fs_prog_data {
|
|||||||
|
|
||||||
uint8_t num_inputs;
|
uint8_t num_inputs;
|
||||||
bool writes_z;
|
bool writes_z;
|
||||||
|
bool writes_z_from_fep;
|
||||||
bool disable_ez;
|
bool disable_ez;
|
||||||
bool uses_center_w;
|
bool uses_center_w;
|
||||||
bool uses_implicit_point_line_varyings;
|
bool uses_implicit_point_line_varyings;
|
||||||
|
@@ -807,6 +807,7 @@ v3d_fs_set_prog_data(struct v3d_compile *c,
|
|||||||
{
|
{
|
||||||
v3d_set_fs_prog_data_inputs(c, prog_data);
|
v3d_set_fs_prog_data_inputs(c, prog_data);
|
||||||
prog_data->writes_z = c->writes_z;
|
prog_data->writes_z = c->writes_z;
|
||||||
|
prog_data->writes_z_from_fep = c->writes_z_from_fep;
|
||||||
prog_data->disable_ez = !c->s->info.fs.early_fragment_tests;
|
prog_data->disable_ez = !c->s->info.fs.early_fragment_tests;
|
||||||
prog_data->uses_center_w = c->uses_center_w;
|
prog_data->uses_center_w = c->uses_center_w;
|
||||||
prog_data->uses_implicit_point_line_varyings =
|
prog_data->uses_implicit_point_line_varyings =
|
||||||
|
Reference in New Issue
Block a user