Otherwise fix_export() will abort when find no export.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24712>
{
asm_context ctx(program, symbols);
- if (program->stage.hw == AC_HW_VERTEX_SHADER || program->stage.hw == AC_HW_PIXEL_SHADER ||
- program->stage.hw == AC_HW_NEXT_GEN_GEOMETRY_SHADER)
+ /* Prolog has no exports. */
+ if (!program->is_prolog &&
+ (program->stage.hw == AC_HW_VERTEX_SHADER || program->stage.hw == AC_HW_PIXEL_SHADER ||
+ program->stage.hw == AC_HW_NEXT_GEN_GEOMETRY_SHADER))
fix_exports(ctx, code, program);
for (Block& block : program->blocks) {
program->debug.func = options->debug.func;
program->debug.private_data = options->debug.private_data;
+ program->is_prolog = is_prolog;
+
/* Instruction selection */
select_shader_part(program.get(), pinfo, &config, options, info, args);
bool has_smem_buffer_or_global_loads = false;
bool has_pops_overlapped_waves_wait = false;
bool has_color_exports = false;
+ bool is_prolog = false;
std::vector<uint8_t> constant_data;
Temp private_segment_buffer;