aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2020-01-17 22:57:35 -0600
committerMarge Bot <[email protected]>2020-01-20 22:08:52 +0000
commit1ec84bd2081e65b2edb489507e0525f98efd3164 (patch)
tree0e35649b4882941b47b080088107c83c3343fdc2
parentcb6ea7704574475c56c930e18363070be6073cc1 (diff)
anv: Take a device in anv_perf_warn
Reviewed-by: Lionel Landwerlin <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3461>
-rw-r--r--src/intel/vulkan/anv_image.c14
-rw-r--r--src/intel/vulkan/anv_private.h2
-rw-r--r--src/intel/vulkan/anv_util.c4
-rw-r--r--src/intel/vulkan/genX_cmd_buffer.c10
4 files changed, 15 insertions, 15 deletions
diff --git a/src/intel/vulkan/anv_image.c b/src/intel/vulkan/anv_image.c
index 6bbeb840285..461b6f83dd2 100644
--- a/src/intel/vulkan/anv_image.c
+++ b/src/intel/vulkan/anv_image.c
@@ -308,7 +308,7 @@ add_aux_state_tracking_buffer(struct anv_image *image,
* 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,
@@ -424,14 +424,14 @@ make_surface(const struct anv_device *dev,
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,
@@ -475,7 +475,7 @@ make_surface(const struct anv_device *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;
@@ -494,7 +494,7 @@ make_surface(const struct anv_device *dev,
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;
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 84f1dc53d86..53359f5225f 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -478,7 +478,7 @@ VkResult __vk_errorf(struct anv_instance *instance, const void *object,
#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);
diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c
index 1159ccecc6a..58d2efcc51f 100644
--- a/src/intel/vulkan/anv_util.c
+++ b/src/intel/vulkan/anv_util.c
@@ -50,7 +50,7 @@ anv_loge_v(const char *format, va_list va)
}
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, ...)
{
@@ -64,7 +64,7 @@ __anv_perf_warn(struct anv_instance *instance, const void *object,
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,
diff --git a/src/intel/vulkan/genX_cmd_buffer.c b/src/intel/vulkan/genX_cmd_buffer.c
index 88d17eeab1e..0e9f7ce2e23 100644
--- a/src/intel/vulkan/genX_cmd_buffer.c
+++ b/src/intel/vulkan/genX_cmd_buffer.c
@@ -342,7 +342,7 @@ color_attachment_compute_aux_usage(struct anv_device * device,
*/
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 {
@@ -406,13 +406,13 @@ color_attachment_compute_aux_usage(struct anv_device * device,
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");
}
@@ -1102,7 +1102,7 @@ transition_color_buffer(struct anv_cmd_buffer *cmd_buffer,
}
} 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.");
}
@@ -5166,7 +5166,7 @@ cmd_buffer_end_subpass(struct anv_cmd_buffer *cmd_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");