diff options
author | Oliver McFadden <[email protected]> | 2007-05-09 22:03:43 +0000 |
---|---|---|
committer | Oliver McFadden <[email protected]> | 2007-05-09 22:43:01 +0000 |
commit | d0be8b959adae87b920b185fbe4efe6f981837fd (patch) | |
tree | 761edf2b745ae679a95375f2d2a89d26ae2645e1 /src/mesa/drivers/dri/r300 | |
parent | 672ecba175d4062b983031df15b686ee39f45d17 (diff) |
r300: Added some more Doxygen documentation and made some functions static.
Diffstat (limited to 'src/mesa/drivers/dri/r300')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_cmdbuf.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.c | 11 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_context.h | 6 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_fragprog.c | 12 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_ioctl.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_maos.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_mem.c | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_render.c | 46 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_state.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_tex.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texmem.c | 9 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_texstate.c | 7 | ||||
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertprog.c | 8 |
13 files changed, 83 insertions, 64 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_cmdbuf.c b/src/mesa/drivers/dri/r300/r300_cmdbuf.c index 369dc0b366b..48f5ea4c562 100644 --- a/src/mesa/drivers/dri/r300/r300_cmdbuf.c +++ b/src/mesa/drivers/dri/r300/r300_cmdbuf.c @@ -27,9 +27,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Nicolai Haehnle <[email protected]> +/** + * \file + * + * \author Nicolai Haehnle <[email protected]> */ #include "glheader.h" diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c index 4ddf0244680..4f70d7055a4 100644 --- a/src/mesa/drivers/dri/r300/r300_context.c +++ b/src/mesa/drivers/dri/r300/r300_context.c @@ -27,11 +27,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Keith Whitwell <[email protected]> - * Nicolai Haehnle <[email protected]> +/** + * \file + * + * \author Keith Whitwell <[email protected]> + * + * \author Nicolai Haehnle <[email protected]> */ + #include "glheader.h" #include "api_arrayelt.h" #include "context.h" diff --git a/src/mesa/drivers/dri/r300/r300_context.h b/src/mesa/drivers/dri/r300/r300_context.h index 8630c9edda5..c287871b370 100644 --- a/src/mesa/drivers/dri/r300/r300_context.h +++ b/src/mesa/drivers/dri/r300/r300_context.h @@ -884,17 +884,11 @@ extern GLboolean r300CreateContext(const __GLcontextModes * glVisual, __DRIcontextPrivate * driContextPriv, void *sharedContextPrivate); -extern int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim); - extern void r300SelectVertexShader(r300ContextPtr r300); extern void r300InitShaderFuncs(struct dd_function_table *functions); extern int r300VertexProgUpdateParams(GLcontext * ctx, struct r300_vertex_program_cont *vp, float *dst); -extern int r300Fallback(GLcontext * ctx); - -extern GLboolean r300RunRender(GLcontext * ctx, - struct tnl_pipeline_stage *stage); #define RADEON_D_CAPTURE 0 #define RADEON_D_PLAYBACK 1 diff --git a/src/mesa/drivers/dri/r300/r300_fragprog.c b/src/mesa/drivers/dri/r300/r300_fragprog.c index 4bc4320f988..c6fbe3f9aae 100644 --- a/src/mesa/drivers/dri/r300/r300_fragprog.c +++ b/src/mesa/drivers/dri/r300/r300_fragprog.c @@ -25,13 +25,13 @@ * */ -/* - * Authors: - * Ben Skeggs <[email protected]> - * Jerome Glisse <[email protected]> - */ - /** + * \file + * + * \author Ben Skeggs <[email protected]> + * + * \author Jerome Glisse <[email protected]> + * * \todo Depth write, WPOS/FOGC inputs * * \todo FogOption diff --git a/src/mesa/drivers/dri/r300/r300_ioctl.c b/src/mesa/drivers/dri/r300/r300_ioctl.c index 1bf19850b79..d2cc97d213e 100644 --- a/src/mesa/drivers/dri/r300/r300_ioctl.c +++ b/src/mesa/drivers/dri/r300/r300_ioctl.c @@ -29,10 +29,12 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Keith Whitwell <[email protected]> - * Nicolai Haehnle <[email protected]> +/** + * \file + * + * \author Keith Whitwell <[email protected]> + * + * \author Nicolai Haehnle <[email protected]> */ #include <sched.h> diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c index 54557c8eda3..ec174441e99 100644 --- a/src/mesa/drivers/dri/r300/r300_maos.c +++ b/src/mesa/drivers/dri/r300/r300_maos.c @@ -27,9 +27,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Keith Whitwell <[email protected]> +/** + * \file + * + * \author Keith Whitwell <[email protected]> */ #include "glheader.h" diff --git a/src/mesa/drivers/dri/r300/r300_mem.c b/src/mesa/drivers/dri/r300/r300_mem.c index 2c1deddb246..c08e8367a39 100644 --- a/src/mesa/drivers/dri/r300/r300_mem.c +++ b/src/mesa/drivers/dri/r300/r300_mem.c @@ -24,11 +24,13 @@ * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * */ - -/* - * Authors: - * Aapo Tahkola <[email protected]> + +/** + * \file + * + * \author Aapo Tahkola <[email protected]> */ + #include <unistd.h> #include "r300_context.h" diff --git a/src/mesa/drivers/dri/r300/r300_render.c b/src/mesa/drivers/dri/r300/r300_render.c index e459cad65ac..fee29878f6d 100644 --- a/src/mesa/drivers/dri/r300/r300_render.c +++ b/src/mesa/drivers/dri/r300/r300_render.c @@ -24,7 +24,8 @@ OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* + +/** * \file * * \brief R300 Render (Vertex Buffer Implementation) @@ -45,6 +46,7 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. * * \author Nicolai Haehnle <[email protected]> */ + #include "glheader.h" #include "state.h" #include "imports.h" @@ -72,6 +74,9 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. #include "r300_emit.h" extern int future_hw_tcl_on; +/** + * \brief Convert a OpenGL primitive type into a R300 primitive type. + */ static int r300PrimitiveType(r300ContextPtr rmesa, GLcontext * ctx, int prim) { int type = -1; @@ -117,7 +122,7 @@ static int r300PrimitiveType(r300ContextPtr rmesa, GLcontext * ctx, int prim) return type; } -int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim) +static int r300NumVerts(r300ContextPtr rmesa, int num_verts, int prim) { int verts_off = 0; @@ -274,46 +279,49 @@ static void r300RunRenderPrimitive(r300ContextPtr rmesa, GLcontext * ctx, rvb->AttribPtr[(a)].stride = vb->b->stride, \ rvb->AttribPtr[(a)].data = vb->b->data -static void radeon_vb_to_rvb(r300ContextPtr rmesa, struct radeon_vertex_buffer *rvb, struct vertex_buffer *vb) +static void radeon_vb_to_rvb(r300ContextPtr rmesa, + struct radeon_vertex_buffer *rvb, + struct vertex_buffer *vb) { int i; GLcontext *ctx; ctx = rmesa->radeon.glCtx; - + memset(rvb, 0, sizeof(*rvb)); - + rvb->Elts = vb->Elts; rvb->elt_size = 4; rvb->elt_min = 0; rvb->elt_max = vb->Count; - + rvb->Count = vb->Count; - + if (hw_tcl_on) { CONV_VB(VERT_ATTRIB_POS, ObjPtr); } else { assert(vb->ClipPtr); CONV_VB(VERT_ATTRIB_POS, ClipPtr); - } - + } + CONV_VB(VERT_ATTRIB_NORMAL, NormalPtr); CONV_VB(VERT_ATTRIB_COLOR0, ColorPtr[0]); CONV_VB(VERT_ATTRIB_COLOR1, SecondaryColorPtr[0]); CONV_VB(VERT_ATTRIB_FOG, FogCoordPtr); - - for (i=0; i < ctx->Const.MaxTextureCoordUnits; i++) + + for (i = 0; i < ctx->Const.MaxTextureCoordUnits; i++) CONV_VB(VERT_ATTRIB_TEX0 + i, TexCoordPtr[i]); - for (i=0; i < MAX_VERTEX_PROGRAM_ATTRIBS; i++) - CONV_VB(VERT_ATTRIB_GENERIC0 + i, AttribPtr[VERT_ATTRIB_GENERIC0 + i]); - + for (i = 0; i < MAX_VERTEX_PROGRAM_ATTRIBS; i++) + CONV_VB(VERT_ATTRIB_GENERIC0 + i, + AttribPtr[VERT_ATTRIB_GENERIC0 + i]); + rvb->Primitive = vb->Primitive; rvb->PrimitiveCount = vb->PrimitiveCount; rvb->LockFirst = rvb->LockCount = 0; rvb->lock_uptodate = GL_FALSE; } -GLboolean r300RunRender(GLcontext * ctx, +static GLboolean r300RunRender(GLcontext * ctx, struct tnl_pipeline_stage *stage) { r300ContextPtr rmesa = R300_CONTEXT(ctx); @@ -349,8 +357,8 @@ GLboolean r300RunRender(GLcontext * ctx, GLuint prim = _tnl_translate_prim(&VB->Primitive[i]); GLuint start = VB->Primitive[i].start; GLuint length = VB->Primitive[i].count; - - r300RunRenderPrimitive(rmesa, ctx, start, start + length, prim); + GLuint end = VB->Primitive[i].start + VB->Primitive[i].count; + r300RunRenderPrimitive(rmesa, ctx, start, end, prim); } reg_start(R300_RB3D_DSTCACHE_CTLSTAT, 0); @@ -362,7 +370,9 @@ GLboolean r300RunRender(GLcontext * ctx, #ifdef USER_BUFFERS r300UseArrays(ctx); #endif + r300ReleaseArrays(ctx); + return GL_FALSE; } @@ -376,7 +386,7 @@ GLboolean r300RunRender(GLcontext * ctx, } \ } while(0) -int r300Fallback(GLcontext * ctx) +static int r300Fallback(GLcontext * ctx) { r300ContextPtr r300 = R300_CONTEXT(ctx); struct r300_fragment_program *fp = (struct r300_fragment_program *) diff --git a/src/mesa/drivers/dri/r300/r300_state.c b/src/mesa/drivers/dri/r300/r300_state.c index 9f391a27a09..bbe3a4caead 100644 --- a/src/mesa/drivers/dri/r300/r300_state.c +++ b/src/mesa/drivers/dri/r300/r300_state.c @@ -29,9 +29,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Nicolai Haehnle <[email protected]> +/** + * \file + * + * \author Nicolai Haehnle <[email protected]> */ #include "glheader.h" diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c index 78b6dd24dac..d78e3dfb23e 100644 --- a/src/mesa/drivers/dri/r300/r300_tex.c +++ b/src/mesa/drivers/dri/r300/r300_tex.c @@ -26,9 +26,10 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -/* - * Authors: - * Keith Whitwell <[email protected]> +/** + * \file + * + * \author Keith Whitwell <[email protected]> */ #include "glheader.h" diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c index 13178e9973c..db80325309a 100644 --- a/src/mesa/drivers/dri/r300/r300_texmem.c +++ b/src/mesa/drivers/dri/r300/r300_texmem.c @@ -28,11 +28,12 @@ SOFTWARE. **************************************************************************/ -/* - * Authors: - * Kevin E. Martin <[email protected]> - * Gareth Hughes <[email protected]> +/** + * \file + * + * \author Gareth Hughes <[email protected]> * + * \author Kevin E. Martin <[email protected]> */ #include <errno.h> diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c index 49231d415f5..35f96ce8d6f 100644 --- a/src/mesa/drivers/dri/r300/r300_texstate.c +++ b/src/mesa/drivers/dri/r300/r300_texstate.c @@ -27,9 +27,10 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Keith Whitwell <[email protected]> +/** + * \file + * + * \author Keith Whitwell <[email protected]> */ #include "glheader.h" diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c index 90f18ad2257..1d90ade2ed1 100644 --- a/src/mesa/drivers/dri/r300/r300_vertprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertprog.c @@ -25,10 +25,12 @@ USE OR OTHER DEALINGS IN THE SOFTWARE. **************************************************************************/ -/* - * Authors: - * Aapo Tahkola <[email protected]> +/** + * \file + * + * \author Aapo Tahkola <[email protected]> */ + #include "glheader.h" #include "macros.h" #include "enums.h" |