xorg_renderer.h revision 319a588238b4c0c58f8f8807e1143ad79cd8f698
1#ifndef XORG_RENDERER_H 2#define XORG_RENDERER_H 3 4#include "pipe/p_context.h" 5#include "pipe/p_state.h" 6 7struct xorg_shaders; 8struct exa_pixmap_priv; 9 10struct xorg_renderer { 11 struct pipe_context *pipe; 12 13 struct cso_context *cso; 14 struct xorg_shaders *shaders; 15 16 struct pipe_constant_buffer vs_const_buffer; 17 struct pipe_constant_buffer fs_const_buffer; 18 19 /* we should combine these two */ 20 float vertices2[4][2][4]; 21 float vertices3[4][3][4]; 22}; 23 24struct xorg_renderer *renderer_create(struct pipe_context *pipe); 25void renderer_destroy(struct xorg_renderer *renderer); 26 27void renderer_bind_framebuffer(struct xorg_renderer *r, 28 struct exa_pixmap_priv *priv); 29void renderer_bind_viewport(struct xorg_renderer *r, 30 struct exa_pixmap_priv *dst); 31void renderer_bind_rasterizer(struct xorg_renderer *r); 32void renderer_set_constants(struct xorg_renderer *r, 33 int shader_type, 34 const float *buffer, 35 int size); 36void renderer_copy_pixmap(struct xorg_renderer *r, 37 struct exa_pixmap_priv *dst_priv, int dx, int dy, 38 struct exa_pixmap_priv *src_priv, int sx, int sy, 39 int width, int height); 40 41void renderer_draw_solid_rect(struct xorg_renderer *r, 42 int x0, int y0, 43 int x1, int y1, 44 float *color); 45 46void renderer_draw_textures(struct xorg_renderer *r, 47 int *pos, 48 int width, int height, 49 struct pipe_texture **textures, 50 int num_textures); 51 52 53#endif 54