diff options
author | Dave Airlie <[email protected]> | 2012-12-12 21:14:58 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2012-12-14 11:34:15 +1000 |
commit | 55d37eb40edff67fa12d1729165b292b914d8e51 (patch) | |
tree | 4db46e7ec785faa016fba7b1ae4e456e330ce72c /src/gallium/auxiliary/draw/draw_pt.c | |
parent | 4330cfec8b5225283bccc03f53a440c20e8e5cb5 (diff) |
draw: add support for later transform feedback extensions
This adds support to draw for the new features of transform feedback.
a) fix count_from_stream_output, using max_index+1 for now but it looks
like it should be valid as its derived from the vertex elements/vbo.
b) fix striding and dst offsets in output buffers - was just wrong before.
c) fix crash if tfb is suspended (so.num_targets == 0)
This also enables the new features on softpipe. It should be possible
to enable them on llvmpipe as well after this commit, but would need
to schedule piglit runs.
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_pt.c')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_pt.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/auxiliary/draw/draw_pt.c b/src/gallium/auxiliary/draw/draw_pt.c index ddaedcdab5e..50b9efab7ea 100644 --- a/src/gallium/auxiliary/draw/draw_pt.c +++ b/src/gallium/auxiliary/draw/draw_pt.c @@ -464,7 +464,7 @@ draw_vbo(struct draw_context *draw, { unsigned instance; unsigned index_limit; - + unsigned count; assert(info->instance_count > 0); if (info->indexed) assert(draw->pt.user.elts); @@ -518,6 +518,11 @@ draw_vbo(struct draw_context *draw, draw->pt.max_index = index_limit - 1; + count = info->count; + if (count == 0) { + if (info->count_from_stream_output) + count = draw->pt.max_index + 1; + } /* * TODO: We could use draw->pt.max_index to further narrow @@ -531,7 +536,7 @@ draw_vbo(struct draw_context *draw, draw_pt_arrays_restart(draw, info); } else { - draw_pt_arrays(draw, info->mode, info->start, info->count); + draw_pt_arrays(draw, info->mode, info->start, count); } } } |