mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 09:38:07 +02:00
etnaviv: Remove no_oneconst_limit from etna_inst
It makes no sense to store no_oneconst_limit in struct etna_inst as this flag is not instruction specific. This is a flag that affects every instruction. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/27887>
This commit is contained in:
parent
529efb1f9b
commit
0a3a80a4ca
3 changed files with 4 additions and 6 deletions
|
|
@ -59,13 +59,13 @@ check_uniforms(const struct etna_inst *inst)
|
|||
}
|
||||
|
||||
int
|
||||
etna_assemble(uint32_t *out, const struct etna_inst *inst)
|
||||
etna_assemble(uint32_t *out, const struct etna_inst *inst, bool has_no_oneconst_limit)
|
||||
{
|
||||
/* cannot have both src2 and imm */
|
||||
if (inst->imm && inst->src[2].use)
|
||||
return 1;
|
||||
|
||||
if (!inst->no_oneconst_limit && !check_uniforms(inst))
|
||||
if (!has_no_oneconst_limit && !check_uniforms(inst))
|
||||
BUG("error: generating instruction that accesses two different uniforms");
|
||||
|
||||
assert(!(inst->opcode&~0x7f));
|
||||
|
|
|
|||
|
|
@ -97,7 +97,6 @@ struct etna_inst {
|
|||
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 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 */
|
||||
|
|
@ -172,7 +171,7 @@ etna_immediate_int(int x)
|
|||
* value otherwise.
|
||||
*/
|
||||
int
|
||||
etna_assemble(uint32_t *out, const struct etna_inst *inst);
|
||||
etna_assemble(uint32_t *out, const struct etna_inst *inst, bool has_no_oneconst_limit);
|
||||
|
||||
/**
|
||||
* Set field imm of already-assembled instruction.
|
||||
|
|
|
|||
|
|
@ -1247,8 +1247,7 @@ etna_compile_shader(struct etna_shader_variant *v)
|
|||
if (inst->opcode == INST_OPCODE_BRANCH)
|
||||
inst->imm = block_ptr[inst->imm];
|
||||
|
||||
inst->no_oneconst_limit = specs->has_no_oneconst_limit;
|
||||
etna_assemble(&code[i * 4], inst);
|
||||
etna_assemble(&code[i * 4], inst, specs->has_no_oneconst_limit);
|
||||
}
|
||||
|
||||
v->code_size = c->inst_ptr * 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue