[Mesa-dev] [PATCH] anv: Only copy clear dwords if we're rendering to the first slice
Rafael Antognolli
rafael.antognolli at intel.com
Wed Feb 21 17:06:30 UTC 2018
Makes sense to me, there's no need to keep copying the clear color for
every slice if we only fast clear the first one.
Reviewed-by: Rafael Antognolli <rafael.antognolli at intel.com>
On Tue, Feb 20, 2018 at 03:08:11PM -0800, Jason Ekstrand wrote:
> ---
> src/intel/vulkan/genX_cmd_buffer.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
> index 939a795..8015a42 100644
> --- a/src/intel/vulkan/genX_cmd_buffer.c
> +++ b/src/intel/vulkan/genX_cmd_buffer.c
> @@ -3462,7 +3462,10 @@ cmd_buffer_begin_subpass(struct anv_cmd_buffer *cmd_buffer,
> assert(att_state->pending_clear_aspects == 0);
> }
>
> - if (att_state->pending_load_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) {
> + if ((att_state->pending_load_aspects & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV) &&
> + image->planes[0].aux_surface.isl.size > 0 &&
> + iview->planes[0].isl.base_level == 0 &&
> + iview->planes[0].isl.base_array_layer == 0) {
> if (att_state->aux_usage != ISL_AUX_USAGE_NONE) {
> genX(copy_fast_clear_dwords)(cmd_buffer, att_state->color.state,
> image, VK_IMAGE_ASPECT_COLOR_BIT,
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
More information about the mesa-dev
mailing list