aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/r600/r600_tex.c
diff options
context:
space:
mode:
authorAlex Deucher <[email protected]>2009-07-28 17:59:54 -0400
committerAlex Deucher <[email protected]>2009-07-28 17:59:54 -0400
commite629c50e2be03144e8aeef3c51624ae8db9957b8 (patch)
tree73946459a7887aef216bacabcbaa1b42970d3b9f /src/mesa/drivers/dri/r600/r600_tex.c
parent719abd7fc088c5ebc567e9ea20bdd6fc9fe1af3b (diff)
r600: implement texture border color
Diffstat (limited to 'src/mesa/drivers/dri/r600/r600_tex.c')
-rw-r--r--src/mesa/drivers/dri/r600/r600_tex.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mesa/drivers/dri/r600/r600_tex.c b/src/mesa/drivers/dri/r600/r600_tex.c
index a1e89453900..444024ee7e0 100644
--- a/src/mesa/drivers/dri/r600/r600_tex.c
+++ b/src/mesa/drivers/dri/r600/r600_tex.c
@@ -269,14 +269,12 @@ static void r600SetTexFilter(radeonTexObjPtr t, GLenum minf, GLenum magf, GLfloa
static void r600SetTexBorderColor(radeonTexObjPtr t, const GLfloat color[4])
{
-#if 0
- GLubyte c[4];
- CLAMPED_FLOAT_TO_UBYTE(c[0], color[0]);
- CLAMPED_FLOAT_TO_UBYTE(c[1], color[1]);
- CLAMPED_FLOAT_TO_UBYTE(c[2], color[2]);
- CLAMPED_FLOAT_TO_UBYTE(c[3], color[3]);
- t->pp_border_color = PACK_COLOR_8888(c[3], c[0], c[1], c[2]);
-#endif
+ t->TD_PS_SAMPLER0_BORDER_ALPHA = *((uint32_t*)&(color[3]));
+ t->TD_PS_SAMPLER0_BORDER_RED = *((uint32_t*)&(color[2]));
+ t->TD_PS_SAMPLER0_BORDER_GREEN = *((uint32_t*)&(color[1]));
+ t->TD_PS_SAMPLER0_BORDER_BLUE = *((uint32_t*)&(color[0]));
+ SETfield(t->SQ_TEX_SAMPLER0, SQ_TEX_BORDER_COLOR_REGISTER,
+ BORDER_COLOR_TYPE_shift, BORDER_COLOR_TYPE_mask);
}
/**