mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 09:28:07 +02:00
r600g: added literals where needed for POW instruction
Fixes size calculation for the bytecode buffer. Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
b3d41844c7
commit
e77b1e777d
1 changed files with 9 additions and 0 deletions
|
|
@ -1069,6 +1069,9 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
|
|||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bc_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
r = r600_bc_add_literal(ctx->bc,ctx->value);
|
||||
if (r)
|
||||
return r;
|
||||
/* b * LOG2(a) */
|
||||
|
|
@ -1083,6 +1086,9 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
|
|||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bc_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
r = r600_bc_add_literal(ctx->bc,ctx->value);
|
||||
if (r)
|
||||
return r;
|
||||
/* POW(a,b) = EXP2(b * LOG2(a))*/
|
||||
|
|
@ -1093,6 +1099,9 @@ static int tgsi_pow(struct r600_shader_ctx *ctx)
|
|||
alu.dst.write = 1;
|
||||
alu.last = 1;
|
||||
r = r600_bc_add_alu(ctx->bc, &alu);
|
||||
if (r)
|
||||
return r;
|
||||
r = r600_bc_add_literal(ctx->bc,ctx->value);
|
||||
if (r)
|
||||
return r;
|
||||
return tgsi_helper_tempx_replicate(ctx);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue