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 <marek.olsak@amd.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
}
}
- assert(0);
return NULL;
}
}
-void
+bool
st_transform_feedback_draw_init(struct gl_transform_feedback_object *obj,
struct pipe_draw_info *out)
{
struct st_transform_feedback_object *sobj =
st_transform_feedback_object(obj);
+ if (sobj->draw_count == NULL)
+ return false;
out->count_from_stream_output = sobj->draw_count;
+ return true;
}
extern void
st_init_xformfb_functions(struct dd_function_table *functions);
-extern void
+extern bool
st_transform_feedback_draw_init(struct gl_transform_feedback_object *obj,
struct pipe_draw_info *out);
/* 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;
}
}