diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c index c34cf209e75..998cfa75522 100644 --- a/src/intel/vulkan/anv_image.c +++ b/src/intel/vulkan/anv_image.c @@ -285,6 +285,15 @@ add_aux_state_tracking_buffer(struct anv_image *image, } } + /* Add some padding to make sure the fast clear color state buffer starts at + * a 4K alignment. We believe that 256B might be enough, but due to lack of + * testing we will leave this as 4K for now. + */ + image->planes[plane].size = ALIGN(image->planes[plane].size, 4096); + image->size = ALIGN(image->size, 4096); + + assert(image->planes[plane].offset % 4096 == 0); + image->planes[plane].fast_clear_state_offset = image->planes[plane].offset + image->planes[plane].size;