aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/main/context.c
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
committermarha <marha@users.sourceforge.net>2011-01-21 08:10:52 +0000
commitb0be6a88c8fecdf15176f642c0799bff99930e0d (patch)
treeec9fea5c77c9d705757c0533beb059c467a16393 /mesalib/src/mesa/main/context.c
parentb582c2f2afd66e3afa0d143923e8b71985e39a6c (diff)
downloadvcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.gz
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.tar.bz2
vcxsrv-b0be6a88c8fecdf15176f642c0799bff99930e0d.zip
xserver mesa xkbcomp libxcb git update 21 jan 2011
Diffstat (limited to 'mesalib/src/mesa/main/context.c')
-rw-r--r--mesalib/src/mesa/main/context.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/mesalib/src/mesa/main/context.c b/mesalib/src/mesa/main/context.c
index fe370fa36..e017939a4 100644
--- a/mesalib/src/mesa/main/context.c
+++ b/mesalib/src/mesa/main/context.c
@@ -534,8 +534,17 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MediumFloat.RangeMax = 127;
prog->MediumFloat.Precision = 23;
prog->LowFloat = prog->HighFloat = prog->MediumFloat;
- /* assume ints are stored as floats for now */
- prog->LowInt = prog->MediumInt = prog->HighInt = prog->MediumFloat;
+
+ /* Assume ints are stored as floats for now, since this is the least-common
+ * denominator. The OpenGL ES spec implies (page 132) that the precision
+ * of integer types should be 0. Practically speaking, IEEE
+ * single-precision floating point values can only store integers in the
+ * range [-0x01000000, 0x01000000] without loss of precision.
+ */
+ prog->MediumInt.RangeMin = 24;
+ prog->MediumInt.RangeMax = 24;
+ prog->MediumInt.Precision = 0;
+ prog->LowInt = prog->HighInt = prog->MediumInt;
}