void renderer_draw_yuv(struct xa_context *r, float src_x, float src_y, float src_w, float src_h, int dst_x, int dst_y, int dst_w, int dst_h, struct xa_surface *srf[]) { const int num_attribs = 2; /*pos + tex coord */ setup_vertex_data_yuv(r, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h, srf); if (!r->scissor_valid) { r->scissor.minx = 0; r->scissor.miny = 0; r->scissor.maxx = r->dst->tex->width0; r->scissor.maxy = r->dst->tex->height0; } r->pipe->set_scissor_states(r->pipe, 0, 1, &r->scissor); cso_set_vertex_elements(r->cso, num_attribs, r->velems); util_draw_user_vertex_buffer(r->cso, r->buffer, PIPE_PRIM_QUADS, 4, /* verts */ num_attribs); /* attribs/vert */ r->buffer_size = 0; xa_scissor_reset(r); }
void renderer_draw_yuv(struct xa_context *r, float src_x, float src_y, float src_w, float src_h, int dst_x, int dst_y, int dst_w, int dst_h, struct xa_surface *srf[]) { struct pipe_context *pipe = r->pipe; struct pipe_resource *buf = 0; buf = setup_vertex_data_yuv(r, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h, srf); if (buf) { const int num_attribs = 2; /*pos + tex coord */ cso_set_vertex_elements(r->cso, num_attribs, r->velems); util_draw_vertex_buffer(pipe, r->cso, buf, 0, PIPE_PRIM_QUADS, 4, /* verts */ num_attribs); /* attribs/vert */ pipe_resource_reference(&buf, NULL); } }
void renderer_draw_yuv(struct xa_context *r, float src_x, float src_y, float src_w, float src_h, int dst_x, int dst_y, int dst_w, int dst_h, struct xa_surface *srf[]) { const int num_attribs = 2; /*pos + tex coord */ setup_vertex_data_yuv(r, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h, srf); cso_set_vertex_elements(r->cso, num_attribs, r->velems); util_draw_user_vertex_buffer(r->cso, r->buffer, PIPE_PRIM_QUADS, 4, /* verts */ num_attribs); /* attribs/vert */ r->buffer_size = 0; }
void renderer_draw_yuv(struct xorg_renderer *r, int src_x, int src_y, int src_w, int src_h, int dst_x, int dst_y, int dst_w, int dst_h, struct pipe_texture **textures) { struct pipe_context *pipe = r->pipe; struct pipe_buffer *buf = 0; buf = setup_vertex_data_yuv(r, src_x, src_y, src_w, src_h, dst_x, dst_y, dst_w, dst_h, textures); if (buf) { const int num_attribs = 2; /*pos + tex coord*/ util_draw_vertex_buffer(pipe, buf, 0, PIPE_PRIM_QUADS, 4, /* verts */ num_attribs); /* attribs/vert */ pipe_buffer_reference(&buf, NULL); } }