summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2010-08-27 13:24:41 -0700
committerEric Anholt <[email protected]>2010-08-27 13:59:36 -0700
commit31c9f468f35637ce3b82e59a43c49c949d59ee9e (patch)
tree97ba3161dd58441a7dc78bc22f7d126ac93d5cd2 /src/mesa
parent48d8814c03cc7f270985abe7efdaec1f18d120aa (diff)
i965: Add support for ir_binop_mod using do_mod_to_fract.
Fixes glsl-fs-mod.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index d8369868ade..bb6c456eed9 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -131,6 +131,7 @@ brw_link_shader(GLcontext *ctx, struct gl_shader_program *prog)
clone_ir_list(mem_ctx, shader->ir, shader->base.ir);
do_mat_op_to_vec(shader->ir);
+ do_mod_to_fract(shader->ir);
do_div_to_mul_rcp(shader->ir);
do_sub_to_add_neg(shader->ir);
do_explog_to_explog2(shader->ir);
@@ -1482,6 +1483,9 @@ fs_visitor::generate_code()
case BRW_OPCODE_MUL:
brw_MUL(p, dst, src[0], src[1]);
break;
+ case BRW_OPCODE_FRC:
+ brw_FRC(p, dst, src[0]);
+ break;
case BRW_OPCODE_AND:
brw_AND(p, dst, src[0], src[1]);