* image's memory requirements (that is, the image's size and alignment).
*/
static VkResult
-make_surface(const struct anv_device *dev,
+make_surface(struct anv_device *dev,
struct anv_image *image,
uint32_t stride,
isl_tiling_flags_t tiling_flags,
if (!(image->usage & VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT)) {
/* It will never be used as an attachment, HiZ is pointless. */
} else if (dev->info.gen == 7) {
- anv_perf_warn(dev->instance, image, "Implement gen7 HiZ");
+ anv_perf_warn(dev, image, "Implement gen7 HiZ");
} else if (image->levels > 1) {
- anv_perf_warn(dev->instance, image, "Enable multi-LOD HiZ");
+ anv_perf_warn(dev, image, "Enable multi-LOD HiZ");
} else if (image->array_size > 1) {
- anv_perf_warn(dev->instance, image,
+ anv_perf_warn(dev, image,
"Implement multi-arrayLayer HiZ clears and resolves");
} else if (dev->info.gen == 8 && image->samples > 1) {
- anv_perf_warn(dev->instance, image, "Enable gen8 multisampled HiZ");
+ anv_perf_warn(dev, image, "Enable gen8 multisampled HiZ");
} else if (!unlikely(INTEL_DEBUG & DEBUG_NO_HIZ)) {
assert(image->planes[plane].aux_surface.isl.size_B == 0);
ok = isl_surf_get_hiz_surf(&dev->isl_dev,
* image, we currently don't have things hooked up to get it
* working.
*/
- anv_perf_warn(dev->instance, image,
+ anv_perf_warn(dev, image,
"This image format doesn't support rendering. "
"Not allocating an CCS buffer.");
image->planes[plane].aux_surface.isl.size_B = 0;
image->ccs_e_compatible) {
image->planes[plane].aux_usage = ISL_AUX_USAGE_CCS_E;
} else if (dev->info.gen >= 12) {
- anv_perf_warn(dev->instance, image,
+ anv_perf_warn(dev, image,
"The CCS_D aux mode is not yet handled on "
"Gen12+. Not allocating a CCS buffer.");
image->planes[plane].aux_surface.isl.size_B = 0;
#define anv_debug_ignored_stype(sType) \
intel_logd("%s: ignored VkStructureType %u\n", __func__, (sType))
-void __anv_perf_warn(struct anv_instance *instance, const void *object,
+void __anv_perf_warn(struct anv_device *device, const void *object,
VkDebugReportObjectTypeEXT type, const char *file,
int line, const char *format, ...)
anv_printflike(6, 7);
}
void anv_printflike(6, 7)
-__anv_perf_warn(struct anv_instance *instance, const void *object,
+__anv_perf_warn(struct anv_device *device, const void *object,
VkDebugReportObjectTypeEXT type,
const char *file, int line, const char *format, ...)
{
snprintf(report, sizeof(report), "%s: %s", file, buffer);
- vk_debug_report(&instance->debug_report_callbacks,
+ vk_debug_report(&device->physical->instance->debug_report_callbacks,
VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
type,
(uint64_t) (uintptr_t) object,
*/
if (cmd_state->pass->attachments[att].first_subpass_layout ==
VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL) {
- anv_perf_warn(device->instance, iview->image,
+ anv_perf_warn(device, iview->image,
"Not temporarily enabling CCS_E.");
}
} else {
if (att_state->fast_clear &&
(iview->planes[0].isl.base_level > 0 ||
iview->planes[0].isl.base_array_layer > 0)) {
- anv_perf_warn(device->instance, iview->image,
+ anv_perf_warn(device, iview->image,
"Rendering with multi-lod or multi-layer framebuffer "
"with LOAD_OP_LOAD and baseMipLevel > 0 or "
"baseArrayLayer > 0. Not fast clearing.");
att_state->fast_clear = false;
} else if (att_state->fast_clear && cmd_state->framebuffer->layers > 1) {
- anv_perf_warn(device->instance, iview->image,
+ anv_perf_warn(device, iview->image,
"Rendering to a multi-layer framebuffer with "
"LOAD_OP_CLEAR. Only fast-clearing the first slice");
}
}
} else {
if (image->samples == 4 || image->samples == 16) {
- anv_perf_warn(cmd_buffer->device->instance, image,
+ anv_perf_warn(cmd_buffer->device, image,
"Doing a potentially unnecessary fast-clear to "
"define an MCS buffer.");
}
* SRGB view & a UNORM image).
*/
if (fast_clear_type != ANV_FAST_CLEAR_NONE) {
- anv_perf_warn(cmd_buffer->device->instance, iview,
+ anv_perf_warn(cmd_buffer->device, iview,
"Doing a partial resolve to get rid of clear color at the "
"end of a renderpass due to an image/view format mismatch");