With RADV_DEBUG=preoptir.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
LLVMBuildRetVoid(ctx.builder);
+ if (options->dump_preoptir)
+ ac_dump_module(ctx.module);
+
ac_llvm_finalize_module(&ctx);
if (shader_count == 1)
bool unsafe_math;
bool supports_spill;
bool clamp_shadow_reference;
+ bool dump_preoptir;
enum radeon_family family;
enum chip_class chip_class;
};
RADV_DEBUG_ZERO_VRAM = 0x1000,
RADV_DEBUG_SYNC_SHADERS = 0x2000,
RADV_DEBUG_NO_SISCHED = 0x4000,
+ RADV_DEBUG_PREOPTIR = 0x8000,
};
enum {
{"zerovram", RADV_DEBUG_ZERO_VRAM},
{"syncshaders", RADV_DEBUG_SYNC_SHADERS},
{"nosisched", RADV_DEBUG_NO_SISCHED},
+ {"preoptir", RADV_DEBUG_PREOPTIR},
{NULL, 0}
};
options->family = chip_family;
options->chip_class = device->physical_device->rad_info.chip_class;
+ options->dump_preoptir = radv_can_dump_shader(device, module) &&
+ device->instance->debug_flags & RADV_DEBUG_PREOPTIR;
if (options->supports_spill)
tm_options |= AC_TM_SUPPORTS_SPILL;