Mesa (master): i965: Set correct values for range/ precision of fragment shader types

Ian Romanick idr at kemper.freedesktop.org
Thu Jan 20 13:39:01 PST 2011


Module: Mesa
Branch: master
Commit: 3d028024e581b05f71f0be915657c2c105885de6
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d028024e581b05f71f0be915657c2c105885de6

Author: Ian Romanick <ian.d.romanick at intel.com>
Date:   Thu Jan 20 12:07:21 2011 -0800

i965: Set correct values for range/precision of fragment shader types

---

 src/mesa/drivers/dri/i965/brw_context.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index 8fc322f..d3b61ab 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -151,6 +151,15 @@ GLboolean brwCreateContext( int api,
       MIN2(ctx->Const.FragmentProgram.MaxNativeParameters,
 	   ctx->Const.FragmentProgram.MaxEnvParams);
 
+   /* Fragment shaders use real, 32-bit twos-complement integers for all
+    * integer types.
+    */
+   ctx->FragmentProgram.LowInt.RangeMin = 31;
+   ctx->FragmentProgram.LowInt.RangeMax = 30;
+   ctx->FragmentProgram.LowInt.Precision = 0;
+   ctx->FragmentProgram.HighInt = ctx->FragmentProgram.MediumInt
+      = ctx->FragmentProgram.LowInt;
+
    /* Gen6 converts quads to polygon in beginning of 3D pipeline,
       but we're not sure how it's actually done for vertex order,
       that affect provoking vertex decision. Always use last vertex



More information about the mesa-commit mailing list