aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mesa/swrast_setup/NOTES
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2009-12-22 18:34:14 +0000
committermarha <marha@users.sourceforge.net>2009-12-22 18:34:14 +0000
commit1e723abc27bdc2ad675bce79467a7308c2966861 (patch)
treea04f4d5cf04567351c85d43e720a3b762322d106 /mesalib/src/mesa/swrast_setup/NOTES
parentb729d9e1cc1c60e415da24143cabcbaccb525ed7 (diff)
downloadvcxsrv-1e723abc27bdc2ad675bce79467a7308c2966861.tar.gz
vcxsrv-1e723abc27bdc2ad675bce79467a7308c2966861.tar.bz2
vcxsrv-1e723abc27bdc2ad675bce79467a7308c2966861.zip
Forgotten files in previous commit
Diffstat (limited to 'mesalib/src/mesa/swrast_setup/NOTES')
-rw-r--r--mesalib/src/mesa/swrast_setup/NOTES65
1 files changed, 65 insertions, 0 deletions
diff --git a/mesalib/src/mesa/swrast_setup/NOTES b/mesalib/src/mesa/swrast_setup/NOTES
new file mode 100644
index 000000000..c6cb4ab34
--- /dev/null
+++ b/mesalib/src/mesa/swrast_setup/NOTES
@@ -0,0 +1,65 @@
+INTRODUCTION
+
+A helper module which provides glue to bind the software rasterizer to
+the software t&l module. The main task of this module is to build
+swrast vertices from the t&l vertex_buffer structs, and to use them to
+perform triangle setup functions not implemented in the software
+rasterizer.
+
+The module implements a full set of functions to plug into the
+t_vb_render.c driver interface (tnl->Driver.Render.*).
+
+There are strong advantages to decoupling the software rasterizer from
+the t&l module, primarily allowing hardware drivers better control
+over fallbacks, the removal of implicit knowledge about the software
+rasterizer in the t&l module, allowing the two modules to evolve
+independently and allowing either to be substituted with equivalent
+functionality from another codebase.
+
+This module implements triangle/quad setup for offset, unfilled and
+twoside-lit triangles. The software rasterizer doesn't handle these
+primitives directly.
+
+Hardware rasterization drivers typically use this module in situations
+where no hardware rasterization is possible, ie during total
+fallbacks.
+
+STATE
+
+To create and destroy the module:
+
+ GLboolean _swsetup_CreateContext( GLcontext *ctx );
+ void _swsetup_DestroyContext( GLcontext *ctx );
+
+The module is not active by default, and must be installed by calling
+_swrast_Wakeup(). This function installs internal swrast_setup
+functions into all the tnl->Driver.Render driver hooks, thus taking
+over the task of rasterization entirely:
+
+ void _swrast_Wakeup( GLcontext *ctx );
+
+
+This module tracks state changes internally and maintains derived
+values based on the current state. For this to work, the driver
+ensure the following funciton is called whenever the state changes and
+the swsetup module is 'awake':
+
+ void _swsetup_InvalidateState( GLcontext *ctx, GLuint new_state );
+
+There is no explicit call to put the swsetup module to sleep. Simply
+install other function pointers into all the tnl->Driver.Render.*
+hooks, and (optionally) cease calling _swsetup_InvalidateState().
+
+DRIVER INTERFACE
+
+The module offers a minimal driver interface:
+
+ void (*Start)( GLcontext *ctx );
+ void (*Finish)( GLcontext *ctx );
+
+These are called before and after the completion of all swrast drawing
+activity. As swrast doesn't call callbacks during triangle, line or
+point rasterization, these are necessary to provide locking hooks for
+some drivers. They may otherwise be left null.
+
+