iview->base_mip == 0 &&
iview->base_layer == 0 &&
radv_layout_can_expclear(iview->image, layout) &&
- memcmp(&iview->extent, &iview->image->extent, sizeof(iview->extent)) == 0)
+ !radv_image_extent_compare(iview->image, &iview->extent))
return true;
return false;
}
if (iview->image->surface.level[0].mode < RADEON_SURF_MODE_1D)
goto fail;
- if (memcmp(&iview->extent, &iview->image->extent, sizeof(iview->extent)))
+ if (!radv_image_extent_compare(iview->image, &iview->extent))
goto fail;
if (clear_rect->rect.offset.x || clear_rect->rect.offset.y ||
}
}
+static inline bool
+radv_image_extent_compare(const struct radv_image *image,
+ const VkExtent3D *extent)
+{
+ if (memcmp(extent, &image->extent, sizeof(*extent)))
+ return false;
+ return true;
+}
+
struct radv_sampler {
uint32_t state[4];
};