r300: Added some more Doxygen documentation and made some functions static.

This commit is contained in:
Oliver McFadden
2007-05-09 22:03:43 +00:00
parent 672ecba175
commit d0be8b959a
13 changed files with 83 additions and 64 deletions
+4 -3
View File
@@ -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"
+7 -4
View File
@@ -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"
-6
View File
@@ -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
+6 -6
View File
@@ -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
+6 -4
View File
@@ -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>
+4 -3
View File
@@ -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"
+6 -4
View File
@@ -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"
+28 -18
View File
@@ -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 *)
+4 -3
View File
@@ -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"
+4 -3
View File
@@ -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"
+5 -4
View File
@@ -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>
+4 -3
View File
@@ -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"
+5 -3
View File
@@ -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"