diff options
author | Zack Rusin <zackr@vmware.com> | 2009-09-15 06:00:52 -0400 |
---|---|---|
committer | Zack Rusin <zackr@vmware.com> | 2009-09-15 15:21:42 -0400 |
commit | f1ce6b09cdb21d9217d6ad6057f7fb97375df8be (patch) | |
tree | 579871f7cfeb73b3ae9a7d38069c251e727a4d53 /src/gallium/state_trackers | |
parent | b0c52e491d4f1ad4d16352d1aae77bc879b8da0a (diff) | |
download | external_mesa3d-f1ce6b09cdb21d9217d6ad6057f7fb97375df8be.zip external_mesa3d-f1ce6b09cdb21d9217d6ad6057f7fb97375df8be.tar.gz external_mesa3d-f1ce6b09cdb21d9217d6ad6057f7fb97375df8be.tar.bz2 |
st/xorg: Brian suggested that those could be mad's
optimizes the common paths
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa_tgsi.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c index 801d0d8..d61cae5 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; |