Why store aux usage and not the just image layout? It doesn't really matter whether we call layout_to_aux_usage here or when we emit the binding tables. I'm just wondering why you made the choice this way.
On Feb 27, 2017 5:20 PM, "Nanley Chery" <nanleych...@gmail.com> wrote: Signed-off-by: Nanley Chery <nanley.g.ch...@intel.com> --- src/intel/vulkan/anv_descriptor_set.c | 10 ++++++++++ src/intel/vulkan/anv_private.h | 5 +++++ 2 files changed, 15 insertions(+) diff --git a/src/intel/vulkan/anv_descriptor_set.c b/src/intel/vulkan/anv_ descriptor_set.c index 7853ec7dd9..369698174e 100644 --- a/src/intel/vulkan/anv_descriptor_set.c +++ b/src/intel/vulkan/anv_descriptor_set.c @@ -623,6 +623,11 @@ void anv_UpdateDescriptorSets( .type = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, .image_view = iview, .sampler = sampler, + .aux_usage = + anv_layout_to_aux_usage(device->info.gen, iview->image, + iview->aspect_mask, + write->pImageInfo[j].imageLayout, + write->pImageInfo[j]. imageLayout), }; } break; @@ -637,6 +642,11 @@ void anv_UpdateDescriptorSets( desc[j] = (struct anv_descriptor) { .type = write->descriptorType, .image_view = iview, + .aux_usage = + anv_layout_to_aux_usage(device->info.gen, iview->image, + iview->aspect_mask, + write->pImageInfo[j].imageLayout, + write->pImageInfo[j]. imageLayout), }; } break; diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h index b51c6a643d..42f884d7b0 100644 --- a/src/intel/vulkan/anv_private.h +++ b/src/intel/vulkan/anv_private.h @@ -897,6 +897,11 @@ struct anv_descriptor { struct { struct anv_image_view *image_view; struct anv_sampler *sampler; + + /* Used to determine whether or not we need the surface state to have + * the auxiliary buffer enabled. + */ + enum isl_aux_usage aux_usage; }; struct anv_buffer_view *buffer_view; -- 2.11.1 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev