summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-06-15 18:49:50 -0400
committerIlia Mirkin <[email protected]>2014-07-01 11:34:37 -0400
commit1d16dbf4160b41f1177827198a4bb32969e15809 (patch)
tree489272a9b237ea2c9a33cb1ce5694a92b2017588 /src/mesa
parent746e5260f6308e3d762c0480118d9be3ab5bb544 (diff)
mesa/st: add vertex stream support
Signed-off-by: Ilia Mirkin <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Brian Paul <[email protected]> Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_cb_queryobj.c2
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp10
2 files changed, 8 insertions, 4 deletions
diff --git a/src/mesa/state_tracker/st_cb_queryobj.c b/src/mesa/state_tracker/st_cb_queryobj.c
index 1aaa322f615..489f537d8bd 100644
--- a/src/mesa/state_tracker/st_cb_queryobj.c
+++ b/src/mesa/state_tracker/st_cb_queryobj.c
@@ -138,7 +138,7 @@ st_BeginQuery(struct gl_context *ctx, struct gl_query_object *q)
pipe->end_query(pipe, stq->pq_begin);
} else {
if (!stq->pq) {
- stq->pq = pipe->create_query(pipe, type, 0);
+ stq->pq = pipe->create_query(pipe, type, q->Stream);
stq->type = type;
}
if (stq->pq) {
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index a552bb4da01..13de2be4039 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -3139,14 +3139,18 @@ void
glsl_to_tgsi_visitor::visit(ir_emit_vertex *ir)
{
assert(this->prog->Target == GL_GEOMETRY_PROGRAM_NV);
- emit(ir, TGSI_OPCODE_EMIT, undef_dst, st_src_reg_for_int(0));
+
+ ir->stream->accept(this);
+ emit(ir, TGSI_OPCODE_EMIT, undef_dst, this->result);
}
void
glsl_to_tgsi_visitor::visit(ir_end_primitive *ir)
{
assert(this->prog->Target == GL_GEOMETRY_PROGRAM_NV);
- emit(ir, TGSI_OPCODE_ENDPRIM, undef_dst, st_src_reg_for_int(0));
+
+ ir->stream->accept(this);
+ emit(ir, TGSI_OPCODE_ENDPRIM, undef_dst, this->result);
}
glsl_to_tgsi_visitor::glsl_to_tgsi_visitor()
@@ -5524,7 +5528,7 @@ st_translate_stream_output_info(glsl_to_tgsi_visitor *glsl_to_tgsi,
so->output[i].num_components = info->Outputs[i].NumComponents;
so->output[i].output_buffer = info->Outputs[i].OutputBuffer;
so->output[i].dst_offset = info->Outputs[i].DstOffset;
- so->output[i].stream = 0; /* info->Outputs[i].StreamId */
+ so->output[i].stream = info->Outputs[i].StreamId;
}
for (i = 0; i < PIPE_MAX_SO_BUFFERS; i++) {