radv: dump the trap handler shader with RADV_DEBUG=metashaders
Help debugging it. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10656>
This commit is contained in:
committed by
Marge Bot
parent
77d0498913
commit
6d56c16c9c
@@ -97,14 +97,14 @@ static const struct nir_shader_compiler_options nir_options = {
|
||||
|
||||
bool
|
||||
radv_can_dump_shader(struct radv_device *device, struct vk_shader_module *module,
|
||||
bool is_gs_copy_shader)
|
||||
bool meta_shader)
|
||||
{
|
||||
if (!(device->instance->debug_flags & RADV_DEBUG_DUMP_SHADERS))
|
||||
return false;
|
||||
if (module)
|
||||
return !module->nir || (device->instance->debug_flags & RADV_DEBUG_DUMP_META_SHADERS);
|
||||
|
||||
return is_gs_copy_shader;
|
||||
return meta_shader;
|
||||
}
|
||||
|
||||
bool
|
||||
@@ -1415,7 +1415,7 @@ shader_variant_compile(struct radv_device *device, struct vk_shader_module *modu
|
||||
options->family = chip_family;
|
||||
options->chip_class = device->physical_device->rad_info.chip_class;
|
||||
options->info = &device->physical_device->rad_info;
|
||||
options->dump_shader = radv_can_dump_shader(device, module, gs_copy_shader);
|
||||
options->dump_shader = radv_can_dump_shader(device, module, gs_copy_shader || trap_handler_shader);
|
||||
options->dump_preoptir =
|
||||
options->dump_shader && device->instance->debug_flags & RADV_DEBUG_PREOPTIR;
|
||||
options->record_ir = keep_shader_info;
|
||||
|
||||
@@ -467,7 +467,7 @@ unsigned radv_get_max_workgroup_size(enum chip_class chip_class, gl_shader_stage
|
||||
const char *radv_get_shader_name(struct radv_shader_info *info, gl_shader_stage stage);
|
||||
|
||||
bool radv_can_dump_shader(struct radv_device *device, struct vk_shader_module *module,
|
||||
bool is_gs_copy_shader);
|
||||
bool meta_shader);
|
||||
|
||||
bool radv_can_dump_shader_stats(struct radv_device *device, struct vk_shader_module *module);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user