diff options
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/ir_reader.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/glsl/ir_reader.cpp b/src/glsl/ir_reader.cpp index fd318c046e2..4eae4131c57 100644 --- a/src/glsl/ir_reader.cpp +++ b/src/glsl/ir_reader.cpp @@ -63,6 +63,7 @@ private: 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 *); @@ -375,6 +376,8 @@ ir_reader::read_instruction(s_expression *expr, ir_loop *loop_ctx) 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) @@ -1142,3 +1145,15 @@ ir_reader::read_end_primitive(s_expression *expr) 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; +} |