Mesa (master): nvfx: remove unused-but-set variables

Marek Olšák mareko at kemper.freedesktop.org
Sun Jan 8 10:12:53 PST 2012


Module: Mesa
Branch: master
Commit: ed22f8ed2c12d2cbeae245ea51e44cb308994ec2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=ed22f8ed2c12d2cbeae245ea51e44cb308994ec2

Author: Marek Olšák <maraeo at gmail.com>
Date:   Sat Dec 17 22:54:29 2011 +0100

nvfx: remove unused-but-set variables

---

 src/gallium/drivers/nvfx/nv30_fragtex.c |    3 ---
 src/gallium/drivers/nvfx/nv40_fragtex.c |    2 --
 2 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/src/gallium/drivers/nvfx/nv30_fragtex.c b/src/gallium/drivers/nvfx/nv30_fragtex.c
index 6fe5932..dd454b5 100644
--- a/src/gallium/drivers/nvfx/nv30_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv30_fragtex.c
@@ -9,8 +9,6 @@ nv30_sampler_state_init(struct pipe_context *pipe,
 			  struct nvfx_sampler_state *ps,
 			  const struct pipe_sampler_state *cso)
 {
-	float limit;
-
 	if (cso->max_anisotropy >= 2)
 	{
 		if (cso->max_anisotropy >= 8)
@@ -21,7 +19,6 @@ nv30_sampler_state_init(struct pipe_context *pipe,
 			ps->en |= NV30_3D_TEX_ENABLE_ANISO_2X;
 	}
 
-	limit = CLAMP(cso->lod_bias, -16.0, 15.0 + (255.0 / 256.0));
 	ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff;
 
 	ps->max_lod = (int)CLAMP(cso->max_lod, 0.0, 15.0);
diff --git a/src/gallium/drivers/nvfx/nv40_fragtex.c b/src/gallium/drivers/nvfx/nv40_fragtex.c
index 563183d..a2da445 100644
--- a/src/gallium/drivers/nvfx/nv40_fragtex.c
+++ b/src/gallium/drivers/nvfx/nv40_fragtex.c
@@ -8,7 +8,6 @@ nv40_sampler_state_init(struct pipe_context *pipe,
 			  struct nvfx_sampler_state *ps,
 			  const struct pipe_sampler_state *cso)
 {
-	float limit;
 	if (cso->max_anisotropy >= 2) {
 		/* no idea, binary driver sets it, works without it.. meh.. */
 		ps->wrap |= (1 << 5);
@@ -29,7 +28,6 @@ nv40_sampler_state_init(struct pipe_context *pipe,
 			ps->en |= NV40_3D_TEX_ENABLE_ANISO_2X;
 	}
 
-	limit = CLAMP(cso->lod_bias, -16.0, 15.0 + (255.0 / 256.0));
 	ps->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff;
 
 	ps->max_lod = (int)(CLAMP(cso->max_lod, 0.0, 15.0 + (255.0 / 256.0)) * 256.0);



More information about the mesa-commit mailing list