summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-09-07 19:24:15 +1200
committerJordan Justen <[email protected]>2015-06-12 15:12:39 -0700
commite7f628c2fc5ef42672e3281e224226c3d47b1bac (patch)
treeb997789e7f662e37ac6b89ca220275cc31244984 /src/mesa
parent86b4acb409a2103d6a12f83de7ec04af6cc05fec (diff)
glsl: Add ir node for barrier
v2: * Changes suggested by mattst88 [[email protected]: Add nir support] Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Ben Widawsky <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4.h1
-rw-r--r--src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp6
-rw-r--r--src/mesa/program/ir_to_mesa.cpp7
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp7
4 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h
index 06a16a49b6f..4449e0a52ce 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4.h
+++ b/src/mesa/drivers/dri/i965/brw_vec4.h
@@ -160,6 +160,7 @@ public:
virtual void visit(ir_if *);
virtual void visit(ir_emit_vertex *);
virtual void visit(ir_end_primitive *);
+ virtual void visit(ir_barrier *);
/*@}*/
src_reg result;
diff --git a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
index 242d007b355..0a76bde7726 100644
--- a/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
@@ -2967,6 +2967,12 @@ vec4_visitor::visit(ir_end_primitive *)
}
void
+vec4_visitor::visit(ir_barrier *)
+{
+ unreachable("not reached");
+}
+
+void
vec4_visitor::emit_untyped_atomic(unsigned atomic_op, unsigned surf_index,
dst_reg dst, src_reg offset,
src_reg src0, src_reg src1)
diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp
index 514bb930e76..18e3bc5d5cc 100644
--- a/src/mesa/program/ir_to_mesa.cpp
+++ b/src/mesa/program/ir_to_mesa.cpp
@@ -262,6 +262,7 @@ public:
virtual void visit(ir_if *);
virtual void visit(ir_emit_vertex *);
virtual void visit(ir_end_primitive *);
+ virtual void visit(ir_barrier *);
/*@}*/
src_reg result;
@@ -2117,6 +2118,12 @@ ir_to_mesa_visitor::visit(ir_end_primitive *)
assert(!"Geometry shaders not supported.");
}
+void
+ir_to_mesa_visitor::visit(ir_barrier *)
+{
+ unreachable("GLSL barrier() not supported.");
+}
+
ir_to_mesa_visitor::ir_to_mesa_visitor()
{
result.file = PROGRAM_UNDEFINED;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index 0e60d95c575..03834b69a23 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -395,6 +395,7 @@ public:
virtual void visit(ir_if *);
virtual void visit(ir_emit_vertex *);
virtual void visit(ir_end_primitive *);
+ virtual void visit(ir_barrier *);
/*@}*/
st_src_reg result;
@@ -3417,6 +3418,12 @@ glsl_to_tgsi_visitor::visit(ir_end_primitive *ir)
emit_asm(ir, TGSI_OPCODE_ENDPRIM, undef_dst, this->result);
}
+void
+glsl_to_tgsi_visitor::visit(ir_barrier *ir)
+{
+ unreachable("Not implemented!");
+}
+
glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
{
result.file = PROGRAM_UNDEFINED;