mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-26 04:10:09 +01:00
v3dv: disable early Z writes if Z writes are disabled
I saw this while inspecting CL dumps from the UE Shooter demo, where they disable Z writes for occlusion queries. The hardware is probably doing this internally, but it doesn't hurt to do this explicitly and make CL traces consistent with intended behavior. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8571>
This commit is contained in:
parent
41d22eb68e
commit
15cf2ab642
3 changed files with 8 additions and 2 deletions
|
|
@ -3501,8 +3501,9 @@ emit_configuration_bits(struct v3dv_cmd_buffer *cmd_buffer)
|
|||
v3dv_return_if_oom(cmd_buffer, NULL);
|
||||
|
||||
cl_emit_with_prepacked(&job->bcl, CFG_BITS, pipeline->cfg_bits, config) {
|
||||
config.early_z_updates_enable = job->ez_state != VC5_EZ_DISABLED;
|
||||
config.early_z_enable = config.early_z_updates_enable;
|
||||
config.early_z_enable = job->ez_state != VC5_EZ_DISABLED;
|
||||
config.early_z_updates_enable = config.early_z_enable &&
|
||||
pipeline->z_updates_enable;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2334,6 +2334,8 @@ pack_cfg_bits(struct v3dv_pipeline *pipeline,
|
|||
|
||||
config.stencil_enable =
|
||||
ds_info ? ds_info->stencilTestEnable && has_ds_attachment: false;
|
||||
|
||||
pipeline->z_updates_enable = config.z_updates_enable;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1652,6 +1652,9 @@ struct v3dv_pipeline {
|
|||
|
||||
struct v3dv_pipeline_layout *layout;
|
||||
|
||||
/* Whether this pipeline enables depth writes */
|
||||
bool z_updates_enable;
|
||||
|
||||
enum v3dv_ez_state ez_state;
|
||||
|
||||
bool msaa;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue