mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
gallium/radeon: assign a name to LLVM output variables in debug builds
This can be helpful with R600_DEBUG=preoptir. Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net> Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
parent
39a29c2431
commit
38cfd5160a
1 changed files with 6 additions and 1 deletions
|
|
@ -703,6 +703,7 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
|
|||
|
||||
case TGSI_FILE_OUTPUT:
|
||||
{
|
||||
char name[16] = "";
|
||||
unsigned idx;
|
||||
for (idx = decl->Range.First; idx <= decl->Range.Last; idx++) {
|
||||
unsigned chan;
|
||||
|
|
@ -710,9 +711,13 @@ static void emit_declaration(struct lp_build_tgsi_context *bld_base,
|
|||
if (ctx->soa.outputs[idx][0])
|
||||
continue;
|
||||
for (chan = 0; chan < TGSI_NUM_CHANNELS; chan++) {
|
||||
#ifdef DEBUG
|
||||
snprintf(name, sizeof(name), "OUT%d.%c",
|
||||
idx, "xyzw"[chan % 4]);
|
||||
#endif
|
||||
ctx->soa.outputs[idx][chan] = lp_build_alloca_undef(
|
||||
&ctx->gallivm,
|
||||
ctx->soa.bld_base.base.elem_type, "");
|
||||
ctx->soa.bld_base.base.elem_type, name);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue