mesa/src/broadcom
Jose Maria Casanova Crespo 5b951bcdd7 v3d: Enable Early-Z with discards when depth updates are disabled
The Early-Z optimization is disabled when there is a discard
instruction in the shader used in the draw call.

But if discard is the only reason to disable Early-Z, and at
draw call time the updates in the draw call are disabled we
can enable Early-Z using a shader variant.

If there are occlussion queries active we also need to disable
Early-z optimization.

So this patch enables Early-Z in this scenario.

The performance improvement is significant when running gfxbench
benchmark showing an average improvement of 11.15%

fps_avg  helped:  gl_gfxbench_aztec_high.trace:  3.13 ->  3.73 (19.13%)
fps_avg  helped:  gl_gfxbench_aztec.trace:       4.82 ->  5.68 (17.88%)
fps_avg  helped:  gl_gfxbench_manhattan31.trace: 5.10 ->  6.00 (17.59%)
fps_avg  helped:  gl_gfxbench_manhattan.trace:   7.24 ->  8.36 (15.52%)
fps_avg  helped:  gl_gfxbench_trex.trace:       19.25 -> 20.17 ( 4.81%)

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Cc: mesa-stable
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32028>
2024-11-12 13:26:38 +00:00
..
ci broadcom/ci: add flakes seen recently 2024-11-08 22:49:21 +00:00
cle build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
clif broadcom: only support v42 and v71 2023-11-02 11:59:08 +01:00
common broadcom: add helpers to identify availability of new unpack modifiers 2024-10-03 09:02:08 +00:00
compiler v3d: Enable Early-Z with discards when depth updates are disabled 2024-11-12 13:26:38 +00:00
drm-shim build: pass licensing information in SPDX form 2024-06-29 12:42:49 -07:00
qpu broadcom: add missing opcodes for fmov on mul alu for V3D 7.x 2024-10-03 09:02:07 +00:00
simulator broadcom: do not include simulator if not available 2024-09-26 06:12:23 +00:00
vulkan v3dv: fix leak during device initialization 2024-10-17 13:27:05 +00:00
.editorconfig
meson.build broadcom: do not include simulator if not available 2024-09-26 06:12:23 +00:00