mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 14:38:06 +02:00
r600/shader: only emit add instruction if param has a value.
Just saves a pointless a = a + 0; Reviewed-by: Roland Scheidegger <sroland@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
2bd01adf14
commit
7efcafce7c
1 changed files with 8 additions and 6 deletions
|
|
@ -2864,12 +2864,14 @@ static int r600_tess_factor_read(struct r600_shader_ctx *ctx,
|
|||
if (r)
|
||||
return r;
|
||||
|
||||
r = single_alu_op2(ctx, ALU_OP2_ADD_INT,
|
||||
temp_reg, 0,
|
||||
temp_reg, 0,
|
||||
V_SQ_ALU_SRC_LITERAL, param * 16);
|
||||
if (r)
|
||||
return r;
|
||||
if (param) {
|
||||
r = single_alu_op2(ctx, ALU_OP2_ADD_INT,
|
||||
temp_reg, 0,
|
||||
temp_reg, 0,
|
||||
V_SQ_ALU_SRC_LITERAL, param * 16);
|
||||
if (r)
|
||||
return r;
|
||||
}
|
||||
|
||||
do_lds_fetch_values(ctx, temp_reg, dreg, ((1u << nc) - 1));
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue