summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
authorBen Skeggs <darktama@iinet.net.au>2006-11-19 15:52:18 +0000
committerBen Skeggs <darktama@iinet.net.au>2006-11-19 15:52:18 +0000
commit80a0ce37df7b7afef9cd1994527c5ed472c5c4cd (patch)
tree91d84c3a810510ef2e1b7603f0f2df55a3872f73 /src/mesa/drivers/dri
parenta2a747704d1b9572532ec0afd0ede6a4308ef032 (diff)
Fix nv30LineWidth, hw expects a ubyte.
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/nouveau/nv30_state.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nv30_state.c b/src/mesa/drivers/dri/nouveau/nv30_state.c
index 00ab1c3202..bf3338d499 100644
--- a/src/mesa/drivers/dri/nouveau/nv30_state.c
+++ b/src/mesa/drivers/dri/nouveau/nv30_state.c
@@ -414,8 +414,12 @@ static void nv30LineStipple(GLcontext *ctx, GLint factor, GLushort pattern )
static void nv30LineWidth(GLcontext *ctx, GLfloat width)
{
nouveauContextPtr nmesa = NOUVEAU_CONTEXT(ctx);
+ GLubyte ubWidth;
+
+ CLAMPED_FLOAT_TO_UBYTE(ubWidth, width);
+
BEGIN_RING_SIZE(NvSub3D, NV30_TCL_PRIMITIVE_3D_LINE_WIDTH_SMOOTH, 1);
- OUT_RINGf(width);
+ OUT_RING(ubWidth);
}
static void nv30LogicOpcode(GLcontext *ctx, GLenum opcode)