ir_texture *read_texture(s_expression *);
ir_emit_vertex *read_emit_vertex(s_expression *);
ir_end_primitive *read_end_primitive(s_expression *);
+ ir_barrier *read_barrier(s_expression *);
ir_dereference *read_dereference(s_expression *);
ir_dereference_variable *read_var_ref(s_expression *);
inst = read_emit_vertex(list);
} else if (strcmp(tag->value(), "end-primitive") == 0) {
inst = read_end_primitive(list);
+ } else if (strcmp(tag->value(), "barrier") == 0) {
+ inst = read_barrier(list);
} else {
inst = read_rvalue(list);
if (inst == NULL)
ir_read_error(NULL, "when reading end-primitive");
return NULL;
}
+
+ir_barrier *
+ir_reader::read_barrier(s_expression *expr)
+{
+ s_pattern pat[] = { "barrier" };
+
+ if (MATCH(expr, pat)) {
+ return new(mem_ctx) ir_barrier();
+ }
+ ir_read_error(NULL, "when reading barrier");
+ return NULL;
+}