summaryrefslogtreecommitdiff
path: root/src/mesa/shader/shader_api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/shader/shader_api.c')
-rw-r--r--src/mesa/shader/shader_api.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mesa/shader/shader_api.c b/src/mesa/shader/shader_api.c
index 70ceb70fe7..48ba8b657a 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()
*/