diff options
author | Brian <[email protected]> | 2007-02-26 18:33:50 -0700 |
---|---|---|
committer | Brian <[email protected]> | 2007-02-26 18:33:50 -0700 |
commit | fa4d0364246d24b3f86bc9a8486a9ad7db60f1b3 (patch) | |
tree | 70d5314ef45e5c2e2a0667b9310f2afd5e0b9b82 /src/mesa/shader/shader_api.c | |
parent | 4f26a52908d14b753199a529fd4c24da608ead29 (diff) |
Add EmitHighLevelInstructions, EmitComments booleans to gl_shader_state.
These control code generation options. May be overridden by drivers, debuggers, etc.
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r-- | src/mesa/shader/shader_api.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c index 70ceb70fe74..48ba8b657a0 100644 --- a/src/mesa/shader/shader_api.c +++ b/src/mesa/shader/shader_api.c @@ -196,16 +196,20 @@ _mesa_lookup_shader(GLcontext *ctx, GLuint name) } +/** + * Initialize context's shader state. + */ void _mesa_init_shader_state(GLcontext * ctx) { - /* no-op */ + /* Device drivers may override these to control what kind of instructions + * are generated by the GLSL compiler. + */ + ctx->Shader.EmitHighLevelInstructions = GL_TRUE; + ctx->Shader.EmitComments = GL_FALSE; } - - - /** * Copy string from <src> to <dst>, up to maxLength characters, returning * length of <dst> in <length>. @@ -227,8 +231,6 @@ copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) } - - /** * Called via ctx->Driver.AttachShader() */ |