struct pipe_stream_output_target *draw_count;
};
+static INLINE struct st_transform_feedback_object *
+st_transform_feedback_object(struct gl_transform_feedback_object *obj)
+{
+ return (struct st_transform_feedback_object *) obj;
+}
static struct gl_transform_feedback_object *
st_new_transform_feedback(struct gl_context *ctx, GLuint name)
struct gl_transform_feedback_object *obj)
{
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
unsigned i;
pipe_so_target_reference(&sobj->draw_count, NULL);
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
unsigned i, max_num_targets;
max_num_targets = MIN2(Elements(sobj->base.Buffers),
{
struct st_context *st = st_context(ctx);
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
cso_set_stream_outputs(st->cso_context, sobj->num_targets, sobj->targets,
~0);
st_transform_feedback_get_draw_target(struct gl_transform_feedback_object *obj)
{
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
unsigned i;
for (i = 0; i < Elements(sobj->targets); i++) {
{
struct st_context *st = st_context(ctx);
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
cso_set_stream_outputs(st->cso_context, 0, NULL, 0);
struct pipe_draw_info *out)
{
struct st_transform_feedback_object *sobj =
- (struct st_transform_feedback_object*)obj;
+ st_transform_feedback_object(obj);
out->count_from_stream_output = sobj->draw_count;
}