radv: stop passing the module to the compiler debug callback
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 6 Apr 2022 10:37:47 +0000 (12:37 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 8 Apr 2022 07:50:29 +0000 (09:50 +0200)
After SPIRV->NIR, the driver shouldn't rely on the module. This will
still report messages via VK_EXT_debug_report but the object will be
NULL.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15766>

src/amd/vulkan/radv_shader.c

index 58ad7d0..11e229e 100644 (file)
@@ -287,7 +287,7 @@ radv_compiler_debug(void *private_data, enum radv_compiler_debug_level level, co
     * from the implementation and layers.
     */
    vk_debug_report(&instance->vk, vk_flags[level] | VK_DEBUG_REPORT_DEBUG_BIT_EXT,
-                   &debug_data->module->base, 0, 0, "radv", message);
+                   NULL, 0, 0, "radv", message);
 }
 
 static bool
@@ -1949,7 +1949,7 @@ shader_compile(struct radv_device *device, struct vk_shader_module *module,
 
    struct radv_shader_debug_data debug_data = {
       .device = device,
-      .module = module,
+      .module = NULL,
    };
 
    options->family = chip_family;