diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2021-01-28 17:20:24 -0600 |
---|---|---|
committer | Marge Bot <eric+marge@anholt.net> | 2021-02-01 18:54:25 +0000 |
commit | 41318a58196d385ce97041e16a055baf892e38cb (patch) | |
tree | 3d38a77538ef601c56219a017de15ad9c3366a9a /src/intel | |
parent | c41eaf0add39cff5c3aaa79ffdd6edcc484cd72c (diff) |
vulkan: Use vk_object_base::type for debug_report
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/vulkan/anv_device.c | 3 | ||||
-rw-r--r-- | src/intel/vulkan/anv_pipeline.c | 10 | ||||
-rw-r--r-- | src/intel/vulkan/anv_util.c | 8 | ||||
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 4 |
4 files changed, 7 insertions, 18 deletions
diff --git a/src/intel/vulkan/anv_device.c b/src/intel/vulkan/anv_device.c index 966c2a60c46..3673dc07ec8 100644 --- a/src/intel/vulkan/anv_device.c +++ b/src/intel/vulkan/anv_device.c @@ -93,8 +93,7 @@ compiler_debug_log(void *data, const char *fmt, ...) vk_debug_report(&instance->vk.debug_report, VK_DEBUG_REPORT_DEBUG_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_UNKNOWN_EXT, - 0, 0, 0, "anv", str); + NULL, 0, 0, "anv", str); } static void diff --git a/src/intel/vulkan/anv_pipeline.c b/src/intel/vulkan/anv_pipeline.c index fded12706ed..fb10a178303 100644 --- a/src/intel/vulkan/anv_pipeline.c +++ b/src/intel/vulkan/anv_pipeline.c @@ -113,10 +113,8 @@ static void anv_spirv_nir_debug(void *private_data, snprintf(buffer, sizeof(buffer), "SPIR-V offset %lu: %s", (unsigned long) spirv_offset, message); - vk_debug_report(&instance->vk.debug_report, - vk_flags[level], - VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT, - (uint64_t) (uintptr_t) debug_data->module, + vk_debug_report(&instance->vk.debug_report, vk_flags[level], + &debug_data->module->base, 0, 0, "anv", buffer); } @@ -1407,9 +1405,7 @@ anv_pipeline_compile_graphics(struct anv_graphics_pipeline *pipeline, vk_debug_report(&pipeline->base.device->physical->instance->vk.debug_report, VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_PIPELINE_CACHE_EXT, - (uint64_t)(uintptr_t)cache, - 0, 0, "anv", + &cache->base, 0, 0, "anv", "Found a partial pipeline in the cache. This is " "most likely caused by an incomplete pipeline cache " "import or export"); diff --git a/src/intel/vulkan/anv_util.c b/src/intel/vulkan/anv_util.c index 37f20bc6eb5..210b9e1520f 100644 --- a/src/intel/vulkan/anv_util.c +++ b/src/intel/vulkan/anv_util.c @@ -64,11 +64,9 @@ __anv_perf_warn(struct anv_device *device, snprintf(report, sizeof(report), "%s: %s", file, buffer); - VkObjectType object_type = object ? object->type : VK_OBJECT_TYPE_UNKNOWN; vk_debug_report(&device->physical->instance->vk.debug_report, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT, - object_type, (uint64_t)(uintptr_t)object, - line, 0, "anv", report); + object, line, 0, "anv", report); mesa_logw("%s:%d: PERF: %s", file, line, buffer); } @@ -93,11 +91,9 @@ __vk_errorv(struct anv_instance *instance, } if (instance) { - VkObjectType object_type = object ? object->type : VK_OBJECT_TYPE_UNKNOWN; vk_debug_report(&instance->vk.debug_report, VK_DEBUG_REPORT_ERROR_BIT_EXT, - object_type, (uint64_t)(uintptr_t)object, - line, 0, "anv", report); + object, line, 0, "anv", report); } mesa_loge("%s", report); diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index 6fe1b71d6e6..1c6eaaf9b09 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1233,9 +1233,7 @@ emit_cb_state(struct anv_graphics_pipeline *pipeline, is_dual_src_blend_factor(a->dstAlphaBlendFactor))) { vk_debug_report(&device->physical->instance->vk.debug_report, VK_DEBUG_REPORT_WARNING_BIT_EXT, - VK_DEBUG_REPORT_OBJECT_TYPE_DEVICE_EXT, - (uint64_t)(uintptr_t)device, - 0, 0, "anv", + &device->vk.base, 0, 0, "anv", "Enabled dual-src blend factors without writing both targets " "in the shader. Disabling blending to avoid GPU hangs."); entry.ColorBufferBlendEnable = false; |