ac,radeonsi: don't export null from PS if it has no effect on gfx10+

We just need to pass the uses_discard flag to the epilog.

The hw skips the export anyway. This will hang if SPI registers declare
an output format or KILL_ENABLE is set because those cases require
an export with done=1.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16885>
This commit is contained in:
Marek Olšák
2022-05-15 02:17:20 -04:00
committed by Marge Bot
parent e4b7088779
commit bdf3797aeb
7 changed files with 21 additions and 8 deletions

View File

@@ -1996,10 +1996,16 @@ void ac_build_export(struct ac_llvm_context *ctx, struct ac_export_args *a)
}
}
void ac_build_export_null(struct ac_llvm_context *ctx)
void ac_build_export_null(struct ac_llvm_context *ctx, bool uses_discard)
{
struct ac_export_args args;
/* Gfx10+ doesn't need to export anything if we don't need to export the EXEC mask
* for discard.
*/
if (ctx->gfx_level >= GFX10 && !uses_discard)
return;
args.enabled_channels = 0x0; /* enabled channels */
args.valid_mask = 1; /* whether the EXEC mask is valid */
args.done = 1; /* DONE bit */