Clone of mesa.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

xorg_renderer.h 1.7KB

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