diff options
author | Jason Ekstrand <[email protected]> | 2017-11-20 10:05:54 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2018-02-08 16:35:31 -0800 |
commit | 151771b390fbfc26bb42bf26c2b55ca23051f62c (patch) | |
tree | 7ef2a6b30ab1193b0de3bced168c5826a5cbc69f /src | |
parent | bea7373c9284556571fe9c54fd0bd1d0887da032 (diff) |
anv/cmd_buffer: Recurse in transition_color_buffer instead of falling through
Reviewed-by: Topi Pohjolainen <[email protected]>
Reviewed-by: Nanley Chery <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/intel/vulkan/genX_cmd_buffer.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c index 3fdfc310703..d5fc95c35af 100644 --- a/src/intel/vulkan/genX_cmd_buffer.c +++ b/src/intel/vulkan/genX_cmd_buffer.c @@ -719,21 +719,21 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer, if (image->samples == 1 && image->planes[plane].aux_usage != ISL_AUX_USAGE_CCS_E && final_layout != VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) { - /* The CCS_D buffer may not be enabled in the final layout. Continue - * executing this function to perform a resolve. + /* The CCS_D buffer may not be enabled in the final layout. Call this + * function again with a initial layout of COLOR_ATTACHMENT_OPTIMAL + * to perform a resolve. */ anv_perf_warn(cmd_buffer->device->instance, image, "Performing an additional resolve for CCS_D layout " "transition. Consider always leaving it on or " "performing an ambiguation pass."); - } else { - /* Writes in the final layout will be aware of the auxiliary buffer. - * In addition, the clear buffer entries and the auxiliary buffers - * have been populated with values that will result in correct - * rendering. - */ - return; + transition_color_buffer(cmd_buffer, image, aspect, + base_level, level_count, + base_layer, layer_count, + VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL, + final_layout); } + return; } else if (initial_layout != VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) { /* Resolves are only necessary if the subresource may contain blocks * fast-cleared to values unsupported in other layouts. This only occurs |