aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_wm_glsl.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2009-08-11 16:47:15 -0700
committerEric Anholt <[email protected]>2009-11-06 21:08:54 -0800
commit90629704ef51de4018055ee4b8ff68531f6712ae (patch)
treee261b647ce4c0931bcbbe4ae6c5db2e6d2d8eb92 /src/mesa/drivers/dri/i965/brw_wm_glsl.c
parent71af5080722afcbbb8a935138d95214ef7afe219 (diff)
i965: Use a normal alu1 emit for OPCODE_TRUNC.
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm_glsl.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_wm_glsl.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_wm_glsl.c b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
index fdd31d4ed50..cd5a59463c3 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_glsl.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_glsl.c
@@ -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: