aco: allow no export instruction for gfx10+ fs

radeonsi will generate no export instruction when no
discard and no output.

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/22727>
This commit is contained in:
Qiang Yu 2023-04-23 16:39:11 +08:00
parent 3c59df7318
commit 65c3d1869d

View file

@ -1010,7 +1010,10 @@ fix_exports(asm_context& ctx, std::vector<uint32_t>& out, Program* program)
}
}
if (!exported) {
/* GFX10+ FS may not export anything if no discard is used. */
bool may_skip_export = program->stage.hw == HWStage::FS && program->gfx_level >= GFX10;
if (!exported && !may_skip_export) {
/* Abort in order to avoid a GPU hang. */
bool is_vertex_or_ngg =
(program->stage.hw == HWStage::VS || program->stage.hw == HWStage::NGG);