aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/glsl_parser_extras.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/glsl_parser_extras.cpp')
-rw-r--r--mesalib/src/glsl/glsl_parser_extras.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/mesalib/src/glsl/glsl_parser_extras.cpp b/mesalib/src/glsl/glsl_parser_extras.cpp
index d76d94b7a..5f19368d8 100644
--- a/mesalib/src/glsl/glsl_parser_extras.cpp
+++ b/mesalib/src/glsl/glsl_parser_extras.cpp
@@ -58,9 +58,9 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
: ctx(_ctx), switch_state()
{
switch (target) {
- case GL_VERTEX_SHADER: this->target = vertex_shader; break;
- case GL_FRAGMENT_SHADER: this->target = fragment_shader; break;
- case GL_GEOMETRY_SHADER: this->target = geometry_shader; break;
+ case GL_VERTEX_SHADER: this->target = MESA_SHADER_VERTEX; break;
+ case GL_FRAGMENT_SHADER: this->target = MESA_SHADER_FRAGMENT; break;
+ case GL_GEOMETRY_SHADER: this->target = MESA_SHADER_GEOMETRY; break;
}
this->scanner = NULL;
@@ -76,7 +76,8 @@ _mesa_glsl_parse_state::_mesa_glsl_parse_state(struct gl_context *_ctx,
this->loop_nesting_ast = NULL;
this->struct_specifier_depth = 0;
- this->num_builtins_to_link = 0;
+
+ this->uses_builtin_functions = false;
/* Set default language version and extensions */
this->language_version = ctx->Const.ForceGLSLVersion ?
@@ -366,12 +367,12 @@ _mesa_glsl_shader_target_name(GLenum type)
* our internal enum into short stage names.
*/
const char *
-_mesa_glsl_shader_target_name(enum _mesa_glsl_parser_targets target)
+_mesa_glsl_shader_target_name(gl_shader_type target)
{
switch (target) {
- case vertex_shader: return "vertex";
- case fragment_shader: return "fragment";
- case geometry_shader: return "geometry";
+ case MESA_SHADER_VERTEX: return "vertex";
+ case MESA_SHADER_FRAGMENT: return "fragment";
+ case MESA_SHADER_GEOMETRY: return "geometry";
}
assert(!"Should not get here.");
@@ -877,6 +878,8 @@ _mesa_ast_type_qualifier_print(const struct ast_type_qualifier *q)
if (q->flags.q.centroid)
printf("centroid ");
+ if (q->flags.q.sample)
+ printf("sample ");
if (q->flags.q.uniform)
printf("uniform ");
if (q->flags.q.smooth)
@@ -1532,10 +1535,7 @@ _mesa_glsl_compile_shader(struct gl_context *ctx, struct gl_shader *shader,
shader->InfoLog = state->info_log;
shader->Version = state->language_version;
shader->IsES = state->es_shader;
-
- memcpy(shader->builtins_to_link, state->builtins_to_link,
- sizeof(shader->builtins_to_link[0]) * state->num_builtins_to_link);
- shader->num_builtins_to_link = state->num_builtins_to_link;
+ shader->uses_builtin_functions = state->uses_builtin_functions;
if (shader->UniformBlocks)
ralloc_free(shader->UniformBlocks);