[Mesa-dev] [PATCH 3/3] doxy-text files added

Kevin Rogovin kevin.rogovin at intel.com
Mon Oct 7 23:00:33 PDT 2013


---
 doxygen/all.doxy                         |   1 +
 src/gbm/gbm.doxy_text                    |  15 ++
 src/mesa/drivers/dri/i965/i965.doxy_text | 176 +++++++++++++++++++++
 src/mesa/main/main.doxy_text             | 257 +++++++++++++++++++++++++++++++
 src/mesa/program/program.doxy_text       |  33 ++++
 src/mesa/swrast/swrast.doxy_text         |  42 +++++
 src/mesa/tnl/tnl.doxy_text               |  33 ++++
 src/mesa/vbo/vbo.doxy_text               | 158 +++++++++++++++++++
 8 files changed, 715 insertions(+)
 create mode 100644 src/gbm/gbm.doxy_text
 create mode 100644 src/mesa/drivers/dri/i965/i965.doxy_text
 create mode 100644 src/mesa/main/main.doxy_text
 create mode 100644 src/mesa/program/program.doxy_text
 create mode 100644 src/mesa/swrast/swrast.doxy_text
 create mode 100644 src/mesa/tnl/tnl.doxy_text
 create mode 100644 src/mesa/vbo/vbo.doxy_text

diff --git a/doxygen/all.doxy b/doxygen/all.doxy
index 46a00de..e86fe00 100644
--- a/doxygen/all.doxy
+++ b/doxygen/all.doxy
@@ -37,6 +37,7 @@ INPUT                  = ../src/mesa/main/ \
 		         ../src/mesa/drivers/dri/i965 \
 		         ../src/glx/ \
 		         ../src/glsl/ \
+                         ../src/gbm \
 		         ../src/gbm/main \
 		         ../src/gbm/backends/dri/ \
 		         ../src/egl/ \
diff --git a/src/gbm/gbm.doxy_text b/src/gbm/gbm.doxy_text
new file mode 100644
index 0000000..3730549
--- /dev/null
+++ b/src/gbm/gbm.doxy_text
@@ -0,0 +1,15 @@
+/**
+ * \page GBM The Generic Buffer Manager
+ *
+ * This module provides an abstraction that the caller can use to request a
+ * buffer from the underlying memory management system for the platform.
+ *
+ * This allows the creation of portable code whilst still allowing access to
+ * the underlying memory manager.
+ */
+
+- ../src/gbm/backends/dri/gbm_dri.c
+- ../src/gbm/backends/dri/driver_name.c
+- ../src/gbm/main/common.c
+- ../src/gbm/main/backend.c
+- ../src/gbm/main/gbm.c
diff --git a/src/mesa/drivers/dri/i965/i965.doxy_text b/src/mesa/drivers/dri/i965/i965.doxy_text
new file mode 100644
index 0000000..abbf049
--- /dev/null
+++ b/src/mesa/drivers/dri/i965/i965.doxy_text
@@ -0,0 +1,176 @@
+/*!
+
+\page I965DRIVER i965 Driver
+
+\section I965DRIVER_OVW Overview
+  The i965 driver implements the driver hardware backend for Intel GPU's for 
+generation 4, 5, 6, 7 and 7.5 (in progress), The GL context is embodied by 
+\ref brw_context (whose first member variable is \ref gl_context to allow
+for simple upcasting). 
+
+\subsection I965DRIVER_INIT Initialization
+
+An instance of a \ref brw_context is created with \ref brwCreateContext().
+
+Driver functions, i.e. values copied into \ref gl_context#Driver 
+(by \ref _mesa_initialize_context() ) are essentially 
+determined by \ref brwInitDriverFunctions(). Note that what functions are used, 
+and for that matter what features are supported, depends on 
+the value of \ref intel_screen#gen (copied to \ref brw_context#gen)
+which specifies the GPU Intel generation (6=Sandy Bridge, 7=Ivy Bridge, etc).
+
+In addition, a number of the functions to which values of 
+\ref gl_context#Driver are set rely on values stored in the function
+table \ref brw_context#vbl. These values are set in \ref brwInitVtbl().
+
+The draw function, see \ref vbo_context#draw_prims is \ref brw_draw_prims().
+
+\subsection SS_i965 State and Sending State to GPU
+
+The i965 driver creates a command stream to which to send to the GPU (see ).
+How state changes/values are updated is different for different generations. To
+handle this, the i965 driver makes use of \ref brw_tracked_state values
+to track state and correctly insert the values into the instruction stream.
+What functions to use is set by \ref brw_init_state(), the function to use
+and the "current state of the GPU as far as the context is concerned" are
+found in \ref brw_context#atoms. Change state is uploaded
+for each draw call (see \ref brw_draw_prims()) by \ref brw_upload_state(). 
+
+
+\section ToClassify
+Files left to look at
+- src/mesa/drivers/dri/i965/brw_binding_tables.c
+- src/mesa/drivers/dri/i965/brw_blorp_blit.cpp
+- src/mesa/drivers/dri/i965/brw_blorp_clear.cpp
+- src/mesa/drivers/dri/i965/brw_blorp.cpp
+- src/mesa/drivers/dri/i965/brw_cc.c
+- src/mesa/drivers/dri/i965/brw_cfg.cpp
+- src/mesa/drivers/dri/i965/brw_clear.c
+- src/mesa/drivers/dri/i965/brw_clip.c
+- src/mesa/drivers/dri/i965/brw_clip_line.c
+- src/mesa/drivers/dri/i965/brw_clip_point.c
+- src/mesa/drivers/dri/i965/brw_clip_state.c
+- src/mesa/drivers/dri/i965/brw_clip_tri.c
+- src/mesa/drivers/dri/i965/brw_clip_unfilled.c
+- src/mesa/drivers/dri/i965/brw_clip_util.c
+- src/mesa/drivers/dri/i965/brw_context.c
+- src/mesa/drivers/dri/i965/brw_cubemap_normalize.cpp
+- src/mesa/drivers/dri/i965/brw_curbe.c
+- src/mesa/drivers/dri/i965/brw_disasm.c
+- src/mesa/drivers/dri/i965/brw_draw.c
+- src/mesa/drivers/dri/i965/brw_draw_upload.c
+- src/mesa/drivers/dri/i965/brw_eu.c
+- src/mesa/drivers/dri/i965/brw_eu_compact.c
+- src/mesa/drivers/dri/i965/brw_eu_emit.c
+- src/mesa/drivers/dri/i965/brw_eu_util.c
+- src/mesa/drivers/dri/i965/brw_fs_channel_expressions.cpp
+- src/mesa/drivers/dri/i965/brw_fs_copy_propagation.cpp
+- src/mesa/drivers/dri/i965/brw_fs.cpp
+- src/mesa/drivers/dri/i965/brw_fs_cse.cpp
+- src/mesa/drivers/dri/i965/brw_fs_fp.cpp
+- src/mesa/drivers/dri/i965/brw_fs_generator.cpp
+- src/mesa/drivers/dri/i965/brw_fs_live_variables.cpp
+- src/mesa/drivers/dri/i965/brw_fs_reg_allocate.cpp
+- src/mesa/drivers/dri/i965/brw_fs_vector_splitting.cpp
+- src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+- src/mesa/drivers/dri/i965/brw_gs.c
+- src/mesa/drivers/dri/i965/brw_gs_emit.c
+- src/mesa/drivers/dri/i965/brw_gs_state.c
+- src/mesa/drivers/dri/i965/brw_gs_surface_state.c
+- src/mesa/drivers/dri/i965/brw_interpolation_map.c
+- src/mesa/drivers/dri/i965/brw_lower_texture_gradients.cpp
+- src/mesa/drivers/dri/i965/brw_misc_state.c
+- src/mesa/drivers/dri/i965/brw_object_purgeable.c
+- src/mesa/drivers/dri/i965/brw_performance_monitor.c
+- src/mesa/drivers/dri/i965/brw_primitive_restart.c
+- src/mesa/drivers/dri/i965/brw_program.c
+- src/mesa/drivers/dri/i965/brw_queryobj.c
+- src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+- src/mesa/drivers/dri/i965/brw_sf.c
+- src/mesa/drivers/dri/i965/brw_sf_emit.c
+- src/mesa/drivers/dri/i965/brw_sf_state.c
+- src/mesa/drivers/dri/i965/brw_shader.cpp
+- src/mesa/drivers/dri/i965/brw_state_batch.c
+- src/mesa/drivers/dri/i965/brw_state_cache.c
+- src/mesa/drivers/dri/i965/brw_state_dump.c
+- src/mesa/drivers/dri/i965/brw_state_upload.c
+- src/mesa/drivers/dri/i965/brw_surface_formats.c
+- src/mesa/drivers/dri/i965/brw_tex.c
+- src/mesa/drivers/dri/i965/brw_tex_layout.c
+- src/mesa/drivers/dri/i965/brw_urb.c
+- src/mesa/drivers/dri/i965/brw_util.c
+- src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp
+- src/mesa/drivers/dri/i965/brw_vec4.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_generator.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_gs.c
+- src/mesa/drivers/dri/i965/brw_vec4_gs_visitor.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_visitor.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_vp.cpp
+- src/mesa/drivers/dri/i965/brw_vec4_vs_visitor.cpp
+- src/mesa/drivers/dri/i965/brw_vs.c
+- src/mesa/drivers/dri/i965/brw_vs_state.c
+- src/mesa/drivers/dri/i965/brw_vs_surface_state.c
+- src/mesa/drivers/dri/i965/brw_vtbl.c
+- src/mesa/drivers/dri/i965/brw_wm.c
+- src/mesa/drivers/dri/i965/brw_wm_iz.cpp
+- src/mesa/drivers/dri/i965/brw_wm_sampler_state.c
+- src/mesa/drivers/dri/i965/brw_wm_state.c
+- src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+- src/mesa/drivers/dri/i965/gen6_blorp.cpp
+- src/mesa/drivers/dri/i965/gen6_cc.c
+- src/mesa/drivers/dri/i965/gen6_clip_state.c
+- src/mesa/drivers/dri/i965/gen6_depthstencil.c
+- src/mesa/drivers/dri/i965/gen6_gs_state.c
+- src/mesa/drivers/dri/i965/gen6_multisample_state.c
+- src/mesa/drivers/dri/i965/gen6_queryobj.c
+- src/mesa/drivers/dri/i965/gen6_sampler_state.c
+- src/mesa/drivers/dri/i965/gen6_scissor_state.c
+- src/mesa/drivers/dri/i965/gen6_sf_state.c
+- src/mesa/drivers/dri/i965/gen6_sol.c
+- src/mesa/drivers/dri/i965/gen6_urb.c
+- src/mesa/drivers/dri/i965/gen6_viewport_state.c
+- src/mesa/drivers/dri/i965/gen6_vs_state.c
+- src/mesa/drivers/dri/i965/gen6_wm_state.c
+- src/mesa/drivers/dri/i965/gen7_blorp.cpp
+- src/mesa/drivers/dri/i965/gen7_clip_state.c
+- src/mesa/drivers/dri/i965/gen7_disable.c
+- src/mesa/drivers/dri/i965/gen7_gs_state.c
+- src/mesa/drivers/dri/i965/gen7_misc_state.c
+- src/mesa/drivers/dri/i965/gen7_sampler_state.c
+- src/mesa/drivers/dri/i965/gen7_sf_state.c
+- src/mesa/drivers/dri/i965/gen7_sol_state.c
+- src/mesa/drivers/dri/i965/gen7_urb.c
+- src/mesa/drivers/dri/i965/gen7_viewport_state.c
+- src/mesa/drivers/dri/i965/gen7_vs_state.c
+- src/mesa/drivers/dri/i965/gen7_wm_state.c
+- src/mesa/drivers/dri/i965/gen7_wm_surface_state.c
+- src/mesa/drivers/dri/i965/intel_batchbuffer.c
+- src/mesa/drivers/dri/i965/intel_blit.c
+- src/mesa/drivers/dri/i965/intel_buffer_objects.c
+- src/mesa/drivers/dri/i965/intel_buffers.c
+- src/mesa/drivers/dri/i965/intel_context.c
+- src/mesa/drivers/dri/i965/intel_extensions.c
+- src/mesa/drivers/dri/i965/intel_fbo.c
+- src/mesa/drivers/dri/i965/intel_mipmap_tree.c
+- src/mesa/drivers/dri/i965/intel_pixel_bitmap.c
+- src/mesa/drivers/dri/i965/intel_pixel.c
+- src/mesa/drivers/dri/i965/intel_pixel_copy.c
+- src/mesa/drivers/dri/i965/intel_pixel_draw.c
+- src/mesa/drivers/dri/i965/intel_pixel_read.c
+- src/mesa/drivers/dri/i965/intel_regions.c
+- src/mesa/drivers/dri/i965/intel_resolve_map.c
+- src/mesa/drivers/dri/i965/intel_screen.c
+- src/mesa/drivers/dri/i965/intel_state.c
+- src/mesa/drivers/dri/i965/intel_syncobj.c
+- src/mesa/drivers/dri/i965/intel_tex.c
+- src/mesa/drivers/dri/i965/intel_tex_copy.c
+- src/mesa/drivers/dri/i965/intel_tex_image.c
+- src/mesa/drivers/dri/i965/intel_tex_subimage.c
+- src/mesa/drivers/dri/i965/intel_tex_validate.c
+- src/mesa/drivers/dri/i965/intel_upload.c
+- src/mesa/drivers/dri/i965/test_eu_compact.c
+- src/mesa/drivers/dri/i965/test_vec4_register_coalesce.cpp
+
+*/
\ No newline at end of file
diff --git a/src/mesa/main/main.doxy_text b/src/mesa/main/main.doxy_text
new file mode 100644
index 0000000..021d375
--- /dev/null
+++ b/src/mesa/main/main.doxy_text
@@ -0,0 +1,257 @@
+/*!
+\page MAIN_MAIN Mesa Main
+
+The files in main represent the bulk of Mesa's GL implementation framework
+of state tracking and defining the call back mechanics to a driver.
+When \ref MAIN_MAIN implements a GL function, that usually means it performs
+various validity checks and internal state updates before passing
+the "instruction" to the driver though the function table
+\ref gl_context#Driver.
+
+
+\section CTX_MGT Context Management and Dispatch Tables
+
+\subsection Context Creation and Dispatch Tables
+A GL context is represented by Mesa with an instance of 
+\ref gl_context. 
+
+A GL context for a hardware implementation will typically 
+be of the form
+\code
+struct
+{
+  //gl_context first
+  gl_context _base;
+
+  //additional state for the hardware implementation follows..
+  foo_type bar_member;
+  .
+  .
+} some_hardware_context;
+\endcode
+so that a hardware implementation can trivially
+up cast to their context type.
+
+
+Mesa's \ref gl_context data structure has several dispatch tables,
+\ref gl_context#BeginEnd, \ref gl_context#Exec, \ref gl_context#Save 
+and \ref gl_context#OutsideBeginEnd.
+The purpose for having multiple dispatch tables is that depending on
+the GL state (mostly related to being within a glBegin/glEnd pair
+and/or within a glNewList/glEndList pair) an OpenGL implementation
+needs to do very different things. Rather than having potentially 
+cumbersome if-logic, a table of functions is used for each such
+GL "mode". 
+
+A backing hardware context creation function will need to:
+- call _mesa_initialize_context() to initialize a \ref gl_context. The routine will allocate and initialize 
+the dispatch tables as follows:
+  + For OpenGL compatibility context, gl_context#BeginEnd for useage within glBegin()/glEnd() pair
+  + For OpenGL compatibility context, gl_context#Save for usage for creating display lists
+  + \ref gl_context#OutsideBeginEnd so that each function maps to a no-op function. 
+  + Initialize \ref gl_context#Exec and \ref gl_context#CurrentDispatch to <I>point</I> to the same table as \ref gl_context#OutsideBeginEnd.
+- call \ref _vbo_CreateContext() to initialize the \ref vbo module
+The \ref vbo modules handles the commands that place primitives into GL
+pipeline to draw
+- call \ref _mesa_meta_init() to perform further one time context
+initialization
+- Set the values of \ref gl_context#Const to reflect limit
+constants the hardware backend supports. If any of the values
+are different than the Mesa provided defaults, call
+\ref _mesa_init_point() after setting the values
+- Specify what GL extensions the hardware backend supports by setting the values to \ref gl_context#Extensions
+- Instruct Mesa to compute the GL version for the and extension string
+for the context by calling \ref _mesa_compute_version()
+- Initialize the dispatch tables with \ref _mesa_initialize_dispatch_tables(). This will:
+  + Fills various entries implemented by the VBO module for in \ref gl_context#Exec.  
+Note that since _mesa_initialize_context() left \ref gl_context#Exec, to point
+to the same table as gl_context#OutsideBeginEnd  these two fields are then aliases for each other, unless a hardware backend changes one of these field values before hand, in particular they <I>point</I> to the same table.
+  + For compatibility OpenGL profiles, fills entries in \ref gl_context#Save with functions
+appropiate for saving the contents of a display list.
+- Initialize the functions for the \ref vbo module by calling \ref _mesa_initialize_vbo_vtxfmt().
+- Set \ref gl_context#vbo_context#draw_prims to point to the drawing function that the hardware backend provides
+
+For the majority of functions within a GL dispatch table,
+the GL function <B>glFoo()</B> maps to <B>_mesa_Foo()</B>. However, for
+those functions filled by \ref _mesa_initialize_vbo_vtxfmt(),
+<B>glFoo()</B> maps to <B>vbo_Foo()</B> for \ref gl_context#Exec and
+<B>_save_Foo()</B> for \ref gl_context#Save.
+
+
+
+
+\subsection Files
+
+- src/mesa/main/api_exec.c (machine generated, provides _mesa_initialize_exec_table() which intializes
+a GL function dispatch table with Mesa GL function implementations)
+- src/mesa/main/context.c (provides routines to initialize \ref gl_context
+objects, various GL state and implements flushing and finishing commands on a GL context)
+- src/mesa/main/remap.c (additional functions to initialize -Mesa-)
+
+
+\section GLBL Global GL State
+- src/mesa/main/enable.c (implementation of glEnable/glDisable and related functions)
+
+\section EVENT_MODEL_4 Event Model
+- src/mesa/main/queryobj.c (Implements Query API of GL)
+- src/mesa/main/syncobj.c (Implements Sync API of GL)
+
+\section MLTP_CTX_5 Shared Objects and Multiple Contexts
+- src/mesa/main/shared.c (implementation support for GL objects shared across multiple GL contexts)
+
+
+\section MAIN_BO_6 Buffer Objects
+- src/mesa/main/bufferobj.c (Implementation of GL buffer object API which calls driver
+buffer object code. Also provides a default implementation of buffer objects, which likely
+most hardware drivers will not use)
+- src/mesa/main/pbo.c (Implementation routines of Mesa implementing pixel buffer objects,
+i.e. buffer objects, inplace of application memory, used to read or write pixel and image data)
+
+\section MAIN_ProgramShader_7 Programs and Shader
+- src/mesa/main/arbprogram.c (implements the GLSL program manipulation API from GL_ARB_shader_object)
+- src/mesa/main/shader_query.cpp (query and specification of attribute locations for GLSL programs)
+- src/mesa/main/shaderapi.c (implementation of GLSL progam and shader manipulation of GL)
+- src/mesa/main/shaderobj.c (additional implementation support for GLSL program and shader API)
+- src/mesa/main/uniforms.c (implementaion of uniform and uniform buffer object of a GLSL program API)
+
+
+\section MAIN_TexturesSamples_8 Textures and Samplers
+- src/mesa/main/formatquery.c (query GL what is the actual representation of requested image formats)
+- src/mesa/main/mipmap.c (software fallback implementation for glGenerateMipmaps)
+- src/mesa/main/pixelstore.c (implementation of glPixelStore API)
+- src/mesa/main/samplerobj.c (implementation of sampler object API)
+- src/mesa/main/texcompress.c (support routines to handle compressed texture format)
+- src/mesa/main/texcompress_cpal.c (support routines to handle palletted texture formats)
+- src/mesa/main/texformat.c (support functions for choosing internal texture format from external format)
+- src/mesa/main/texgetimage.c (implementation for reading contents of a texture, i.e. glGetTexImage)
+- src/mesa/main/teximage.c (implementation for setting uncompressed and compressed texture data, i.e. glTexImage*, glTexSubImage*, glCompressedTexImage*, glCompressedTexSubImage* functions in addition to support for texture buffer objects)
+- src/mesa/main/texobj.c (implementation of binding, checking and deleting texture objects, i.e. glBindTexture, glIsTexture, glGenTextures, glDeleteTextures, etc)
+- src/mesa/main/texparam.c (implementation of setting texture object parameters, i.e. glTexParameter, glGetTexParameter, glGetTexLevelParameter)
+- src/mesa/main/texstate.c (implementation of active texture unit selector, i.e. glActiveTexture and for legacy OpenGL, glClientActiveTexture)
+- src/mesa/main/texstorage.c (implementation of texture allocation where size of texture is static, i.e. GL_ARB_texture_storage)
+- src/mesa/main/texstore.c (fallback implementation for storing texel values in a texture)
+
+
+
+\section MAIN_Framebuffer_9 Framebuffers and Framebuffer Objects
+- src/mesa/main/fbobject.c (Implementation of FBO API)
+- src/mesa/main/renderbuffer.c (implementation support for FBOs in relation to renderbuffer objects)
+
+
+\section MAIN_VTX_DRAWING_10 Vertex Specification and Drawing
+- Much of the implementation is found in the \ref vbo module
+- src/mesa/main/condrender.c (Implement the functions associated to conditional rendering,
+i.e. instructing GL to only render if a condition, determined by previous GL operations,
+is true. Implements the GL API points glBeginConditionalRender and glEndConditionalRender)
+- src/mesa/main/arrayobj.c (Creation, binding and querying to Vertex Array Objects)
+- src/mesa/main/api_loopback.c (provides variety of attribute value setting functions, i.e. glVertexAttrib*, glVertex*, etc, for
+arguments types that will map to the smaller set provided by the VBO module, see \ref vbo_ATTRIBS_AND_OLD_DRAWING)
+- src/mesa/main/api_validate.c (provides validation routines for Mesa draw calls implemented in \ref VBO_DRAWING)
+- src/mesa/main/varray.c (implementation of vertex array objects, instancing, vertex attribute sourcing as in glVertexAttribPointer and draw calls not implemented directly in \ref vbo module)
+- Module \ref vbo, in particular section \ref VBO_DRAWING
+
+\section FF_POST_VTX_13 Fixed-Function VertexPost-Processing
+- src/mesa/main/transformfeedback.c (Implementation of GL3 and GLES3 transform feedback API)
+- src/mesa/main/viewport.c (Implementation of glViewport and glDepthRange)
+
+
+\section FF_PA_14 Fixed-Function Primitive Assembly and Rasterization
+- src/mesa/main/points.c (Implements point parameter functions: glPointSize and glPointParameter)
+- src/mesa/main/polygon.c (Implements polygon offset, face fulling and stipple modes)
+- src/mesa/main/lines.c (implementation of line rasterization control: glLineWidth and glLineStipple)
+
+\section MAIN_Fragments_17 Writing to Fragments and Samples to the Framebuffer
+- src/mesa/main/blend.c (Implementation of setting GL blending and color-masking state)
+- src/mesa/main/buffers.c (Implementation of glDrawBuffer and glDrawBuffers, in addition to
+buffer read back support)
+- src/mesa/main/clear.c (Implementation of render target buffer clearing, i.e. glClear* API functions)
+- src/mesa/main/depth.c (Implementation of depth buffer state, i.e. depth function, mask, etc)
+- src/mesa/main/multisample.c (Implementation of GL API for controlling MSAA)
+- src/mesa/main/scissor.c (Implementaton of specifying scissor test, i.e. glScissor)
+- src/mesa/main/stencil.c (Implenetation of setting stencil text and operation, i.e. glStencilFunc, glStencilOp, glStencilMask, etc)
+
+\section MAIN_RAD_WRITE_PIX_18 Reading and Writing to Pixels
+- src/mesa/main/readpix.c (Implements glReadPixel and related functions)
+
+\section MAIN_DBG_OUTPUT_20 Debug Output
+- src/mesa/main/errors.c (implementation of GL error mechanism and GL mesage callback APi as found in GL_ARB_debug_output and GL_KHR_debug)
+- src/mesa/main/objectlabel.c (implementation of GL label API as found in GL_KHR_debug)
+
+\section MAIN_SPECIAL_21 Special Functions
+- src/mesa/main/hint.c (implementation of glHint)
+
+\section MESA_EXTENSIONS_22 Extensions
+- src/mesa/main/drawtex.c (Implementation of GL_OES_draw_texture extension)
+- src/mesa/main/performance_monitor.c (Implementation of GL_AMD_performance_monitor)
+- src/mesa/main/texcompress_etc.c (software encode and decode support for ETC1 compressedtexture format(s) as in GL_OES_compressed_ETC1_RGB8_texture)
+- src/mesa/main/texcompress_fxt1.c (software encode and decode support for FXT1 compressed texture format(s) as in GL_3DFX_texture_compression_FXT1)
+- src/mesa/main/texcompress_rgtc.c (software encode and decode support for RGTC texture format(s) as in GL_EXT_texture_compression_rgtc)
+- src/mesa/main/texcompress_s3tc.c (software encode and decode support for S3, DTX1, DTX3, DTX5 texture format(s) as in GL_EXT_texture_compression_s3tc)
+- src/mesa/main/texturebarrier.c (implementation of texture barrier API from NVIDIA, see glTextureBarrierNV)
+- src/mesa/main/atifragshader.c (implementation of GL_ATI_fragment_shader, which was was a form of fragment shading without shader source code; in a time before GLSL shaders, in a time before ARB assembly shader, a time potentially forgotton)
+
+
+\section MESA_CTX_QUERY_23 Context Queries
+- src/mesa/main/get.c (implementatin of glGet* routines)
+- src/mesa/main/getstring.c (implementation of glGetString and glGetStringi)
+
+\section CMP_FF_P Compatibility Profile
+- src/mesa/main/colortab.c (Implements the function associated to glColorTable, only
+active in compatibility profiles)
+- src/mesa/main/accum.c (GL accumulation buffer and state, i.e. glAccum(), glClearAccum())
+- src/mesa/main/attrib.c (Implementation of glPush/PopAttribs and glPush/PopClientAttribus for quick saving and restoring of various portions of GL state)
+- src/mesa/main/clip.c (implements glClipPlane, the function that specifies a clip
+plane to apply to primitives. This is active in compatibility profiles only)
+- src/mesa/main/api_arrayelt.c (essentially implements glArrayElement which is used in glBegin/glEnd drawing only)
+- src/mesa/main/convolve.c (implements convolution filter functions from OpenGL legacy)
+- src/mesa/main/dlist.c (Implementation of display list playback)
+- src/mesa/main/drawpix.c (Implementation of pixel level drawing/blitting: glCopyPixels, glBitmap and glDrawPixels)
+- src/mesa/main/eval.c (Implementation support for glEval functionality)
+- src/mesa/main/feedback.c (Implementation of GL_FEEDBACK drawing)
+- src/mesa/main/ff_fragment_shader.cpp (Implementation of pre-assembly and pre-GLSL shaders for fragment shading, i.e. chaned multi-textruing API)
+- src/mesa/main/ffvertex_prog.c (Implementation of fixed function pipeline for vertices as a shader) 
+- src/mesa/main/fog.c (Implementation of fixed function pipeline interface for fog)
+- src/mesa/main/histogram.c (implementation of histogram API acting on image data)
+- src/mesa/main/light.c  (implementation of fixed function per-vertex lighting)
+- src/mesa/main/matrix.c (implementation of fixed function pipeline matrix manipulations for both projection and modelview matrices)
+- src/mesa/main/pixel.c (implementation of pixel map, glPixelMap, API of legacy GL)
+- src/mesa/main/rastpos.c (imlementation of glRasterPos API of legacy GL)
+- src/mesa/main/texenv.c (implementation of texture environmental mapping of legacy OpenGL, i.e. glTexEnv* functions)
+- src/mesa/main/texgen.c (implementation of texture coordinate generation of legacy OpenGL, i.e. glTexGen* functions)
+
+
+\section MESA_INTERNAL Functions and Structures for Mesa and Drivers of Mesa
+- src/mesa/main/cpuinfo.c (provides functions related to querying CPU features)
+- src/mesa/main/debug.c (provides a number of functions related to debugging: setting debug state for Mesa from enviromental variables in addition to dumping textures/renderbuffers and print debugging of \ref gl_context state)
+- src/mesa/main/enums.c (machine generated, provides an interface to return a C-string from a GL enumeration)
+- src/mesa/main/execmem.c (memory allocation and freeing routines used by Mesa)
+- src/mesa/main/extensions.c (Mesa API to drivers to enable and disable GL extensions, see also \ref gl_context#Extensions)
+- src/mesa/main/format_pack.c (routines to pack different image formats, for GL to send pixel data to application)
+- src/mesa/main/format_unpack.c (routines to unpack different image formats, for GL to recieve pixel data from application)
+- src/mesa/main/formats.c (routines for getting data about various image formats)
+- src/mesa/main/framebuffer.c (routines for handling window system provded framebuffers, i.e. the "default framebuffer of a GL context)
+- src/mesa/main/glformats.c (routines to query properties of a GL enumeration specifying an image format type)
+- src/mesa/main/hash.c (implementation of hash table to be used by Mesa and driver backends for Mesa)
+- src/mesa/main/hash_table.c (further implementation of hash table to be used by Mesa and driver backends for Mesa)
+- src/mesa/main/image.c (support functions for image manipulations: clipping, striding, etc)
+- src/mesa/main/imports.c (large number of utility routines: aligned memory allocation, some math routines and some bit operation routines)
+- src/mesa/main/macros.h (large number of conveniance macros)
+- src/mesa/main/mm.c (memory manager routines to be used by driver hardware backends)
+- src/mesa/main/mtypes.h (defines most of the important Mesa data structures for tracking GL state)
+- src/mesa/main/pack.c (utility routines to pack data to be ready by a GL application)
+- src/mesa/main/pixeltransfer.c (support routines for src/mesa/main/pack.c by providing scaling and biasing of color and depth values)
+- src/mesa/main/set.c (implementaton of set API with hashes, i.e. Mesa's own implementation of std::unordered_set in C)
+- src/mesa/main/simple_list.h (header only implementation of linked lists via macros)
+- src/mesa/main/state.c (support functions in Mesa to track vertex value state)
+- src/mesa/main/version.c (support functions to compute and set the GL version of a context from supported extensions)
+- src/mesa/main/vtxfmt.c (implements plugging VBO functionality into dispatch tables of a \ref gl_context)
+
+
+
+\section OpenGL ES support
+- src/mesa/main/es1_conversion.c (implements glFoox functions of OpenGL ES 1.x)
+- src/mesa/main/querymatrix.c (implements GL_OES_query_matrix)
+ 
+ 
+
+*/
\ No newline at end of file
diff --git a/src/mesa/program/program.doxy_text b/src/mesa/program/program.doxy_text
new file mode 100644
index 0000000..d9f9b33
--- /dev/null
+++ b/src/mesa/program/program.doxy_text
@@ -0,0 +1,33 @@
+/*!
+\page program Mesa vertex and fragment program module
+
+ This module or directory contains most of the code for vertex and
+ fragment programs and shaders, including state management, parsers,
+ and (some) software routines for executing programs
+
+\section ToClassify
+Files left to look at
+- src/mesa/program/arbprogparse.c
+- src/mesa/program/ir_to_mesa.cpp
+- src/mesa/program/prog_cache.c
+- src/mesa/program/prog_execute.c
+- src/mesa/program/prog_hash_table.c
+- src/mesa/program/prog_instruction.c
+- src/mesa/program/prog_noise.c
+- src/mesa/program/prog_opt_constant_fold.c
+- src/mesa/program/prog_optimize.c
+- src/mesa/program/prog_parameter.c
+- src/mesa/program/prog_parameter_layout.c
+- src/mesa/program/prog_print.c
+- src/mesa/program/program.c
+- src/mesa/program/program_lexer.l
+- src/mesa/program/programopt.c
+- src/mesa/program/program_parse_extra.c
+- src/mesa/program/program_parse.y
+- src/mesa/program/prog_statevars.c
+- src/mesa/program/register_allocate.c
+- src/mesa/program/sampler.cpp
+- src/mesa/program/string_to_uint_map.cpp
+- src/mesa/program/symbol_table.c
+
+*/
\ No newline at end of file
diff --git a/src/mesa/swrast/swrast.doxy_text b/src/mesa/swrast/swrast.doxy_text
new file mode 100644
index 0000000..14d1af5
--- /dev/null
+++ b/src/mesa/swrast/swrast.doxy_text
@@ -0,0 +1,42 @@
+/**
+ * \page SWRAST swrast module
+ *
+ * This module, software rasterization, contains the software fallback
+ * routines for drawing points, lines, triangles, bitmaps and images.
+ * All rendering boils down to writing spans (arrays) of pixels with
+ * particular colors.  The span-writing routines must be implemented
+ * by the device driver.
+ */
+
+../src/mesa/swrast/s_masking.c
+../src/mesa/swrast/s_texfilter.c
+../src/mesa/swrast/s_zoom.c
+../src/mesa/swrast/s_feedback.c
+../src/mesa/swrast/s_renderbuffer.c
+../src/mesa/swrast/s_blend.c
+../src/mesa/swrast/s_fog.c
+../src/mesa/swrast/s_aaline.c
+../src/mesa/swrast/s_texfetch.c
+../src/mesa/swrast/s_context.c
+../src/mesa/swrast/s_texcombine.c
+../src/mesa/swrast/s_fragprog.c
+../src/mesa/swrast/s_depth.c
+../src/mesa/swrast/s_points.c
+../src/mesa/swrast/s_stencil.c
+../src/mesa/swrast/s_span.c
+../src/mesa/swrast/s_logic.c
+../src/mesa/swrast/s_lines.c
+../src/mesa/swrast/s_triangle.c
+../src/mesa/swrast/s_atifragshader.c
+../src/mesa/swrast/s_bitmap.c
+../src/mesa/swrast/s_copypix.c
+../src/mesa/swrast/s_texrender.c
+../src/mesa/swrast/s_alpha.c
+../src/mesa/swrast/s_blit.c
+../src/mesa/swrast/s_clear.c
+../src/mesa/swrast/s_texture.c
+../src/mesa/swrast/s_drawpix.c
+../src/mesa/swrast/s_aatriangle.c
+
+../src/mesa/swrast_setup/ss_triangle.c
+../src/mesa/swrast_setup/ss_context.c
diff --git a/src/mesa/tnl/tnl.doxy_text b/src/mesa/tnl/tnl.doxy_text
new file mode 100644
index 0000000..9220933
--- /dev/null
+++ b/src/mesa/tnl/tnl.doxy_text
@@ -0,0 +1,33 @@
+/**
+ * \page TNL The TNL-module
+ *
+ * TNL stands for "transform and lighting", i.e. this module implements
+ * a pipeline that receives as input a buffer of vertices and does all
+ * necessary transformations (rotations, clipping, vertex shader etc.)
+ * and passes then the output to the rasterizer.
+ *
+ * The tnl_pipeline contains the array of all stages, which should be
+ * applied. Each stage is a black-box, which is described by an
+ * tnl_pipeline_stage. The function ::_tnl_run_pipeline applies all the
+ * stages to the vertex_buffer TNLcontext::vb, where the vertex data
+ * is stored. The last stage in the pipeline is the rasterizer.
+ *
+ */
+
+../src/mesa/tnl/t_vb_vertex.c
+../src/mesa/tnl/t_draw.c
+../src/mesa/tnl/t_pipeline.c
+../src/mesa/tnl/t_vb_render.c
+../src/mesa/tnl/t_rasterpos.c
+../src/mesa/tnl/t_vb_texgen.c
+../src/mesa/tnl/t_vb_normals.c
+../src/mesa/tnl/t_vp_build.c
+../src/mesa/tnl/t_vb_program.c
+../src/mesa/tnl/t_vertex_generic.c
+../src/mesa/tnl/t_vb_points.c
+../src/mesa/tnl/t_vertex_sse.c
+../src/mesa/tnl/t_context.c
+../src/mesa/tnl/t_vb_light.c
+../src/mesa/tnl/t_vb_texmat.c
+../src/mesa/tnl/t_vertex.c
+../src/mesa/tnl/t_vb_fog.c
diff --git a/src/mesa/vbo/vbo.doxy_text b/src/mesa/vbo/vbo.doxy_text
new file mode 100644
index 0000000..9cb3e11
--- /dev/null
+++ b/src/mesa/vbo/vbo.doxy_text
@@ -0,0 +1,158 @@
+/*
+old text:The VBO builder module
+ 
+  This module hooks into the GL dispatch table and catches all vertex
+  building and drawing commands, such as glVertex3f, glBegin and
+  glDrawArrays.  The module stores all incoming vertex data as arrays
+  in GL vertex buffer objects (VBOs), and translates all drawing
+  commands into calls to a driver supplied DrawPrimitives() callback.
+ 
+  The module captures both immediate mode and display list drawing,
+  and manages the allocation, reference counting and deallocation of
+  vertex buffer objects itself.
+  
+  The DrawPrimitives() callback can be either implemented by the
+  driver itself or hooked to the tnl module's _tnl_draw_primitives()
+  function for hardware without tnl capablilties or during fallbacks
+
+*/
+
+/*!
+\page vbo VBO
+
+The VBO module represents Mesa's implementation of the routines
+that "draw" primitives in GL: glBegin/glEnd drawing, glDraw* calls
+and display lists. The API for the VBO module that drivers are to use
+is the header file src/mesa/vbo/vbo.h.
+
+
+
+\section VBO_ATTRIBS_AND_OLD_DRAWING Vertex Attribute Values and glBegin/glEnd Drawing
+
+A large portion of the VBO module is directed towards
+implementing drawing via glBegin/glEnd. 
+- src/mesa/vbo/vbo_context.c (defines and inits state of attribute sourcing for glBegin/glEnd drawing in addition to holding two function tables for handling vertex commands)
+- src/mesa/vbo/vbo_exec.c (a few utility routines along with construction and deconstruction of data structures associated to VBO module)
+- src/mesa/vbo/vbo_exec_draw.c (esssentially implements the flushing of vertices down the pipeline)
+- src/mesa/vbo/vbo_exec_eval.c (for glEval)
+- src/mesa/vbo/vbo_exec_api.c (implements setting of attribute values, also used for setting of attribute values when an attribute array is disabled, i.e. glDisableAttributeArray(GLuint) )
+- src/mesa/vbo/vbo_noop.c (implementation of no-op function, stored in \ref vbo_exec_context#vtxfmt_noop)
+
+By default, Mesa uses an internal "fake-ish" buffer object for storing 
+the attribute data to be flushed down the pipeline for later. However, 
+a driver may elect to use a "real buffer object" if \ref 
+vbo_use_buffer_objects() is called. The i965 driver does NOT appear 
+to use this facility. The structure \ref vbo_context in addition state for
+glBegin/glEnd functionality it also holds the function pointer,
+\ref vbo_context#draw_prims which a driver will initialize. This function
+is essentially the callback to the driver to do the actual drawing
+of indexed primitives, for example as in glDrawElements().
+
+The data structure \ref vbo_context, initialized with
+\ref _vbo_CreateContext(), stores two contexts: vbo_context#exec 
+and \ref vbo_context#save. The first is for glBegin/glEnd immediate 
+mode drawing commands and the latter for saving these commands 
+to a display list. These contexts (of type \ref vbo_exec_context)
+in addition to holding a context state (i.e. vertex values, location into 
+buffer from which to take vertex  values), also store a function table,
+\ref vbo_exec_context#vtxfmt which are pointers to the actual functions.
+An additional function table, \ref vbo_exec_context#vtxfmt_noop which maps
+to no-op functions is also present and put into use when memory is exhuasted.
+The function tables values are set in \ref vbo_exec_vtxfmt_init() which is
+indirectly called from \ref _vbo_CreateContext().
+
+The functions associated to setting vertex attribute values
+for execution are defined through a series of macros as follows:
+- The file src/mesa/vbo/vbo_exec_api.c defines the macro <B>%ATTR</B>
+which is a large function macro that essentially implement setting
+the value. Of important note is that although the type to which
+values are written is declared as float, the implementation usage
+of the macro (see \ref fi_type, \ref UINT_AS_FLT() and
+\ref  INT_AS_FLT) has that integer types have their
+bits transcoded into a float. In addition the file 
+src/mesa/vbo/vbo_exec_api.c also defines <B>%TAG</B> to prefix
+the argument with <B>vbo_</B>. 
+- The file src/mesa/vbo/vbo_attrib_tmp.h is then included into
+src/mesa/vbo/vbo_exec_api.c which defines a large number
+of macros building from %ATTR for setting the value of an attribute
+from a sequence of integers, unsigned integers or floats. The
+- The file src/mesa/vbo/vbo_attrib_tmp.h the defines the functions
+to which the function pointer table vbo_exec_context#vtxfmt
+of \ref vbo_context#exec. The names of the functions are set via the 
+macro <B>%TAG</B>.
+
+The functions associated to setting the vertex attributes
+for saving to a display list are defined through a similiar
+mechanism:
+- The file src/mesa/vbo/vbo_save_api.c defines the macro
+<B>%ATTR</B> suitable for display list command saving and defines the macro
+<B>%TAG</B> so that it prefixes with <B>_save_</B>.
+- The file src/mesa/vbo/vbo_attrib_tmp.h is then included into
+src/mesa/vbo/vbo_save_api.c so that the functions are defined
+with the prefix <B>_save_</B> using the value setting of the
+macro <B>%ATTR</B> defined in src/mesa/vbo/vbo_save_api.c.
+
+Lastly the value in \ref vbo_exec_context of \ref vbo_context#exec
+are used to fill the GL dispatch tables gl_context#Exec 
+and gl_context#BeginEnd (see _mesa_install_exec_vtxfmt()) and
+the values from vbo_context#save fill the GL dispatch
+table of gl_context#Save (see _mesa_install_save_vtxfmt()).
+
+
+\section VBO_DRAWING glDraw* Drawing
+
+
+Mesa implements GL glDraw calls (such as glDrawElements(), glDrawArrays*()) in
+addition to various checking routines. These functions are located in
+- src/mesa/vbo/vbo_exec_array.c (drawing commands and some utility functions)
+- src/mesa/vbo/vbo_primitive_restart.c (software primitive restart)
+
+The implementations of these functions, often occur in two layers:
+a <B>_mesa</B> layer then a <B>vbo_exec</B> layer perform checks and validation
+before typically calling \ref vbo_validated_drawrangeelements(). Care
+needs to be taken with repsect to primitive restart: if the field
+gl_constants#PrimitiveRestartInSoftware is true, then Mesa will
+emulate primitive restart in software by walking the indices (which
+will require mapping of a beuffer object if the indices are in a
+buffer object) to simulate primitive restart. The initial value of the
+field is GL_FALSE, which means that by default primitive restart is
+performed by the driver.
+
+\section VBO_DisplayList Display List Implementation
+The files 
+- src/mesa/vbo/vbo_save_api.c
+- src/mesa/vbo/vbo_save_draw.c
+- src/mesa/vbo/vbo_save.c
+- src/mesa/vbo/vbo_save_loopback.c
+
+are used to implement display lists: saving display list commands. 
+Disply list playback is handled by  \ref _mesa_CallList() whose
+implementation of walking the display list is handled in \ref 
+execute_list() of \ref src/mesa/main/dlist.c.
+
+
+\section VBO_Utilities Utilities
+- src/mesa/vbo/vbo_rebase.c (defines conveniant checking routines \ref 
+vbo_any_varyings_in_vbos() and vbo_all_varyings_in_vbos() in addition to
+vbo_rebase_prims(), see below about vbo_rebase_prims())
+
+The function vbo_rebase_prims() purpose is to offer send
+a modified index buffer and modified attribute source parameters
+so that only a range of the attribute data is actually sent
+down the pipeline. One issue is that if an index buffer is
+used, the index buffer is copied and modified. 
+
+
+\subsection VBO_Splitting Splitting
+A set of functions for splitting large draw commands to multiple 
+commands (for example index buffer to large, range of indices too
+large for hardware, etc)
+- src/mesa/vbo/vbo_split.c 
+- src/mesa/vbo/vbo_split_inplace.c
+- src/mesa/vbo/vbo_split_copy.c 
+
+
+
+
+
+*/
\ No newline at end of file
-- 
1.8.1.2



More information about the mesa-dev mailing list