intel/fs: don't spill a register, set by undef

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3941
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8185>
This commit is contained in:
Yevhenii Kolesnikov 2020-12-09 21:16:37 +02:00 committed by Marge Bot
parent bb4ade40e4
commit 5ad54d498c
1 changed files with 2 additions and 1 deletions

View File

@ -1208,7 +1208,8 @@ fs_reg_alloc::spill_reg(unsigned spill_reg)
}
if (inst->dst.file == VGRF &&
inst->dst.nr == spill_reg) {
inst->dst.nr == spill_reg &&
inst->opcode != SHADER_OPCODE_UNDEF) {
int subset_spill_offset = spill_offset +
ROUND_DOWN_TO(inst->dst.offset, REG_SIZE);
fs_reg spill_src = alloc_spill_reg(regs_written(inst), ip);