diff options
author | Nanley Chery <[email protected]> | 2016-12-06 09:08:09 -0800 |
---|---|---|
committer | Nanley Chery <[email protected]> | 2017-01-12 20:52:20 -0800 |
commit | b62d8ad2aee2f67fb290332b285a0a5aa93e7724 (patch) | |
tree | d59531cb85f177bb0ece96d0e5fdda0c1a500fcb /src/intel/vulkan/anv_private.h | |
parent | 968ffd6c868af7226e8f889573eef709888151cb (diff) |
anv: Avoid resolves incurred by fast depth clears
Signed-off-by: Nanley Chery <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r-- | src/intel/vulkan/anv_private.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index a3a958f7bd3..aa1b6a81ccf 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -72,6 +72,21 @@ struct gen_l3_config; extern "C" { #endif +/* Allowing different clear colors requires us to perform a depth resolve at + * the end of certain render passes. This is because while slow clears store + * the clear color in the HiZ buffer, fast clears (without a resolve) don't. + * See the PRMs for examples describing when additional resolves would be + * necessary. To enable fast clears without requiring extra resolves, we set + * the clear value to a globally-defined one. We could allow different values + * if the user doesn't expect coherent data during or after a render passes + * (VK_ATTACHMENT_STORE_OP_DONT_CARE), but such users (aside from the CTS) + * don't seem to exist yet. In almost all Vulkan applications tested thus far, + * 1.0f seems to be the only value used. The only application that doesn't set + * this value does so through the usage of an seemingly uninitialized clear + * value. + */ +#define ANV_HZ_FC_VAL 1.0f + #define MAX_VBS 32 #define MAX_SETS 8 #define MAX_RTS 8 |