diff options
author | Axel Davy <axel.davy@ens.fr> | 2016-02-06 20:03:51 +0100 |
---|---|---|
committer | Axel Davy <axel.davy@ens.fr> | 2016-02-12 23:26:36 +0100 |
commit | d7a5468da9796af193e65cd5823525b97dfed2df (patch) | |
tree | 1e8ae2430a8ed25b8c34a3d43d78c79265b3dda0 /src/gallium | |
parent | 6b43f5b1d4efca53f246296f98db00ff8f7544b6 (diff) |
st/nine: Drop path for ureg_NRM and ureg_CLAMP
using MIN/MAX is fine instead of CLAMP.
NRM doesn't exist anymore.
Signed-off-by: Axel Davy <axel.davy@ens.fr>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/state_trackers/nine/nine_ff.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c index e79d0b4f881..d5daabd6661 100644 --- a/src/gallium/state_trackers/nine/nine_ff.c +++ b/src/gallium/state_trackers/nine/nine_ff.c @@ -24,8 +24,6 @@ #include "util/u_hash_table.h" #include "util/u_upload_mgr.h" -#define NINE_TGSI_LAZY_DEVS 1 - #define DBG_CHANNEL DBG_FF #define NINE_FF_NUM_VS_CONST 256 @@ -319,15 +317,11 @@ ureg_normalize3(struct ureg_program *ureg, struct ureg_dst dst, struct ureg_src src, struct ureg_dst tmp) { -#ifdef NINE_TGSI_LAZY_DEVS struct ureg_dst tmp_x = ureg_writemask(tmp, TGSI_WRITEMASK_X); ureg_DP3(ureg, tmp_x, src, src); ureg_RSQ(ureg, tmp_x, _X(tmp)); ureg_MUL(ureg, dst, src, _X(tmp)); -#else - ureg_NRM(ureg, dst, src); -#endif } static void * @@ -549,15 +543,8 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) */ if (key->vertexpointsize) { struct ureg_src cPsz1 = ureg_DECL_constant(ureg, 26); -#ifdef NINE_TGSI_LAZY_DEVS - struct ureg_dst tmp_clamp = ureg_DECL_temporary(ureg); - - ureg_MAX(ureg, tmp_clamp, vs->aPsz, _XXXX(cPsz1)); - ureg_MIN(ureg, oPsz, ureg_src(tmp_clamp), _YYYY(cPsz1)); - ureg_release_temporary(ureg, tmp_clamp); -#else - ureg_CLAMP(ureg, oPsz, vs->aPsz, _XXXX(cPsz1), _YYYY(cPsz1)); -#endif + ureg_MAX(ureg, tmp_x, _XXXX(vs->aPsz), _XXXX(cPsz1)); + ureg_MIN(ureg, oPsz, _X(tmp), _YYYY(cPsz1)); } else if (key->pointscale) { struct ureg_src cPsz1 = ureg_DECL_constant(ureg, 26); struct ureg_src cPsz2 = ureg_DECL_constant(ureg, 27); @@ -570,15 +557,8 @@ nine_ff_build_vs(struct NineDevice9 *device, struct vs_build_ctx *vs) ureg_MAD(ureg, tmp_x, _Y(tmp), _X(tmp), _WWWW(cPsz1)); ureg_RCP(ureg, tmp_x, ureg_src(tmp)); ureg_MUL(ureg, tmp_x, ureg_src(tmp), _ZZZZ(cPsz1)); -#ifdef NINE_TGSI_LAZY_DEVS - struct ureg_dst tmp_clamp = ureg_DECL_temporary(ureg); - - ureg_MAX(ureg, tmp_clamp, _X(tmp), _XXXX(cPsz1)); - ureg_MIN(ureg, oPsz, ureg_src(tmp_clamp), _YYYY(cPsz1)); - ureg_release_temporary(ureg, tmp_clamp); -#else - ureg_CLAMP(ureg, oPsz, _X(tmp), _XXXX(cPsz1), _YYYY(cPsz1)); -#endif + ureg_MAX(ureg, tmp_x, _X(tmp), _XXXX(cPsz1)); + ureg_MIN(ureg, oPsz, _X(tmp), _YYYY(cPsz1)); } for (i = 0; i < 8; ++i) { |