i965: Use a normal alu1 emit for OPCODE_TRUNC.

This commit is contained in:
Eric Anholt 2009-08-11 16:47:15 -07:00
parent 71af508072
commit 90629704ef
2 changed files with 2 additions and 34 deletions

View file

@ -422,20 +422,6 @@ static void emit_mad( struct brw_compile *p,
}
}
static void emit_trunc( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
const struct brw_reg *arg0)
{
GLuint i;
for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
brw_RNDZ(p, dst[i], arg0[i]);
}
}
}
static void emit_lrp( struct brw_compile *p,
const struct brw_reg *dst,
GLuint mask,
@ -1364,7 +1350,7 @@ void brw_wm_emit( struct brw_wm_compile *c )
break;
case OPCODE_TRUNC:
emit_trunc(p, dst, dst_flags, args[0]);
emit_alu1(p, brw_RNDZ, dst, dst_flags, args[0]);
break;
case OPCODE_LRP:

View file

@ -650,24 +650,6 @@ static void invoke_subroutine( struct brw_wm_compile *c,
}
}
static void emit_trunc( struct brw_wm_compile *c,
const struct prog_instruction *inst)
{
int i;
struct brw_compile *p = &c->func;
GLuint mask = inst->DstReg.WriteMask;
brw_set_saturate(p, inst->SaturateMode != SATURATE_OFF);
for (i = 0; i < 4; i++) {
if (mask & (1<<i)) {
struct brw_reg src, dst;
dst = get_dst_reg(c, inst, i);
src = get_src_reg(c, inst, 0, i);
brw_RNDZ(p, dst, src);
}
}
brw_set_saturate(p, 0);
}
static void emit_pixel_xy(struct brw_wm_compile *c,
const struct prog_instruction *inst)
{
@ -2743,7 +2725,7 @@ static void brw_wm_emit_glsl(struct brw_context *brw, struct brw_wm_compile *c)
emit_lrp(c, inst);
break;
case OPCODE_TRUNC:
emit_trunc(c, inst);
emit_alu1(p, brw_RNDZ, dst, dst_flags, args[0]);
break;
case OPCODE_MOV:
case OPCODE_SWZ: