Mesa (master): r600g: Evergreen has two extra frac_bits for the sampler LOD state.

Henri Verbeet hverbeet at kemper.freedesktop.org
Mon Nov 15 13:20:54 PST 2010


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

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Mon Nov 15 22:18:12 2010 +0100

r600g: Evergreen has two extra frac_bits for the sampler LOD state.

The (piglit) mipmap_limits test shows the issue very clearly.

---

 src/gallium/drivers/r600/evergreen_state.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/gallium/drivers/r600/evergreen_state.c b/src/gallium/drivers/r600/evergreen_state.c
index 4725b5e..208959d 100644
--- a/src/gallium/drivers/r600/evergreen_state.c
+++ b/src/gallium/drivers/r600/evergreen_state.c
@@ -323,11 +323,11 @@ static void *evergreen_create_sampler_state(struct pipe_context *ctx,
 			S_03C000_BORDER_COLOR_TYPE(uc.ui ? V_03C000_SQ_TEX_BORDER_COLOR_REGISTER : 0), 0xFFFFFFFF, NULL);
 	/* FIXME LOD it depends on texture base level ... */
 	r600_pipe_state_add_reg(rstate, R_03C004_SQ_TEX_SAMPLER_WORD1_0,
-			S_03C004_MIN_LOD(S_FIXED(CLAMP(state->min_lod, 0, 15), 6)) |
-			S_03C004_MAX_LOD(S_FIXED(CLAMP(state->max_lod, 0, 15), 6)),
+			S_03C004_MIN_LOD(S_FIXED(CLAMP(state->min_lod, 0, 15), 8)) |
+			S_03C004_MAX_LOD(S_FIXED(CLAMP(state->max_lod, 0, 15), 8)),
 			0xFFFFFFFF, NULL);
 	r600_pipe_state_add_reg(rstate, R_03C008_SQ_TEX_SAMPLER_WORD2_0,
-				S_03C008_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 6)) |
+				S_03C008_LOD_BIAS(S_FIXED(CLAMP(state->lod_bias, -16, 16), 8)) |
 				S_03C008_TYPE(1),
 				0xFFFFFFFF, NULL);
 



More information about the mesa-commit mailing list