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>
}
}
- 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);