This apparently can happen with gs/tess. And will cause problems with
two-pass-ra, so lets just skip them.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3569>
for (unsigned i = 0; i < nprecolor; i++) {
if (precolor[i] && !(precolor[i]->flags & IR3_INSTR_UNUSED)) {
struct ir3_instruction *instr = precolor[i];
+
struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip];
debug_assert(!(instr->regs[0]->flags & (IR3_REG_HALF | IR3_REG_HIGH)));
for (unsigned i = 0; i < nprecolor; i++) {
struct ir3_instruction *instr = precolor[i];
- if (!instr)
+ if (!instr || (instr->flags & IR3_INSTR_UNUSED))
continue;
struct ir3_ra_instr_data *id = &ctx->instrd[instr->ip];