From ae6eba3e32a142665d2ae6e15c9122d3201c0b5d Mon Sep 17 00:00:00 2001 From: Bryan Cain Date: Fri, 15 Feb 2013 09:26:35 -0600 Subject: glsl: add ir_emit_vertex and ir_end_primitive instruction types These correspond to the EmitVertex and EndPrimitive functions in GLSL. v2 (Paul Berry ): Add stub implementations of new pure visitor functions to i965's vec4_visitor and fs_visitor classes. v3 (Paul Berry ): Rename classes to be more consistent with the names used in the GL spec. Reviewed-by: Ian Romanick Reviewed-by: Kenneth Graunke --- src/mesa/program/ir_to_mesa.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/mesa/program') diff --git a/src/mesa/program/ir_to_mesa.cpp b/src/mesa/program/ir_to_mesa.cpp index 14f43f64e24..ae78aca19d3 100644 --- a/src/mesa/program/ir_to_mesa.cpp +++ b/src/mesa/program/ir_to_mesa.cpp @@ -265,6 +265,8 @@ public: virtual void visit(ir_discard *); virtual void visit(ir_texture *); virtual void visit(ir_if *); + virtual void visit(ir_emit_vertex *); + virtual void visit(ir_end_primitive *); /*@}*/ src_reg result; @@ -2252,6 +2254,18 @@ ir_to_mesa_visitor::visit(ir_if *ir) if_inst = emit(ir->condition, OPCODE_ENDIF); } +void +ir_to_mesa_visitor::visit(ir_emit_vertex *ir) +{ + assert(!"Geometry shaders not supported."); +} + +void +ir_to_mesa_visitor::visit(ir_end_primitive *ir) +{ + assert(!"Geometry shaders not supported."); +} + ir_to_mesa_visitor::ir_to_mesa_visitor() { result.file = PROGRAM_UNDEFINED; -- cgit v1.2.3