summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2011-01-20 12:07:51 -0800
committerIan Romanick <[email protected]>2011-01-20 13:35:59 -0800
commit790ff232e2607a83e6207d06900a5e3de613d161 (patch)
tree9a6c69ddd827251638e70af7f80ec2f7334dc438 /src
parent3d028024e581b05f71f0be915657c2c105885de6 (diff)
i915: Set correct values for range/precision of fragment shader types
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/i915/i915_context.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i915/i915_context.c b/src/mesa/drivers/dri/i915/i915_context.c
index f32f3cf6020..49ad7db2893 100644
--- a/src/mesa/drivers/dri/i915/i915_context.c
+++ b/src/mesa/drivers/dri/i915/i915_context.c
@@ -168,6 +168,20 @@ i915CreateContext(int api,
MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
ctx->Const.FragmentProgram.MaxEnvParams);
+ /* i915 stores all values in single-precision floats. Values aren't set
+ * for other program targets because software is used for those targets.
+ */
+ ctx->FragmentProgram.MediumFloat.RangeMin = 127;
+ ctx->FragmentProgram.MediumFloat.RangeMax = 127;
+ ctx->FragmentProgram.MediumFloat.Precision = 23;
+ ctx->FragmentProgram.LowFloat = ctx->FragmentProgram.HighFloat =
+ ctx->FragmentProgram.MediumFloat;
+ ctx->FragmentProgram.MediumInt.RangeMin = 24;
+ ctx->FragmentProgram.MediumInt.RangeMax = 24;
+ ctx->FragmentProgram.MediumInt.Precision = 0;
+ ctx->FragmentProgram.LowInt = ctx->FragmentProgram.HighInt =
+ ctx->FragmentProgram.MediumInt;
+
ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE;
/* FINISHME: Are there other options that should be enabled for software