#define ANV_AUX_USAGE_DEFAULT ((enum isl_aux_usage)0xff)
static void
-get_blorp_surf_for_anv_image(const struct anv_image *image,
+get_blorp_surf_for_anv_image(const struct anv_device *device,
+ const struct anv_image *image,
VkImageAspectFlags aspect,
enum isl_aux_usage aux_usage,
struct blorp_surf *blorp_surf)
uint32_t aspect_bit;
anv_foreach_image_aspect_bit(aspect_bit, src_image, src_mask) {
struct blorp_surf src_surf, dst_surf;
- get_blorp_surf_for_anv_image(src_image, 1UL << aspect_bit,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ src_image, 1UL << aspect_bit,
ANV_AUX_USAGE_DEFAULT, &src_surf);
- get_blorp_surf_for_anv_image(dst_image, 1UL << aspect_bit,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ dst_image, 1UL << aspect_bit,
ANV_AUX_USAGE_DEFAULT, &dst_surf);
for (unsigned i = 0; i < layer_count; i++) {
}
} else {
struct blorp_surf src_surf, dst_surf;
- get_blorp_surf_for_anv_image(src_image, src_mask,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, src_image, src_mask,
ANV_AUX_USAGE_DEFAULT, &src_surf);
- get_blorp_surf_for_anv_image(dst_image, dst_mask,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, dst_image, dst_mask,
ANV_AUX_USAGE_DEFAULT, &dst_surf);
for (unsigned i = 0; i < layer_count; i++) {
for (unsigned r = 0; r < regionCount; r++) {
const VkImageAspectFlags aspect = pRegions[r].imageSubresource.aspectMask;
- get_blorp_surf_for_anv_image(anv_image, aspect,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, anv_image, aspect,
ANV_AUX_USAGE_DEFAULT, &image.surf);
image.offset =
anv_sanitize_image_offset(anv_image->type, pRegions[r].imageOffset);
const VkImageSubresourceLayers *src_res = &pRegions[r].srcSubresource;
const VkImageSubresourceLayers *dst_res = &pRegions[r].dstSubresource;
- get_blorp_surf_for_anv_image(src_image, src_res->aspectMask,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ src_image, src_res->aspectMask,
ANV_AUX_USAGE_DEFAULT, &src);
- get_blorp_surf_for_anv_image(dst_image, dst_res->aspectMask,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ dst_image, dst_res->aspectMask,
ANV_AUX_USAGE_DEFAULT, &dst);
struct anv_format_plane src_format =
assert(pRanges[r].aspectMask & VK_IMAGE_ASPECT_ANY_COLOR_BIT_ANV);
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, pRanges[r].aspectMask,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, pRanges[r].aspectMask,
ANV_AUX_USAGE_DEFAULT, &surf);
struct anv_format_plane src_format =
struct blorp_surf depth, stencil;
if (image->aspects & VK_IMAGE_ASPECT_DEPTH_BIT) {
- get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_DEPTH_BIT,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, VK_IMAGE_ASPECT_DEPTH_BIT,
ISL_AUX_USAGE_NONE, &depth);
} else {
memset(&depth, 0, sizeof(depth));
}
if (image->aspects & VK_IMAGE_ASPECT_STENCIL_BIT) {
- get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_STENCIL_BIT,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, VK_IMAGE_ASPECT_STENCIL_BIT,
ISL_AUX_USAGE_NONE, &stencil);
} else {
memset(&stencil, 0, sizeof(stencil));
struct anv_image_view *iview = fb->attachments[a];
const struct anv_image *image = iview->image;
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_COLOR_BIT,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, VK_IMAGE_ASPECT_COLOR_BIT,
att_state->aux_usage, &surf);
if (att_state->fast_clear) {
}
static void
-resolve_image(struct blorp_batch *batch,
+resolve_image(struct anv_device *device,
+ struct blorp_batch *batch,
const struct anv_image *src_image,
uint32_t src_level, uint32_t src_layer,
const struct anv_image *dst_image,
anv_foreach_image_aspect_bit(aspect_bit, src_image, aspect_mask) {
struct blorp_surf src_surf, dst_surf;
- get_blorp_surf_for_anv_image(src_image, 1UL << aspect_bit,
+ get_blorp_surf_for_anv_image(device, src_image, 1UL << aspect_bit,
ANV_AUX_USAGE_DEFAULT, &src_surf);
- get_blorp_surf_for_anv_image(dst_image, 1UL << aspect_bit,
+ get_blorp_surf_for_anv_image(device, dst_image, 1UL << aspect_bit,
ANV_AUX_USAGE_DEFAULT, &dst_surf);
assert(!src_image->format->can_ycbcr);
assert(anv_image_aspects_compatible(src_mask, dst_mask));
for (uint32_t layer = 0; layer < layer_count; layer++) {
- resolve_image(&batch,
+ resolve_image(cmd_buffer->device, &batch,
src_image,
pRegions[r].srcSubresource.mipLevel,
pRegions[r].srcSubresource.baseArrayLayer + layer,
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, 0);
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, aspect,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, image, aspect,
fast_clear_aux_usage(image, aspect),
&surf);
dst_iview->aspect_mask == VK_IMAGE_ASPECT_COLOR_BIT);
struct blorp_surf src_surf, dst_surf;
- get_blorp_surf_for_anv_image(src_iview->image,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, src_iview->image,
VK_IMAGE_ASPECT_COLOR_BIT,
src_aux_usage, &src_surf);
- get_blorp_surf_for_anv_image(dst_iview->image,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, dst_iview->image,
VK_IMAGE_ASPECT_COLOR_BIT,
dst_aux_usage, &dst_surf);
assert(image->aspects == VK_IMAGE_ASPECT_COLOR_BIT && image->n_planes == 1);
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_COLOR_BIT,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, VK_IMAGE_ASPECT_COLOR_BIT,
ISL_AUX_USAGE_NONE, &surf);
struct blorp_surf shadow_surf = {
blorp_batch_init(&cmd_buffer->device->blorp, &batch, cmd_buffer, 0);
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, VK_IMAGE_ASPECT_DEPTH_BIT,
+ get_blorp_surf_for_anv_image(cmd_buffer->device,
+ image, VK_IMAGE_ASPECT_DEPTH_BIT,
ISL_AUX_USAGE_NONE, &surf);
/* Manually add the aux HiZ surf */
BLORP_BATCH_PREDICATE_ENABLE);
struct blorp_surf surf;
- get_blorp_surf_for_anv_image(image, aspect,
+ get_blorp_surf_for_anv_image(cmd_buffer->device, image, aspect,
fast_clear_aux_usage(image, aspect),
&surf);