Mesa (master): i965: tell GLSL compiler to emit code using condition codes

Brian Paul brianp at kemper.freedesktop.org
Mon Feb 16 19:05:39 UTC 2009


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

Author: Brian Paul <brianp at vmware.com>
Date:   Mon Feb 16 11:45:57 2009 -0700

i965: tell GLSL compiler to emit code using condition codes

The default for EmitCondCodes got flipped when gallium-0.2 was merged.
This fixes GLSL if/else/endif regressions.
Drivers that use GLSL should always explicitly set the flag to be safe.

---

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

diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index eaac622..d96ff29 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -121,6 +121,9 @@ GLboolean brwCreateContext( const __GLcontextModes *mesaVis,
    /* if conformance mode is set, swrast can handle any size AA point */
    ctx->Const.MaxPointSizeAA = 255.0;
 
+   /* We want the GLSL compiler to emit code that uses condition codes */
+   ctx->Shader.EmitCondCodes = GL_TRUE;
+
 /*    ctx->Const.MaxNativeVertexProgramTemps = 32; */
 
    brw_init_state( brw );




More information about the mesa-commit mailing list