if (inst->imm && inst->src[2].use)
return 1;
- if (!inst->halti5 && !check_uniforms(inst))
+ if (!inst->no_oneconst_limit && !check_uniforms(inst))
BUG("error: generating instruction that accesses two different uniforms");
assert(!(inst->opcode&~0x7f));
unsigned sel_bit0:1; /* select low half mediump */
unsigned sel_bit1:1; /* select high half mediump */
unsigned dst_full:1; /* write to highp register */
- unsigned halti5:1; /* allow multiple different uniform sources */
+ unsigned no_oneconst_limit:1; /* allow multiple different uniform sources */
struct etna_inst_dst dst; /* destination operand */
struct etna_inst_tex tex; /* texture operand */
struct etna_inst_src src[ETNA_NUM_SRC]; /* source operand */
* -insert movs (nir_lower_vec_to_movs equivalent)
* for non-vecN instructions:
* -try to merge constants as single constant
- * -insert movs for multiple constants (pre-HALTI5)
+ * -insert movs for multiple constants if required
*/
static void
lower_alu(struct etna_compile *c, nir_alu_instr *alu)
case nir_op_vec4:
break;
default:
- /* pre-GC7000L can only have 1 uniform src per instruction */
- if (c->specs->halti >= 5)
+ if (c->specs->has_no_oneconst_limit)
return;
nir_const_value value[4] = {};
if (inst->opcode == INST_OPCODE_BRANCH)
inst->imm = block_ptr[inst->imm];
- inst->halti5 = specs->halti >= 5;
+ inst->no_oneconst_limit = specs->has_no_oneconst_limit;
etna_assemble(&code[i * 4], inst);
}
unsigned has_new_transcendentals : 1;
/* has the new dp2/dpX_norm instructions, among others */
unsigned has_halti2_instructions : 1;
+ /* has no limit on the number of constant sources per instruction */
+ unsigned has_no_oneconst_limit : 1;
/* has V4_COMPRESSION */
unsigned v4_compression : 1;
/* supports single-buffer rendering with multiple pixel pipes */
VIV_FEATURE(screen, chipMinorFeatures3, HAS_FAST_TRANSCENDENTALS);
screen->specs.has_halti2_instructions =
VIV_FEATURE(screen, chipMinorFeatures4, HALTI2);
+ screen->specs.has_no_oneconst_limit =
+ VIV_FEATURE(screen, chipMinorFeatures8, SH_NO_ONECONST_LIMIT);
screen->specs.v4_compression =
VIV_FEATURE(screen, chipMinorFeatures6, V4_COMPRESSION);
screen->specs.seamless_cube_map =