From f1ce6b09cdb21d9217d6ad6057f7fb97375df8be Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Tue, 15 Sep 2009 06:00:52 -0400 Subject: st/xorg: Brian suggested that those could be mad's optimizes the common paths --- src/gallium/state_trackers/xorg/xorg_exa_tgsi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/gallium/state_trackers/xorg') diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c index 801d0d8df4..d61cae53c7 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c +++ b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c @@ -52,8 +52,7 @@ struct xorg_shaders { static const char over_op[] = "SUB TEMP[3], CONST[0].wwww, TEMP[1].wwww\n" - "MUL TEMP[3], TEMP[0], TEMP[3]\n" - "ADD TEMP[0], TEMP[3], TEMP[0]\n"; + "MAD TEMP[3], TEMP[0], TEMP[3], TEMP[0]\n"; static INLINE void @@ -79,8 +78,7 @@ vs_normalize_coords(struct ureg_program *ureg, struct ureg_src coords, { struct ureg_dst tmp = ureg_DECL_temporary(ureg); struct ureg_src ret; - ureg_MUL(ureg, tmp, coords, const0); - ureg_ADD(ureg, tmp, ureg_src(tmp), const1); + ureg_MAD(ureg, tmp, coords, const0, const1); ret = ureg_src(tmp); ureg_release_temporary(ureg, tmp); return ret; -- cgit v1.2.3