summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOliver McFadden <z3ro.geek@gmail.com>2007-05-09 22:03:43 +0000
committerOliver McFadden <z3ro.geek@gmail.com>2007-05-09 22:43:01 +0000
commitd0be8b959adae87b920b185fbe4efe6f981837fd (patch)
tree761edf2b745ae679a95375f2d2a89d26ae2645e1 /src
parent672ecba175d4062b983031df15b686ee39f45d17 (diff)
r300: Added some more Doxygen documentation and made some functions static.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_cmdbuf.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.c11
-rw-r--r--src/mesa/drivers/dri/r300/r300_context.h6
-rw-r--r--src/mesa/drivers/dri/r300/r300_fragprog.c12
-rw-r--r--src/mesa/drivers/dri/r300/r300_ioctl.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_maos.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_mem.c10
-rw-r--r--src/mesa/drivers/dri/r300/r300_render.c46
-rw-r--r--src/mesa/drivers/dri/r300/r300_state.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_tex.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_texmem.c9
-rw-r--r--src/mesa/drivers/dri/r300/r300_texstate.c7
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertprog.c8
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 369dc0b366..48f5ea4c56 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 <prefect_@gmx.net>
+/**
+ * \file
+ *
+ * \author Nicolai Haehnle <prefect_@gmx.net>
*/
#include "glheader.h"
diff --git a/src/mesa/drivers/dri/r300/r300_context.c b/src/mesa/drivers/dri/r300/r300_context.c
index 4ddf024468..4f70d7055a 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 <keith@tungstengraphics.com>
- * Nicolai Haehnle <prefect_@gmx.net>
+/**
+ * \file
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
+ *
+ * \author Nicolai Haehnle <prefect_@gmx.net>
*/
+
#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 8630c9edda..c287871b37 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 4bc4320f98..c6fbe3f9aa 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 <darktama@iinet.net.au>
- * Jerome Glisse <j.glisse@gmail.com>
- */
-
/**
+ * \file
+ *
+ * \author Ben Skeggs <darktama@iinet.net.au>
+ *
+ * \author Jerome Glisse <j.glisse@gmail.com>
+ *
* \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 1bf19850b7..d2cc97d213 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 <keith@tungstengraphics.com>
- * Nicolai Haehnle <prefect_@gmx.net>
+/**
+ * \file
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
+ *
+ * \author Nicolai Haehnle <prefect_@gmx.net>
*/
#include <sched.h>
diff --git a/src/mesa/drivers/dri/r300/r300_maos.c b/src/mesa/drivers/dri/r300/r300_maos.c
index 54557c8eda..ec174441e9 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 <keith@tungstengraphics.com>
+/**
+ * \file
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
diff --git a/src/mesa/drivers/dri/r300/r300_mem.c b/src/mesa/drivers/dri/r300/r300_mem.c
index 2c1deddb24..c08e8367a3 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 <aet@rasterburn.org>
+
+/**
+ * \file
+ *
+ * \author Aapo Tahkola <aet@rasterburn.org>
*/
+
#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 e459cad65a..fee29878f6 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 <prefect_@gmx.net>
*/
+
#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 9f391a27a0..bbe3a4caea 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 <prefect_@gmx.net>
+/**
+ * \file
+ *
+ * \author Nicolai Haehnle <prefect_@gmx.net>
*/
#include "glheader.h"
diff --git a/src/mesa/drivers/dri/r300/r300_tex.c b/src/mesa/drivers/dri/r300/r300_tex.c
index 78b6dd24da..d78e3dfb23 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 <keith@tungstengraphics.com>
+/**
+ * \file
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
diff --git a/src/mesa/drivers/dri/r300/r300_texmem.c b/src/mesa/drivers/dri/r300/r300_texmem.c
index 13178e9973..db80325309 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 <martin@valinux.com>
- * Gareth Hughes <gareth@valinux.com>
+/**
+ * \file
+ *
+ * \author Gareth Hughes <gareth@valinux.com>
*
+ * \author Kevin E. Martin <martin@valinux.com>
*/
#include <errno.h>
diff --git a/src/mesa/drivers/dri/r300/r300_texstate.c b/src/mesa/drivers/dri/r300/r300_texstate.c
index 49231d415f..35f96ce8d6 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 <keith@tungstengraphics.com>
+/**
+ * \file
+ *
+ * \author Keith Whitwell <keith@tungstengraphics.com>
*/
#include "glheader.h"
diff --git a/src/mesa/drivers/dri/r300/r300_vertprog.c b/src/mesa/drivers/dri/r300/r300_vertprog.c
index 90f18ad225..1d90ade2ed 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 <aet@rasterburn.org>
+/**
+ * \file
+ *
+ * \author Aapo Tahkola <aet@rasterburn.org>
*/
+
#include "glheader.h"
#include "macros.h"
#include "enums.h"