On Tue, May 02, 2017 at 05:04:05PM -0700, Jason Ekstrand wrote: > On Thu, Apr 27, 2017 at 11:32 AM, Nanley Chery <[email protected]> > wrote: > > > This will be used in conjunction with the buffer of clear values. > > > > Signed-off-by: Nanley Chery <[email protected]> > > --- > > src/intel/vulkan/anv_blorp.c | 41 ++++++++++++++++++++++++++++++ > > +++++++++++ > > src/intel/vulkan/anv_private.h | 6 ++++++ > > 2 files changed, 47 insertions(+) > > > > diff --git a/src/intel/vulkan/anv_blorp.c b/src/intel/vulkan/anv_blorp.c > > index 5e7d4b06b8..332ad14b37 100644 > > --- a/src/intel/vulkan/anv_blorp.c > > +++ b/src/intel/vulkan/anv_blorp.c > > @@ -1611,3 +1611,44 @@ anv_gen8_hiz_op_resolve(struct anv_cmd_buffer > > *cmd_buffer, > > blorp_gen6_hiz_op(&batch, &surf, 0, 0, op); > > blorp_batch_finish(&batch); > > } > > + > > +void > > +anv_ccs_resolve(struct anv_cmd_buffer * const cmd_buffer, > > + const struct anv_state surface_state, > > + const struct anv_image * const image, > > + const uint8_t level, const uint32_t layer, > > + const enum blorp_fast_clear_op op) > > +{ > > + assert(cmd_buffer && image); > > + > > + /* This image must have a CCS buffer. */ > > + assert(anv_image_has_color_aux(image) && > > + image->samples == 1); > > + > > + /* This level and layer must have auxiliary data. */ > > + assert(level < anv_color_aux_levels(image)); > > + assert(layer < anv_color_aux_layers(image, level)); > > + > > + /* Create a binding table for this surface state. */ > > + uint32_t binding_table; > > + VkResult result = > > + binding_table_for_surface_state(cmd_buffer, surface_state, > > + &binding_table); > > + if (result != VK_SUCCESS) > > + return; > > + > > + struct blorp_batch batch; > > + blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, > > + BLORP_BATCH_NO_EMIT_DEPTH_STENCIL); > > > > I'm not sure we actually want NO_EMIT_DEPTH_STENCIL here. > >
Fixed in local v2. > > + > > + struct blorp_surf surf; > > + get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_COLOR_BIT, > > + image->aux_usage == ISL_AUX_USAGE_CCS_E ? > > + ISL_AUX_USAGE_CCS_E : ISL_AUX_USAGE_CCS_D, > > > > So, if aux_usage == NONE, we give it CCS_D? That seems a bit weird. > > I think it's weird as well. Alternatively, we can set the aux usage based on what isl_format_supports_ccs_e() returns. -Nanley > > + &surf); > > + > > + blorp_ccs_resolve_bt(&batch, binding_table, &surf, level, layer, > > + image->color_surface.isl.format, op); > > + > > + blorp_batch_finish(&batch); > > +} > > diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_ > > private.h > > index b49a5a0009..667176270a 100644 > > --- a/src/intel/vulkan/anv_private.h > > +++ b/src/intel/vulkan/anv_private.h > > @@ -2040,6 +2040,12 @@ void > > anv_gen8_hiz_op_resolve(struct anv_cmd_buffer *cmd_buffer, > > const struct anv_image *image, > > enum blorp_hiz_op op); > > +void > > +anv_ccs_resolve(struct anv_cmd_buffer * const cmd_buffer, > > + const struct anv_state surface_state, > > + const struct anv_image * const image, > > + const uint8_t level, const uint32_t layer, > > + const enum blorp_fast_clear_op op); > > > > enum isl_aux_usage > > anv_layout_to_aux_usage(const struct gen_device_info * const devinfo, > > -- > > 2.12.2 > > > > _______________________________________________ > > mesa-dev mailing list > > [email protected] > > https://lists.freedesktop.org/mailman/listinfo/mesa-dev > > _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
