summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRoland Scheidegger <[email protected]>2014-12-02 02:27:56 +0100
committerRoland Scheidegger <[email protected]>2014-12-06 18:03:11 +0100
commit1b6db3593ed716ff36f9300c2ad646a80682ea85 (patch)
tree3207f3224e256d2704060ec58e3e252d57bd9605 /src
parentfe86415beb8edfe3a6a4300ca537fae1bbad64a7 (diff)
draw: use the prim type from prim_info not emit in passthrough emit
The prim assembler may change the prim type when injecting prim ids now, which isn't reflected by what's stored in emit. This looks brittle and potentially dangerous (it is not obvious if such prim type changes are really supported by pt emit, the prim type is actually also set in prepare which would then be different). This fixes piglit primitive-id-no-gs-first-vertex.shader_test. Reviewed-by: Jose Fonseca <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/auxiliary/draw/draw_pt_emit.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt_emit.c b/src/gallium/auxiliary/draw/draw_pt_emit.c
index 011efe77010..b215c5f4db4 100644
--- a/src/gallium/auxiliary/draw/draw_pt_emit.c
+++ b/src/gallium/auxiliary/draw/draw_pt_emit.c
@@ -143,7 +143,7 @@ draw_pt_emit(struct pt_emit *emit,
/* XXX: and work out some way to coordinate the render primitive
* between vbuf.c and here...
*/
- draw->render->set_primitive(draw->render, emit->prim);
+ render->set_primitive(draw->render, prim_info->prim);
render->allocate_vertices(render,
(ushort)translate->key.output_stride,
@@ -214,7 +214,7 @@ draw_pt_emit_linear(struct pt_emit *emit,
/* XXX: and work out some way to coordinate the render primitive
* between vbuf.c and here...
*/
- draw->render->set_primitive(draw->render, emit->prim);
+ render->set_primitive(draw->render, prim_info->prim);
if (!render->allocate_vertices(render,
(ushort)translate->key.output_stride,