summaryrefslogtreecommitdiff
path: root/src/mesa/main/context.c
diff options
context:
space:
mode:
authorBrian Paul <brianp@vmware.com>2011-01-19 07:41:20 -0700
committerBrian Paul <brianp@vmware.com>2011-01-19 07:41:55 -0700
commit3ee60a3558a3546b3c3a0a9732d384afcf02994a (patch)
tree1a7ff57efb9ddeedf38d818de67277aa5b7bbf41 /src/mesa/main/context.c
parent34613c66acb6143719315d409f167124c78f5cde (diff)
mesa: implement glGetShaderPrecisionFormat()
Drivers should override the default range/precision info as needed. No drivers do this yet.
Diffstat (limited to 'src/mesa/main/context.c')
-rw-r--r--src/mesa/main/context.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mesa/main/context.c b/src/mesa/main/context.c
index 958ea10a42..fe370fa369 100644
--- a/src/mesa/main/context.c
+++ b/src/mesa/main/context.c
@@ -526,6 +526,16 @@ init_program_limits(GLenum type, struct gl_program_constants *prog)
prog->MaxNativeTemps = 0;
prog->MaxNativeAddressRegs = 0;
prog->MaxNativeParameters = 0;
+
+ /* Set GLSL datatype range/precision info assuming IEEE float values.
+ * Drivers should override these defaults as needed.
+ */
+ prog->MediumFloat.RangeMin = 127;
+ 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;
}