From fa4d0364246d24b3f86bc9a8486a9ad7db60f1b3 Mon Sep 17 00:00:00 2001 From: Brian Date: Mon, 26 Feb 2007 18:33:50 -0700 Subject: Add EmitHighLevelInstructions, EmitComments booleans to gl_shader_state. These control code generation options. May be overridden by drivers, debuggers, etc. --- src/mesa/shader/shader_api.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src/mesa/shader/shader_api.c') 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 to , up to maxLength characters, returning * length of in . @@ -227,8 +231,6 @@ copy_string(GLchar *dst, GLsizei maxLength, GLsizei *length, const GLchar *src) } - - /** * Called via ctx->Driver.AttachShader() */ -- cgit v1.2.3