diff options
author | Dave Airlie <[email protected]> | 2015-07-30 20:44:50 +1000 |
---|---|---|
committer | Dave Airlie <[email protected]> | 2015-07-31 07:27:29 +1000 |
commit | 518abd0bbe1886550b43c62679a2ebd41e8199e9 (patch) | |
tree | c4da9aaa441b30754c1971fe38c7b31a49561b43 /src/mesa/state_tracker/st_draw.c | |
parent | fdb84876134ed074563b842eae20fd10dbe9e8d6 (diff) |
st/mesa: don't draw instead of asserting in transform feedback
if we get a request to take the count from feedback, but there
is no buffer to take it from, just draw as if we got 0 vertices
so nothing.
This fixes this assert killing the ogl conform, and a piglit
test I've sent.
Reviewed-by: Marek Olšák <[email protected]>
Signed-off-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_draw.c')
-rw-r--r-- | src/mesa/state_tracker/st_draw.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_draw.c b/src/mesa/state_tracker/st_draw.c index 66b2f832933..bae8096e080 100644 --- a/src/mesa/state_tracker/st_draw.c +++ b/src/mesa/state_tracker/st_draw.c @@ -242,7 +242,8 @@ st_draw_vbo(struct gl_context *ctx, /* Transform feedback drawing is always non-indexed. */ /* Set info.count_from_stream_output. */ if (tfb_vertcount) { - st_transform_feedback_draw_init(tfb_vertcount, &info); + if (st_transform_feedback_draw_init(tfb_vertcount, &info) == false) + return; } } |