diff options
author | Luca Barbieri <luca@luca-barbieri.com> | 2010-09-05 18:49:54 +0200 |
---|---|---|
committer | Ian Romanick <ian.d.romanick@intel.com> | 2010-09-08 20:36:37 -0700 |
commit | 6d3a2c97f4a78e85545286e0e126cd3a27bd1cbd (patch) | |
tree | 90583a2499c09d4211616dd2b36a3e9134092c2c /src/mesa/main/mtypes.h | |
parent | ede4205b245ee58bacf866d298273ebbe31feacf (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 <ian.d.romanick@intel.com>
Diffstat (limited to 'src/mesa/main/mtypes.h')
-rw-r--r-- | src/mesa/main/mtypes.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 7d5ce7040b..61cd93c364 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2175,6 +2175,16 @@ struct gl_shader_program struct gl_shader_state { struct gl_shader_program *CurrentProgram; /**< The user-bound program */ + void *MemPool; + + GLbitfield Flags; /**< Mask of GLSL_x flags */ +}; + +/** + * Compiler options for a single GLSL shaders type + */ +struct gl_shader_compiler_options +{ /** Driver-selectable options: */ GLboolean EmitHighLevelInstructions; /**< IF/ELSE/ENDIF vs. BRA, etc. */ GLboolean EmitContReturn; /**< Emit CONT/RET opcodes? */ @@ -2186,12 +2196,10 @@ struct gl_shader_state * support control flow. */ GLboolean EmitNoIfs; - void *MemPool; - GLbitfield Flags; /**< Mask of GLSL_x flags */ + struct gl_sl_pragmas DefaultPragmas; /**< Default #pragma settings */ }; - /** * Transform feedback object state */ @@ -3212,6 +3220,7 @@ struct __GLcontextRec struct gl_ati_fragment_shader_state ATIFragmentShader; struct gl_shader_state Shader; /**< GLSL shader object state */ + struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_TYPES]; struct gl_query_state Query; /**< occlusion, timer queries */ |