summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965
diff options
context:
space:
mode:
authorLuca Barbieri <[email protected]>2010-09-05 18:49:54 +0200
committerIan Romanick <[email protected]>2010-09-08 20:36:37 -0700
commit6d3a2c97f4a78e85545286e0e126cd3a27bd1cbd (patch)
tree90583a2499c09d4211616dd2b36a3e9134092c2c /src/mesa/drivers/dri/i965
parentede4205b245ee58bacf866d298273ebbe31feacf (diff)
glsl: make compiler options per-target
This allows us to specify different options, especially useful for chips without unified shaders. Signed-off-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965')
-rw-r--r--src/mesa/drivers/dri/i965/brw_context.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_context.c b/src/mesa/drivers/dri/i965/brw_context.c
index d2b20165f9d..daa281ece46 100644
--- a/src/mesa/drivers/dri/i965/brw_context.c
+++ b/src/mesa/drivers/dri/i965/brw_context.c
@@ -66,6 +66,7 @@ GLboolean brwCreateContext( int api,
struct brw_context *brw = (struct brw_context *) CALLOC_STRUCT(brw_context);
struct intel_context *intel = &brw->intel;
GLcontext *ctx = &intel->ctx;
+ unsigned i;
if (!brw) {
printf("%s: failed to alloc context\n", __FUNCTION__);
@@ -110,8 +111,10 @@ GLboolean brwCreateContext( int api,
ctx->Const.MaxPointSizeAA = 255.0;
/* We want the GLSL compiler to emit code that uses condition codes */
- ctx->Shader.EmitCondCodes = GL_TRUE;
- ctx->Shader.EmitNVTempInitialization = GL_TRUE;
+ for (i = 0; i <= MESA_SHADER_FRAGMENT; i++) {
+ ctx->ShaderCompilerOptions[i].EmitCondCodes = GL_TRUE;
+ ctx->ShaderCompilerOptions[i].EmitNVTempInitialization = GL_TRUE;
+ }
ctx->Const.VertexProgram.MaxNativeInstructions = (16 * 1024);
ctx->Const.VertexProgram.MaxAluInstructions = 0;