summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/genX_cmd_buffer.c
diff options
context:
space:
mode:
authorNanley Chery <[email protected]>2017-06-28 10:29:04 -0700
committerJason Ekstrand <[email protected]>2017-07-22 20:12:10 -0700
commita899747eb314b530cc90b2be03bf9c6e3fb28cc9 (patch)
treea9bf320588aa988b1ed7f8bed55048e464670744 /src/intel/vulkan/genX_cmd_buffer.c
parent9c9f63d1c749bfea25d6fcd78ff17ea2c49ec809 (diff)
anv/cmd_buffer: Warn about not enabling CCS_E
Use the performance warning infrastructure to provide helpful information when testing applications. Signed-off-by: Nanley Chery <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_cmd_buffer.c')
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 36c56691521..770f92cb219 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -270,16 +270,18 @@ color_attachment_compute_aux_usage(struct anv_device * device,
* also supports color compression.
*/
if (isl_format_supports_ccs_e(&device->info, iview->isl.format)) {
- /* TODO: Consider using a heuristic to determine if temporarily enabling
- * CCS_E for this image view would be beneficial.
- *
- * While fast-clear resolves and partial resolves are fairly cheap in the
+ att_state->input_aux_usage = ISL_AUX_USAGE_CCS_D;
+
+ /* While fast-clear resolves and partial resolves are fairly cheap in the
* case where you render to most of the pixels, full resolves are not
* because they potentially involve reading and writing the entire
* framebuffer. If we can't texture with CCS_E, we should leave it off and
* limit ourselves to fast clears.
*/
- att_state->input_aux_usage = ISL_AUX_USAGE_CCS_D;
+ if (cmd_state->pass->attachments[att].first_subpass_layout ==
+ VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) {
+ anv_perf_warn("Not temporarily enabling CCS_E.");
+ }
} else {
att_state->input_aux_usage = ISL_AUX_USAGE_NONE;
}