From 7059aa0eff9ff6ec361e584b413f63b25762a89c Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Tue, 11 Aug 2009 21:17:14 -0700 Subject: i965: Share the sop opcodes between brw_wm_glsl.c and brw_wm_emit.c. --- src/mesa/drivers/dri/i965/brw_wm.h | 6 +++ src/mesa/drivers/dri/i965/brw_wm_emit.c | 19 ++++---- src/mesa/drivers/dri/i965/brw_wm_glsl.c | 78 +++++---------------------------- 3 files changed, 29 insertions(+), 74 deletions(-) (limited to 'src/mesa/drivers/dri/i965') diff --git a/src/mesa/drivers/dri/i965/brw_wm.h b/src/mesa/drivers/dri/i965/brw_wm.h index e0445aaf52..df8e467aaf 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.h +++ b/src/mesa/drivers/dri/i965/brw_wm.h @@ -357,5 +357,11 @@ void emit_mad(struct brw_compile *p, const struct brw_reg *arg0, const struct brw_reg *arg1, const struct brw_reg *arg2); +void emit_sop(struct brw_compile *p, + const struct brw_reg *dst, + GLuint mask, + GLuint cond, + const struct brw_reg *arg0, + const struct brw_reg *arg1); #endif diff --git a/src/mesa/drivers/dri/i965/brw_wm_emit.c b/src/mesa/drivers/dri/i965/brw_wm_emit.c index 6cdc4f7483..41ebadb553 100644 --- a/src/mesa/drivers/dri/i965/brw_wm_emit.c +++ b/src/mesa/drivers/dri/i965/brw_wm_emit.c @@ -447,21 +447,24 @@ void emit_lrp(struct brw_compile *p, } } -static void emit_sop( struct brw_compile *p, - const struct brw_reg *dst, - GLuint mask, - GLuint cond, - const struct brw_reg *arg0, - const struct brw_reg *arg1 ) +void emit_sop(struct brw_compile *p, + const struct brw_reg *dst, + GLuint mask, + GLuint cond, + const struct brw_reg *arg0, + const struct brw_reg *arg1) { GLuint i; for (i = 0; i < 4; i++) { if (mask & (1<func; - GLuint mask = inst->DstReg.WriteMask; - struct brw_reg dst, src0, src1; - int i; - - for (i = 0; i < 4; i++) { - if (mask & (1<