We only have four bits to encode an immediate samp/tex.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13353>
struct ir3_register *samp = samp_tex->srcs[0];
struct ir3_register *tex = samp_tex->srcs[1];
- if ((samp->flags & IR3_REG_IMMED) && (tex->flags & IR3_REG_IMMED)) {
+ if ((samp->flags & IR3_REG_IMMED) && (tex->flags & IR3_REG_IMMED) &&
+ (samp->iim_val < 16) && (tex->iim_val < 16)) {
instr->flags &= ~IR3_INSTR_S2EN;
instr->cat5.samp = samp->iim_val;
instr->cat5.tex = tex->iim_val;