diff options
author | Samuel Pitoiset <[email protected]> | 2020-06-09 17:59:00 +0200 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-06-12 08:22:47 +0000 |
commit | 07aefe8065ddcc6c4c5815c761ede265bd760d78 (patch) | |
tree | dd2a12a24305cd1fcc8ef9fe727a1fb24ffc7d29 /src/amd/vulkan/radv_pipeline.c | |
parent | 900bf50c39089ef9841eccd729527319eaf49888 (diff) |
radv: set DB_SHADER_CONTROL.CONSERVATIVE_Z_EXPORT correctly
Use the SPIR-V execution modes if set.
Cc: 20.1 <[email protected]>
Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5404>
Diffstat (limited to 'src/amd/vulkan/radv_pipeline.c')
-rw-r--r-- | src/amd/vulkan/radv_pipeline.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 6d8e7f9555f..771442b4713 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -4492,12 +4492,18 @@ radv_compute_db_shader_control(const struct radv_device *device, const struct radv_pipeline *pipeline, const struct radv_shader_variant *ps) { + unsigned conservative_z_export = V_02880C_EXPORT_ANY_Z; unsigned z_order; if (ps->info.ps.early_fragment_test || !ps->info.ps.writes_memory) z_order = V_02880C_EARLY_Z_THEN_LATE_Z; else z_order = V_02880C_LATE_Z; + if (ps->info.ps.depth_layout == FRAG_DEPTH_LAYOUT_GREATER) + conservative_z_export = V_02880C_EXPORT_GREATER_THAN_Z; + else if (ps->info.ps.depth_layout == FRAG_DEPTH_LAYOUT_LESS) + conservative_z_export = V_02880C_EXPORT_LESS_THAN_Z; + bool disable_rbplus = device->physical_device->rad_info.has_rbplus && !device->physical_device->rad_info.rbplus_allowed; @@ -4511,6 +4517,7 @@ radv_compute_db_shader_control(const struct radv_device *device, S_02880C_STENCIL_TEST_VAL_EXPORT_ENABLE(ps->info.ps.writes_stencil) | S_02880C_KILL_ENABLE(!!ps->info.ps.can_discard) | S_02880C_MASK_EXPORT_ENABLE(mask_export_enable) | + S_02880C_CONSERVATIVE_Z_EXPORT(conservative_z_export) | S_02880C_Z_ORDER(z_order) | S_02880C_DEPTH_BEFORE_SHADER(ps->info.ps.early_fragment_test) | S_02880C_PRE_SHADER_DEPTH_COVERAGE_ENABLE(ps->info.ps.post_depth_coverage) | |