aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/glsl/ir.h
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
committermarha <marha@users.sourceforge.net>2014-07-01 09:29:23 +0200
commitb6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad (patch)
tree2cf97060ce44345489da6d1bcbbe568d2b2ea666 /mesalib/src/glsl/ir.h
parentac314766fd4f60b8ee0346b7586c1a5a6f533e11 (diff)
parentcfc5bafcb2db8c6e05d7be6bb7315960be08c0d8 (diff)
downloadvcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.gz
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.tar.bz2
vcxsrv-b6fac85cb1bb78f48ed81aaf42ba6b840b2d6cad.zip
Merge remote-tracking branch 'origin/released'
* origin/released: fontconfig mesa pixman git update 1 July 2014
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r--mesalib/src/glsl/ir.h39
1 files changed, 31 insertions, 8 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h
index b4e52d3d0..d5239d4de 100644
--- a/mesalib/src/glsl/ir.h
+++ b/mesalib/src/glsl/ir.h
@@ -706,6 +706,11 @@ public:
int location;
/**
+ * Vertex stream output identifier.
+ */
+ unsigned stream;
+
+ /**
* output index for dual source blending.
*/
int index;
@@ -2154,9 +2159,11 @@ private:
*/
class ir_emit_vertex : public ir_instruction {
public:
- ir_emit_vertex()
- : ir_instruction(ir_type_emit_vertex)
+ ir_emit_vertex(ir_rvalue *stream)
+ : ir_instruction(ir_type_emit_vertex),
+ stream(stream)
{
+ assert(stream);
}
virtual void accept(ir_visitor *v)
@@ -2164,12 +2171,19 @@ public:
v->visit(this);
}
- virtual ir_emit_vertex *clone(void *mem_ctx, struct hash_table *) const
+ virtual ir_emit_vertex *clone(void *mem_ctx, struct hash_table *ht) const
{
- return new(mem_ctx) ir_emit_vertex();
+ return new(mem_ctx) ir_emit_vertex(this->stream->clone(mem_ctx, ht));
}
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
+
+ int stream_id() const
+ {
+ return stream->as_constant()->value.i[0];
+ }
+
+ ir_rvalue *stream;
};
/**
@@ -2178,9 +2192,11 @@ public:
*/
class ir_end_primitive : public ir_instruction {
public:
- ir_end_primitive()
- : ir_instruction(ir_type_end_primitive)
+ ir_end_primitive(ir_rvalue *stream)
+ : ir_instruction(ir_type_end_primitive),
+ stream(stream)
{
+ assert(stream);
}
virtual void accept(ir_visitor *v)
@@ -2188,12 +2204,19 @@ public:
v->visit(this);
}
- virtual ir_end_primitive *clone(void *mem_ctx, struct hash_table *) const
+ virtual ir_end_primitive *clone(void *mem_ctx, struct hash_table *ht) const
{
- return new(mem_ctx) ir_end_primitive();
+ return new(mem_ctx) ir_end_primitive(this->stream->clone(mem_ctx, ht));
}
virtual ir_visitor_status accept(ir_hierarchical_visitor *);
+
+ int stream_id() const
+ {
+ return stream->as_constant()->value.i[0];
+ }
+
+ ir_rvalue *stream;
};
/*@}*/