On 11 September 2015 at 06:00, Glenn Kennard <glenn.kenn...@gmail.com> wrote: > int <-> float <-> double conversion, matches what the blob does > > Signed-off-by: Glenn Kennard <glenn.kenn...@gmail.com> > --- > src/gallium/drivers/r600/r600_shader.c | 95 > +++++++++++++++++++++++++++++++--- > 1 file changed, 87 insertions(+), 8 deletions(-) > > diff --git a/src/gallium/drivers/r600/r600_shader.c > b/src/gallium/drivers/r600/r600_shader.c > index f2c9e16..1c642fd 100644 > --- a/src/gallium/drivers/r600/r600_shader.c > +++ b/src/gallium/drivers/r600/r600_shader.c > @@ -3058,6 +3058,85 @@ static int tgsi_dfracexp(struct r600_shader_ctx *ctx) > return 0; > } > > +static int cypress_int_double(struct r600_shader_ctx *ctx) > +{ > + struct tgsi_full_instruction *inst = > &ctx->parse.FullToken.FullInstruction; > + struct r600_bytecode_alu alu; > + int i, r; > + int lasti = tgsi_last_instruction(inst->Dst[0].Register.WriteMask); > + > + if (inst->Instruction.Opcode == TGSI_OPCODE_I2D || > + inst->Instruction.Opcode == TGSI_OPCODE_U2D) {
It does seem like two functions would make more sense here, they don't share that much code. cypress_int_to_double and cypress_double_to_int Dave. _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev