On Wed, 2014-06-18 at 13:31 -0700, Ian Romanick wrote: > This patch should be split into several patches: > > 1. Modify ir_emit_vertex to have a stream. This patch also needs to update > ir_to_mesa.cpp and st_glsl_to_tgsi.cpp. > > 2. Modify ir_end_primitive to have a stream. This patch also needs to update > ir_to_mesa.cpp and st_glsl_to_tgsi.cpp. > > 3. Add the new built-in functions.
Ok, I will rework the patch accordingly. > A couple other minor comments below... (...) > > +ir_function_signature * > > +builtin_builder::_EmitStreamVertex(builtin_available_predicate avail, > > + const glsl_type *stream_type) > > +{ > > Please add a spec quotation for this. I had to go look it up to be sure > ir_var_const_in was correct. > > /* Section 8.12 (Geometry Shader Functions) of the OpenGL 4.0 spec says: > * > * "Completes the current output primitive on stream stream and starts > * a new one. The argument to stream must be a constant integral > * expression." > */ I think you meant the GLSL 4.0 spec here. > > + ir_variable *stream = > > + new(mem_ctx) ir_variable(stream_type, "stream", ir_var_const_in); > > + > > + MAKE_SIG(glsl_type::void_type, avail, 1, stream); > > + > > + body.emit(new(mem_ctx) ir_emit_vertex(var_ref(stream))); > > > > return sig; > > } > > @@ -3882,7 +3915,22 @@ builtin_builder::_EndPrimitive() > > { > > MAKE_SIG(glsl_type::void_type, gs_only, 0); > > > > - body.emit(new(mem_ctx) ir_end_primitive()); > > + ir_rvalue *stream = new(mem_ctx) ir_constant(0, 1); > > + body.emit(new(mem_ctx) ir_end_primitive(stream)); > > + > > + return sig; > > +} (...) Iago _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev