summaryrefslogtreecommitdiffstats
path: root/src/amd
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2018-01-24 13:13:49 +1000
committerDave Airlie <[email protected]>2018-01-25 06:48:11 +1000
commitd2414e64e443700b764dcd1bd7ee46bbf7a9401a (patch)
tree4244df0b4c14de482ae76d285b42c1fcf2d3ad4f /src/amd
parent298554541da220ebdcd9aa9b9055ede2481d5817 (diff)
radv: add multisample Z optimisation from amdvlk
This was just found while reading for other stuff, src/core/hw/gfxip/gfx6/gfx6DepthStencilView.cpp. Reviewed-by: Samuel Pitoiset <[email protected]> Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/amd')
-rw-r--r--src/amd/vulkan/radv_pipeline.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c
index 41a206a634e..62faa3e473b 100644
--- a/src/amd/vulkan/radv_pipeline.c
+++ b/src/amd/vulkan/radv_pipeline.c
@@ -714,6 +714,9 @@ radv_pipeline_init_depth_stencil_state(struct radv_pipeline *pipeline,
S_028800_Z_WRITE_ENABLE(vkds->depthWriteEnable ? 1 : 0) |
S_028800_ZFUNC(vkds->depthCompareOp) |
S_028800_DEPTH_BOUNDS_ENABLE(vkds->depthBoundsTestEnable ? 1 : 0);
+
+ /* from amdvlk: For 4xAA and 8xAA need to decompress on flush for better performance */
+ ds->db_render_override2 |= S_028010_DECOMPRESS_Z_ON_FLUSH(attachment->samples > 2);
}
if (has_stencil_attachment && vkds->stencilTestEnable) {