radv: Switch to the common VK_EXT_debug_report
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8676>
This commit is contained in:
parent
3f2341767b
commit
19d7cf0457
|
@ -755,13 +755,6 @@ VkResult radv_CreateInstance(
|
||||||
instance->physical_devices_enumerated = false;
|
instance->physical_devices_enumerated = false;
|
||||||
list_inithead(&instance->physical_devices);
|
list_inithead(&instance->physical_devices);
|
||||||
|
|
||||||
result = vk_debug_report_instance_init(&instance->debug_report_callbacks);
|
|
||||||
if (result != VK_SUCCESS) {
|
|
||||||
vk_instance_finish(&instance->vk);
|
|
||||||
vk_free2(&default_alloc, pAllocator, instance);
|
|
||||||
return vk_error(instance, result);
|
|
||||||
}
|
|
||||||
|
|
||||||
glsl_type_singleton_init_or_ref();
|
glsl_type_singleton_init_or_ref();
|
||||||
|
|
||||||
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
|
VG(VALGRIND_CREATE_MEMPOOL(instance, 0, false));
|
||||||
|
@ -795,8 +788,6 @@ void radv_DestroyInstance(
|
||||||
driDestroyOptionCache(&instance->dri_options);
|
driDestroyOptionCache(&instance->dri_options);
|
||||||
driDestroyOptionInfo(&instance->available_dri_options);
|
driDestroyOptionInfo(&instance->available_dri_options);
|
||||||
|
|
||||||
vk_debug_report_instance_destroy(&instance->debug_report_callbacks);
|
|
||||||
|
|
||||||
vk_instance_finish(&instance->vk);
|
vk_instance_finish(&instance->vk);
|
||||||
vk_free(&instance->vk.alloc, instance);
|
vk_free(&instance->vk.alloc, instance);
|
||||||
}
|
}
|
||||||
|
@ -7949,43 +7940,6 @@ void radv_GetPhysicalDeviceExternalFenceProperties(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
VkResult
|
|
||||||
radv_CreateDebugReportCallbackEXT(VkInstance _instance,
|
|
||||||
const VkDebugReportCallbackCreateInfoEXT* pCreateInfo,
|
|
||||||
const VkAllocationCallbacks* pAllocator,
|
|
||||||
VkDebugReportCallbackEXT* pCallback)
|
|
||||||
{
|
|
||||||
RADV_FROM_HANDLE(radv_instance, instance, _instance);
|
|
||||||
return vk_create_debug_report_callback(&instance->debug_report_callbacks,
|
|
||||||
pCreateInfo, pAllocator, &instance->vk.alloc,
|
|
||||||
pCallback);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
radv_DestroyDebugReportCallbackEXT(VkInstance _instance,
|
|
||||||
VkDebugReportCallbackEXT _callback,
|
|
||||||
const VkAllocationCallbacks* pAllocator)
|
|
||||||
{
|
|
||||||
RADV_FROM_HANDLE(radv_instance, instance, _instance);
|
|
||||||
vk_destroy_debug_report_callback(&instance->debug_report_callbacks,
|
|
||||||
_callback, pAllocator, &instance->vk.alloc);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
|
||||||
radv_DebugReportMessageEXT(VkInstance _instance,
|
|
||||||
VkDebugReportFlagsEXT flags,
|
|
||||||
VkDebugReportObjectTypeEXT objectType,
|
|
||||||
uint64_t object,
|
|
||||||
size_t location,
|
|
||||||
int32_t messageCode,
|
|
||||||
const char* pLayerPrefix,
|
|
||||||
const char* pMessage)
|
|
||||||
{
|
|
||||||
RADV_FROM_HANDLE(radv_instance, instance, _instance);
|
|
||||||
vk_debug_report(&instance->debug_report_callbacks, flags, objectType,
|
|
||||||
object, location, messageCode, pLayerPrefix, pMessage);
|
|
||||||
}
|
|
||||||
|
|
||||||
void
|
void
|
||||||
radv_GetDeviceGroupPeerMemoryFeatures(
|
radv_GetDeviceGroupPeerMemoryFeatures(
|
||||||
VkDevice device,
|
VkDevice device,
|
||||||
|
|
|
@ -323,8 +323,6 @@ struct radv_instance {
|
||||||
uint64_t debug_flags;
|
uint64_t debug_flags;
|
||||||
uint64_t perftest_flags;
|
uint64_t perftest_flags;
|
||||||
|
|
||||||
struct vk_debug_report_instance debug_report_callbacks;
|
|
||||||
|
|
||||||
bool physical_devices_enumerated;
|
bool physical_devices_enumerated;
|
||||||
struct list_head physical_devices;
|
struct list_head physical_devices;
|
||||||
|
|
||||||
|
|
|
@ -287,7 +287,7 @@ static void radv_spirv_nir_debug(void *private_data,
|
||||||
snprintf(buffer, sizeof(buffer), "SPIR-V offset %lu: %s",
|
snprintf(buffer, sizeof(buffer), "SPIR-V offset %lu: %s",
|
||||||
(unsigned long)spirv_offset, message);
|
(unsigned long)spirv_offset, message);
|
||||||
|
|
||||||
vk_debug_report(&instance->debug_report_callbacks,
|
vk_debug_report(&instance->vk.debug_report,
|
||||||
vk_flags[level],
|
vk_flags[level],
|
||||||
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
|
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
|
||||||
(uint64_t)(uintptr_t)debug_data->module,
|
(uint64_t)(uintptr_t)debug_data->module,
|
||||||
|
@ -309,7 +309,7 @@ static void radv_compiler_debug(void *private_data,
|
||||||
/* VK_DEBUG_REPORT_DEBUG_BIT_EXT specifies diagnostic information
|
/* VK_DEBUG_REPORT_DEBUG_BIT_EXT specifies diagnostic information
|
||||||
* from the implementation and layers.
|
* from the implementation and layers.
|
||||||
*/
|
*/
|
||||||
vk_debug_report(&instance->debug_report_callbacks,
|
vk_debug_report(&instance->vk.debug_report,
|
||||||
vk_flags[level] | VK_DEBUG_REPORT_DEBUG_BIT_EXT,
|
vk_flags[level] | VK_DEBUG_REPORT_DEBUG_BIT_EXT,
|
||||||
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
|
VK_DEBUG_REPORT_OBJECT_TYPE_SHADER_MODULE_EXT,
|
||||||
(uint64_t)(uintptr_t)debug_data->module,
|
(uint64_t)(uintptr_t)debug_data->module,
|
||||||
|
|
|
@ -113,7 +113,7 @@ __vk_errorv(struct radv_instance *instance, const void *object,
|
||||||
}
|
}
|
||||||
|
|
||||||
if (instance) {
|
if (instance) {
|
||||||
vk_debug_report(&instance->debug_report_callbacks,
|
vk_debug_report(&instance->vk.debug_report,
|
||||||
VK_DEBUG_REPORT_ERROR_BIT_EXT, type,
|
VK_DEBUG_REPORT_ERROR_BIT_EXT, type,
|
||||||
(uint64_t)(uintptr_t) object, line, 0, "radv",
|
(uint64_t)(uintptr_t) object, line, 0, "radv",
|
||||||
report);
|
report);
|
||||||
|
|
Loading…
Reference in New Issue