aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir_reader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mesalib/src/glsl/ir_reader.cpp')
-rw-r--r--mesalib/src/glsl/ir_reader.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/mesalib/src/glsl/ir_reader.cpp b/mesalib/src/glsl/ir_reader.cpp
index 00e2db9a3..7970112ec 100644
--- a/mesalib/src/glsl/ir_reader.cpp
+++ b/mesalib/src/glsl/ir_reader.cpp
@@ -412,33 +412,35 @@ ir_reader::read_declaration(s_expression *expr)
// FINISHME: Check for duplicate/conflicting qualifiers.
if (strcmp(qualifier->value(), "centroid") == 0) {
- var->centroid = 1;
+ var->data.centroid = 1;
+ } else if (strcmp(qualifier->value(), "sample") == 0) {
+ var->data.sample = 1;
} else if (strcmp(qualifier->value(), "invariant") == 0) {
- var->invariant = 1;
+ var->data.invariant = 1;
} else if (strcmp(qualifier->value(), "uniform") == 0) {
- var->mode = ir_var_uniform;
+ var->data.mode = ir_var_uniform;
} else if (strcmp(qualifier->value(), "auto") == 0) {
- var->mode = ir_var_auto;
+ var->data.mode = ir_var_auto;
} else if (strcmp(qualifier->value(), "in") == 0) {
- var->mode = ir_var_function_in;
+ var->data.mode = ir_var_function_in;
} else if (strcmp(qualifier->value(), "shader_in") == 0) {
- var->mode = ir_var_shader_in;
+ var->data.mode = ir_var_shader_in;
} else if (strcmp(qualifier->value(), "const_in") == 0) {
- var->mode = ir_var_const_in;
+ var->data.mode = ir_var_const_in;
} else if (strcmp(qualifier->value(), "out") == 0) {
- var->mode = ir_var_function_out;
+ var->data.mode = ir_var_function_out;
} else if (strcmp(qualifier->value(), "shader_out") == 0) {
- var->mode = ir_var_shader_out;
+ var->data.mode = ir_var_shader_out;
} else if (strcmp(qualifier->value(), "inout") == 0) {
- var->mode = ir_var_function_inout;
+ var->data.mode = ir_var_function_inout;
} else if (strcmp(qualifier->value(), "temporary") == 0) {
- var->mode = ir_var_temporary;
+ var->data.mode = ir_var_temporary;
} else if (strcmp(qualifier->value(), "smooth") == 0) {
- var->interpolation = INTERP_QUALIFIER_SMOOTH;
+ var->data.interpolation = INTERP_QUALIFIER_SMOOTH;
} else if (strcmp(qualifier->value(), "flat") == 0) {
- var->interpolation = INTERP_QUALIFIER_FLAT;
+ var->data.interpolation = INTERP_QUALIFIER_FLAT;
} else if (strcmp(qualifier->value(), "noperspective") == 0) {
- var->interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
+ var->data.interpolation = INTERP_QUALIFIER_NOPERSPECTIVE;
} else {
ir_read_error(expr, "unknown qualifier: %s", qualifier->value());
return NULL;
@@ -486,18 +488,16 @@ ir_reader::read_if(s_expression *expr, ir_loop *loop_ctx)
ir_loop *
ir_reader::read_loop(s_expression *expr)
{
- s_expression *s_counter, *s_from, *s_to, *s_inc, *s_body;
+ s_expression *s_body;
- s_pattern pat[] = { "loop", s_counter, s_from, s_to, s_inc, s_body };
- if (!MATCH(expr, pat)) {
- ir_read_error(expr, "expected (loop <counter> <from> <to> "
- "<increment> <body>)");
+ s_pattern loop_pat[] = { "loop", s_body };
+ if (!MATCH(expr, loop_pat)) {
+ ir_read_error(expr, "expected (loop <body>)");
return NULL;
}
- // FINISHME: actually read the count/from/to fields.
-
ir_loop *loop = new(mem_ctx) ir_loop;
+
read_instructions(&loop->body_instructions, s_body, loop);
if (state->error) {
delete loop;