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.

NOTES 1.9KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. INTRODUCTION
  2. Mesa's native software rasterizer. This module provides the fallback
  3. paths for rasterization operations and states that aren't accelerated
  4. in hardware drivers, and as the full rasterization engine in software
  5. drivers.
  6. The swrast module 'stands alone', relying only on interfaces to core
  7. mesa and it's own driver interface. It knows nothing about the tnl or
  8. other modules, allowing it to be used for fallback paths in future tnl
  9. schemes without modification.
  10. As well as providing triangle/line/point rasterization functionality,
  11. the module provides implementations of the pixel operations
  12. (ReadPixels, etc), and texture operations (CopyTexSubImage) which may
  13. be plugged in to the core Mesa driver interface where accelerated
  14. versions of these operations are unavailable.
  15. STATE
  16. To create and destroy the module:
  17. GLboolean _swrast_CreateContext( GLcontext *ctx );
  18. void _swrast_DestroyContext( GLcontext *ctx );
  19. This module tracks state changes internally and maintains derived
  20. values based on the current state. For this to work, the driver
  21. ensure the following funciton is called whenever the state changes and
  22. the swsetup module is 'awake':
  23. void _swrast_InvalidateState( GLcontext *ctx, GLuint new_state );
  24. There is no explicit call to put the swrast module to sleep.
  25. CUSTOMIZATION
  26. void (*choose_point)( GLcontext * );
  27. void (*choose_line)( GLcontext * );
  28. void (*choose_triangle)( GLcontext * );
  29. Drivers may add additional triangle/line/point functions to swrast by
  30. overriding these functions. It is necessary for the driver to be very
  31. careful that it doesn't return an inappropriate function, eg a
  32. rasterization function in feedback mode. See the X11 driver for
  33. examples.
  34. DRIVER INTERFACE
  35. The swrast device driver provides swrast primarily with span- and
  36. pixel- level interfaces to a framebuffer, with a few additional hooks
  37. for locking and setting the read buffer.
  38. See the definition of struct swrast_device_driver in swrast.h.