summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r--src/mesa/drivers/dri/sis/sis6326_clear.c2
-rw-r--r--src/mesa/drivers/dri/sis/sis_clear.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/sis/sis6326_clear.c b/src/mesa/drivers/dri/sis/sis6326_clear.c
index 29b95f94d9..be5addb7cf 100644
--- a/src/mesa/drivers/dri/sis/sis6326_clear.c
+++ b/src/mesa/drivers/dri/sis/sis6326_clear.c
@@ -65,7 +65,7 @@ set_color_pattern( sisContextPtr smesa, GLubyte red, GLubyte green,
void
sis6326UpdateZPattern(sisContextPtr smesa, GLclampd z)
{
- smesa->clearZStencilPattern = FLOAT_TO_USHORT(z * 65535.0);
+ CLAMPED_FLOAT_TO_USHORT(smesa->clearZStencilPattern, z * 65535.0);
}
void
diff --git a/src/mesa/drivers/dri/sis/sis_clear.c b/src/mesa/drivers/dri/sis/sis_clear.c
index f24454641d..d7807b157e 100644
--- a/src/mesa/drivers/dri/sis/sis_clear.c
+++ b/src/mesa/drivers/dri/sis/sis_clear.c
@@ -78,7 +78,7 @@ sisUpdateZStencilPattern( sisContextPtr smesa, GLclampd z, GLint stencil )
switch (smesa->zFormat)
{
case SiS_ZFORMAT_Z16:
- zPattern = FLOAT_TO_USHORT(z);
+ CLAMPED_FLOAT_TO_USHORT(zPattern, z);
zPattern |= zPattern << 16;
break;
case SiS_ZFORMAT_S8Z24: