Fixed 'IRound' to 'IROUND' in mmath.h
Fixed fallback path for drawarrays/_tnl_hard_begin. Removed disabled debug code.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.X11,v 1.38 2001/01/05 05:31:42 keithw Exp $
|
# $Id: Makefile.X11,v 1.39 2001/01/08 21:55:59 keithw Exp $
|
||||||
|
|
||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 3.5
|
# Version: 3.5
|
||||||
@@ -188,8 +188,8 @@ ASM_SOURCES =
|
|||||||
ADDITIONAL_OBJ =
|
ADDITIONAL_OBJ =
|
||||||
|
|
||||||
OBJECTS = $(ASM_SOURCES:.S=.o) \
|
OBJECTS = $(ASM_SOURCES:.S=.o) \
|
||||||
$(CORE_SOURCES:.c=.o) \
|
|
||||||
$(DRIVER_SOURCES:.c=.o) \
|
$(DRIVER_SOURCES:.c=.o) \
|
||||||
|
$(CORE_SOURCES:.c=.o) \
|
||||||
$(ADDITIONAL_OBJ)
|
$(ADDITIONAL_OBJ)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -480,8 +480,10 @@ fx_null_tri( GLcontext *ctx,
|
|||||||
grDrawTriangle( &v[i2].v, &v[i1].v, &v[i].v )
|
grDrawTriangle( &v[i2].v, &v[i1].v, &v[i].v )
|
||||||
|
|
||||||
#define TAG(x) fx_##x##_verts
|
#define TAG(x) fx_##x##_verts
|
||||||
#define LOCAL_VARS \
|
#define LOCAL_VARS \
|
||||||
fxVertex *v = FX_CONTEXT(ctx)->verts;
|
fxVertex *v = FX_CONTEXT(ctx)->verts; \
|
||||||
|
const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts; \
|
||||||
|
(void) elt;
|
||||||
|
|
||||||
/* Verts, no clipping.
|
/* Verts, no clipping.
|
||||||
*/
|
*/
|
||||||
@@ -496,12 +498,8 @@ fx_null_tri( GLcontext *ctx,
|
|||||||
*/
|
*/
|
||||||
#undef ELT
|
#undef ELT
|
||||||
#undef TAG
|
#undef TAG
|
||||||
#undef LOCAL_VARS
|
|
||||||
#define TAG(x) fx_##x##_elts
|
#define TAG(x) fx_##x##_elts
|
||||||
#define ELT(x) elt[x]
|
#define ELT(x) elt[x]
|
||||||
#define LOCAL_VARS \
|
|
||||||
fxVertex *v = FX_CONTEXT(ctx)->verts; \
|
|
||||||
const GLuint * const elt = TNL_CONTEXT(ctx)->vb.Elts;
|
|
||||||
#include "tnl/t_vb_rendertmp.h"
|
#include "tnl/t_vb_rendertmp.h"
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
# $Id: Makefile.X11,v 1.38 2001/01/05 05:31:42 keithw Exp $
|
# $Id: Makefile.X11,v 1.39 2001/01/08 21:55:59 keithw Exp $
|
||||||
|
|
||||||
# Mesa 3-D graphics library
|
# Mesa 3-D graphics library
|
||||||
# Version: 3.5
|
# Version: 3.5
|
||||||
@@ -188,8 +188,8 @@ ASM_SOURCES =
|
|||||||
ADDITIONAL_OBJ =
|
ADDITIONAL_OBJ =
|
||||||
|
|
||||||
OBJECTS = $(ASM_SOURCES:.S=.o) \
|
OBJECTS = $(ASM_SOURCES:.S=.o) \
|
||||||
$(CORE_SOURCES:.c=.o) \
|
|
||||||
$(DRIVER_SOURCES:.c=.o) \
|
$(DRIVER_SOURCES:.c=.o) \
|
||||||
|
$(CORE_SOURCES:.c=.o) \
|
||||||
$(ADDITIONAL_OBJ)
|
$(ADDITIONAL_OBJ)
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: mtypes.h,v 1.12 2001/01/08 04:09:41 keithw Exp $ */
|
/* $Id: mtypes.h,v 1.13 2001/01/08 21:55:59 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -1576,13 +1576,14 @@ struct __GLcontextRec {
|
|||||||
/* Dither disable via MESA_NO_DITHER env var */
|
/* Dither disable via MESA_NO_DITHER env var */
|
||||||
GLboolean NoDither;
|
GLboolean NoDither;
|
||||||
|
|
||||||
#ifdef DEBUG
|
|
||||||
GLboolean Rendering;
|
GLboolean Rendering;
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(MESA_TRACE)
|
#if defined(MESA_TRACE)
|
||||||
struct _glapi_table *TraceDispatch;
|
struct _glapi_table *TraceDispatch;
|
||||||
trace_context_t *TraceCtx;
|
trace_context_t *TraceCtx;
|
||||||
|
#else
|
||||||
|
void *TraceDispatch;
|
||||||
|
void *TraceCtx;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Hooks for module contexts. These will eventually live
|
/* Hooks for module contexts. These will eventually live
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_array_api.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
|
/* $Id: t_array_api.c,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -103,7 +103,7 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
|
|||||||
* operations: producing the flag array and computing the orflag
|
* operations: producing the flag array and computing the orflag
|
||||||
* of the flag array.
|
* of the flag array.
|
||||||
*/
|
*/
|
||||||
#if 0
|
#if 1
|
||||||
if (_tnl_hard_begin( ctx, mode )) {
|
if (_tnl_hard_begin( ctx, mode )) {
|
||||||
GLuint j;
|
GLuint j;
|
||||||
for (j = 0 ; j < count ; ) {
|
for (j = 0 ; j < count ; ) {
|
||||||
@@ -127,8 +127,7 @@ _tnl_DrawArrays(GLenum mode, GLint start, GLsizei count)
|
|||||||
#else
|
#else
|
||||||
/* Simple alternative to above code.
|
/* Simple alternative to above code.
|
||||||
*/
|
*/
|
||||||
/* if (_tnl_hard_begin( ctx, mode )) */
|
if (_tnl_hard_begin( ctx, mode ))
|
||||||
_tnl_begin(ctx,mode);
|
|
||||||
{
|
{
|
||||||
GLuint i;
|
GLuint i;
|
||||||
for (i=start;i<count;i++) {
|
for (i=start;i<count;i++) {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_array_import.c,v 1.5 2001/01/08 04:09:41 keithw Exp $ */
|
/* $Id: t_array_import.c,v 1.6 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -195,9 +195,6 @@ static void _tnl_import_texcoord( GLcontext *ctx,
|
|||||||
struct gl_client_array *tmp;
|
struct gl_client_array *tmp;
|
||||||
GLboolean is_writeable = 0;
|
GLboolean is_writeable = 0;
|
||||||
|
|
||||||
/* fprintf(stderr, "%s %d before wr %d ptr %p\n", __FUNCTION__, i, writeable, */
|
|
||||||
/* inputs->TexCoord[i].data); */
|
|
||||||
|
|
||||||
tmp = _ac_import_texcoord(ctx, i, GL_FLOAT,
|
tmp = _ac_import_texcoord(ctx, i, GL_FLOAT,
|
||||||
stride ? 4*sizeof(GLfloat) : 0,
|
stride ? 4*sizeof(GLfloat) : 0,
|
||||||
0,
|
0,
|
||||||
@@ -213,9 +210,6 @@ static void _tnl_import_texcoord( GLcontext *ctx,
|
|||||||
inputs->TexCoord[i].flags |= VEC_BAD_STRIDE;
|
inputs->TexCoord[i].flags |= VEC_BAD_STRIDE;
|
||||||
if (!is_writeable)
|
if (!is_writeable)
|
||||||
inputs->TexCoord[i].flags |= VEC_NOT_WRITEABLE;
|
inputs->TexCoord[i].flags |= VEC_NOT_WRITEABLE;
|
||||||
|
|
||||||
/* fprintf(stderr, "%s %d before wr %d ptr %p\n", __FUNCTION__, i, is_writeable, */
|
|
||||||
/* inputs->TexCoord[i].data); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_context.c,v 1.8 2001/01/05 02:26:49 keithw Exp $ */
|
/* $Id: t_context.c,v 1.9 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -39,6 +39,7 @@
|
|||||||
#include "t_array_api.h"
|
#include "t_array_api.h"
|
||||||
#include "t_eval_api.h"
|
#include "t_eval_api.h"
|
||||||
#include "t_imm_alloc.h"
|
#include "t_imm_alloc.h"
|
||||||
|
#include "t_imm_api.h"
|
||||||
#include "t_imm_exec.h"
|
#include "t_imm_exec.h"
|
||||||
#include "t_imm_dlist.h"
|
#include "t_imm_dlist.h"
|
||||||
#include "t_pipeline.h"
|
#include "t_pipeline.h"
|
||||||
@@ -84,6 +85,7 @@ _tnl_CreateContext( GLcontext *ctx )
|
|||||||
/* Create the TNLcontext structure
|
/* Create the TNLcontext structure
|
||||||
*/
|
*/
|
||||||
ctx->swtnl_context = tnl = CALLOC( sizeof(TNLcontext) );
|
ctx->swtnl_context = tnl = CALLOC( sizeof(TNLcontext) );
|
||||||
|
|
||||||
if (!tnl) {
|
if (!tnl) {
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
@@ -117,7 +119,6 @@ _tnl_CreateContext( GLcontext *ctx )
|
|||||||
ctx->Driver.NeedFlush = FLUSH_UPDATE_CURRENT;
|
ctx->Driver.NeedFlush = FLUSH_UPDATE_CURRENT;
|
||||||
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
||||||
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
|
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_eval_api.c,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
|
/* $Id: t_eval_api.c,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -98,7 +98,7 @@ _tnl_exec_EvalMesh1( GLenum mode, GLint i1, GLint i2 )
|
|||||||
ctx->CompileFlag = GL_FALSE;
|
ctx->CompileFlag = GL_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
_tnl_begin( ctx, prim );
|
_tnl_hard_begin( ctx, prim );
|
||||||
for (i=i1;i<=i2;i++,u+=du) {
|
for (i=i1;i<=i2;i++,u+=du) {
|
||||||
_tnl_eval_coord1f( ctx, u );
|
_tnl_eval_coord1f( ctx, u );
|
||||||
}
|
}
|
||||||
@@ -151,7 +151,7 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
|
|||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case GL_POINT:
|
case GL_POINT:
|
||||||
_tnl_begin( ctx, GL_POINTS );
|
_tnl_hard_begin( ctx, GL_POINTS );
|
||||||
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
||||||
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
||||||
_tnl_eval_coord2f( ctx, u, v );
|
_tnl_eval_coord2f( ctx, u, v );
|
||||||
@@ -161,14 +161,14 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
|
|||||||
break;
|
break;
|
||||||
case GL_LINE:
|
case GL_LINE:
|
||||||
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
||||||
_tnl_begin( ctx, GL_LINE_STRIP );
|
_tnl_hard_begin( ctx, GL_LINE_STRIP );
|
||||||
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
||||||
_tnl_eval_coord2f( ctx, u, v );
|
_tnl_eval_coord2f( ctx, u, v );
|
||||||
}
|
}
|
||||||
_tnl_end(ctx);
|
_tnl_end(ctx);
|
||||||
}
|
}
|
||||||
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
||||||
_tnl_begin( ctx, GL_LINE_STRIP );
|
_tnl_hard_begin( ctx, GL_LINE_STRIP );
|
||||||
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
for (v=v1,j=j1;j<=j2;j++,v+=dv) {
|
||||||
_tnl_eval_coord2f( ctx, u, v );
|
_tnl_eval_coord2f( ctx, u, v );
|
||||||
}
|
}
|
||||||
@@ -177,7 +177,7 @@ _tnl_exec_EvalMesh2( GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2 )
|
|||||||
break;
|
break;
|
||||||
case GL_FILL:
|
case GL_FILL:
|
||||||
for (v=v1,j=j1;j<j2;j++,v+=dv) {
|
for (v=v1,j=j1;j<j2;j++,v+=dv) {
|
||||||
_tnl_begin( ctx, GL_TRIANGLE_STRIP );
|
_tnl_hard_begin( ctx, GL_TRIANGLE_STRIP );
|
||||||
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
for (u=u1,i=i1;i<=i2;i++,u+=du) {
|
||||||
_tnl_eval_coord2f( ctx, u, v );
|
_tnl_eval_coord2f( ctx, u, v );
|
||||||
_tnl_eval_coord2f( ctx, u, v+dv );
|
_tnl_eval_coord2f( ctx, u, v+dv );
|
||||||
|
@@ -68,7 +68,7 @@ void _tnl_flush_vertices( GLcontext *ctx, GLuint flags )
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
static void
|
||||||
_tnl_begin( GLcontext *ctx, GLenum p )
|
_tnl_begin( GLcontext *ctx, GLenum p )
|
||||||
{
|
{
|
||||||
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
struct immediate *IM = TNL_CURRENT_IM(ctx);
|
||||||
@@ -172,6 +172,10 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
*/
|
*/
|
||||||
if (!ctx->CompileFlag) {
|
if (!ctx->CompileFlag) {
|
||||||
_tnl_begin( ctx, p );
|
_tnl_begin( ctx, p );
|
||||||
|
|
||||||
|
/* Set this for the duration:
|
||||||
|
*/
|
||||||
|
ctx->Driver.CurrentExecPrimitive = p;
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -182,19 +186,15 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
|
|
||||||
switch (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) {
|
switch (IM->BeginState & (VERT_BEGIN_0|VERT_BEGIN_1)) {
|
||||||
case VERT_BEGIN_0|VERT_BEGIN_1:
|
case VERT_BEGIN_0|VERT_BEGIN_1:
|
||||||
/* In this case we know for sure that the list is going to be
|
/* This is an immediate known to be inside a begin/end object.
|
||||||
* inside a begin/end object at this point when run. Rather
|
|
||||||
* than saving the redundant data, compile in an error and
|
|
||||||
* return.
|
|
||||||
*/
|
*/
|
||||||
IM->BeginState |= (VERT_ERROR_1|VERT_ERROR_0);
|
IM->BeginState |= (VERT_ERROR_1|VERT_ERROR_0);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
|
|
||||||
case VERT_BEGIN_0:
|
case VERT_BEGIN_0:
|
||||||
case VERT_BEGIN_1:
|
case VERT_BEGIN_1:
|
||||||
/* This is a normal (non-hard) immediate, in an unknown
|
/* This is a display-list immediate in an unknown begin/end
|
||||||
* begin/end state. Assert it is empty and conviert it to a
|
* state. Assert it is empty and conviert it to a 'hard' one.
|
||||||
* 'hard' one.
|
|
||||||
*/
|
*/
|
||||||
ASSERT (IM->SavedBeginState == 0);
|
ASSERT (IM->SavedBeginState == 0);
|
||||||
|
|
||||||
@@ -207,6 +207,9 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
|
|
||||||
/* FALLTHROUGH */
|
/* FALLTHROUGH */
|
||||||
case 0:
|
case 0:
|
||||||
|
/* Unless we have fallen through, this is an immediate known to
|
||||||
|
* be outside begin/end objects.
|
||||||
|
*/
|
||||||
|
|
||||||
IM->BeginState |= VERT_BEGIN_0|VERT_BEGIN_1;
|
IM->BeginState |= VERT_BEGIN_0|VERT_BEGIN_1;
|
||||||
|
|
||||||
@@ -229,6 +232,7 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
* vertices before the next state change.
|
* vertices before the next state change.
|
||||||
*/
|
*/
|
||||||
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
|
ctx->Driver.NeedFlush |= FLUSH_STORED_VERTICES;
|
||||||
|
|
||||||
return GL_TRUE;
|
return GL_TRUE;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -237,6 +241,40 @@ _tnl_hard_begin( GLcontext *ctx, GLenum p )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/* Need to do this to get the correct begin/end error behaviour from
|
||||||
|
* functions like ColorPointerEXT which are still active in
|
||||||
|
* SAVE_AND_EXEC modes.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
_tnl_save_Begin( GLenum mode )
|
||||||
|
{
|
||||||
|
GET_CURRENT_CONTEXT(ctx);
|
||||||
|
|
||||||
|
if (mode > GL_POLYGON) {
|
||||||
|
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ctx->ExecuteFlag) {
|
||||||
|
/* Preserve vtxfmt invarient:
|
||||||
|
*/
|
||||||
|
if (ctx->NewState)
|
||||||
|
gl_update_state( ctx );
|
||||||
|
|
||||||
|
/* Slot in geomexec: No need to call setdispatch as we know
|
||||||
|
* CurrentDispatch is Save.
|
||||||
|
*/
|
||||||
|
ASSERT(ctx->CurrentDispatch == ctx->Save);
|
||||||
|
}
|
||||||
|
|
||||||
|
_tnl_begin( ctx, mode );
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Note the continuation of a partially completed primitive. For
|
/* Note the continuation of a partially completed primitive. For
|
||||||
* driver t&l fallbacks between begin/end primitives. Has basically
|
* driver t&l fallbacks between begin/end primitives. Has basically
|
||||||
* the same effects as a primitive wrapping onto a second immediate
|
* the same effects as a primitive wrapping onto a second immediate
|
||||||
@@ -297,6 +335,10 @@ _tnl_end( GLcontext *ctx )
|
|||||||
|
|
||||||
IM->BeginState = state;
|
IM->BeginState = state;
|
||||||
|
|
||||||
|
if (!ctx->CompileFlag)
|
||||||
|
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
||||||
|
|
||||||
|
|
||||||
/* You can set this flag to get the old 'flush_vb on glEnd()'
|
/* You can set this flag to get the old 'flush_vb on glEnd()'
|
||||||
* behaviour.
|
* behaviour.
|
||||||
*/
|
*/
|
||||||
@@ -316,10 +358,6 @@ _tnl_End(void)
|
|||||||
*/
|
*/
|
||||||
if (ctx->CompileFlag)
|
if (ctx->CompileFlag)
|
||||||
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
|
ctx->Driver.CurrentSavePrimitive = PRIM_OUTSIDE_BEGIN_END;
|
||||||
else
|
|
||||||
ctx->Driver.CurrentExecPrimitive = PRIM_OUTSIDE_BEGIN_END;
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_api.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
|
/* $Id: t_imm_api.h,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -32,9 +32,10 @@
|
|||||||
#include "t_context.h"
|
#include "t_context.h"
|
||||||
|
|
||||||
|
|
||||||
|
extern void _tnl_save_Begin( GLenum mode );
|
||||||
|
|
||||||
/* TNL-private internal functions for building higher-level operations:
|
/* TNL-private internal functions for building higher-level operations:
|
||||||
*/
|
*/
|
||||||
extern void _tnl_begin( GLcontext *ctx, GLenum p );
|
|
||||||
extern GLboolean _tnl_hard_begin( GLcontext *ctx, GLenum p );
|
extern GLboolean _tnl_hard_begin( GLcontext *ctx, GLenum p );
|
||||||
extern void _tnl_end( GLcontext *ctx );
|
extern void _tnl_end( GLcontext *ctx );
|
||||||
extern void _tnl_vertex2f( GLcontext *ctx, GLfloat x, GLfloat y );
|
extern void _tnl_vertex2f( GLcontext *ctx, GLfloat x, GLfloat y );
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_dlist.c,v 1.4 2000/12/28 22:11:05 keithw Exp $ */
|
/* $Id: t_imm_dlist.c,v 1.5 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -112,8 +112,6 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
node->IM = im; im->ref_count++;
|
node->IM = im; im->ref_count++;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* im->id, im->ref_count); */
|
|
||||||
node->Start = im->Start;
|
node->Start = im->Start;
|
||||||
node->Count = im->Count;
|
node->Count = im->Count;
|
||||||
node->BeginState = im->BeginState;
|
node->BeginState = im->BeginState;
|
||||||
@@ -144,10 +142,6 @@ _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM )
|
|||||||
if (!new_im) return;
|
if (!new_im) return;
|
||||||
new_im->ref_count++;
|
new_im->ref_count++;
|
||||||
im->ref_count--; /* remove CURRENT_IM reference */
|
im->ref_count--; /* remove CURRENT_IM reference */
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* im->id, im->ref_count); */
|
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* new_im->id, new_im->ref_count); */
|
|
||||||
ASSERT(im->ref_count > 0);
|
ASSERT(im->ref_count > 0);
|
||||||
SET_IMMEDIATE( ctx, new_im );
|
SET_IMMEDIATE( ctx, new_im );
|
||||||
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS,
|
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS,
|
||||||
@@ -343,15 +337,9 @@ _tnl_EndList( GLcontext *ctx )
|
|||||||
|
|
||||||
ctx->swtnl_im = 0;
|
ctx->swtnl_im = 0;
|
||||||
IM->ref_count--;
|
IM->ref_count--;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* IM->id, IM->ref_count); */
|
|
||||||
if (IM == tnl->ExecCopySource) {
|
if (IM == tnl->ExecCopySource) {
|
||||||
IM->ref_count--;
|
IM->ref_count--;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* IM->id, IM->ref_count); */
|
|
||||||
} else {
|
} else {
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
|
|
||||||
if ( --tnl->ExecCopySource->ref_count == 0 )
|
if ( --tnl->ExecCopySource->ref_count == 0 )
|
||||||
_tnl_free_immediate( tnl->ExecCopySource );
|
_tnl_free_immediate( tnl->ExecCopySource );
|
||||||
}
|
}
|
||||||
@@ -366,14 +354,10 @@ _tnl_EndList( GLcontext *ctx )
|
|||||||
|
|
||||||
tnl->ExecCopySource = IM;
|
tnl->ExecCopySource = IM;
|
||||||
IM->ref_count++;
|
IM->ref_count++;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* IM->id, IM->ref_count); */
|
|
||||||
|
|
||||||
|
|
||||||
SET_IMMEDIATE( ctx, IM );
|
SET_IMMEDIATE( ctx, IM );
|
||||||
IM->ref_count++;
|
IM->ref_count++;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* IM->id, IM->ref_count); */
|
|
||||||
|
|
||||||
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS, 0, 0 );
|
_tnl_reset_input( ctx, IMM_MAX_COPIED_VERTS, 0, 0 );
|
||||||
|
|
||||||
@@ -417,31 +401,3 @@ _tnl_dlist_init( GLcontext *ctx )
|
|||||||
print_compiled_cassette );
|
print_compiled_cassette );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Need to do this to get the correct begin/end error behaviour from
|
|
||||||
* functions like ColorPointerEXT which are still active in
|
|
||||||
* SAVE_AND_EXEC modes.
|
|
||||||
*/
|
|
||||||
void
|
|
||||||
_tnl_save_Begin( GLenum mode )
|
|
||||||
{
|
|
||||||
GET_CURRENT_CONTEXT(ctx);
|
|
||||||
|
|
||||||
if (mode > GL_POLYGON) {
|
|
||||||
_mesa_compile_error( ctx, GL_INVALID_ENUM, "glBegin" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (ctx->ExecuteFlag) {
|
|
||||||
/* Preserve vtxfmt invarient:
|
|
||||||
*/
|
|
||||||
if (ctx->NewState)
|
|
||||||
gl_update_state( ctx );
|
|
||||||
|
|
||||||
/* Slot in geomexec: No need to call setdispatch as we know
|
|
||||||
* CurrentDispatch is Save.
|
|
||||||
*/
|
|
||||||
ASSERT(ctx->CurrentDispatch == ctx->Save);
|
|
||||||
}
|
|
||||||
|
|
||||||
_tnl_begin( ctx, mode );
|
|
||||||
}
|
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_dlist.h,v 1.1 2000/12/26 05:09:32 keithw Exp $ */
|
/* $Id: t_imm_dlist.h,v 1.2 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -38,7 +38,6 @@ extern void _tnl_dlist_init( GLcontext *ctx );
|
|||||||
extern void _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM );
|
extern void _tnl_compile_cassette( GLcontext *ctx, struct immediate *IM );
|
||||||
extern void _tnl_EndList( GLcontext *ctx );
|
extern void _tnl_EndList( GLcontext *ctx );
|
||||||
extern void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode );
|
extern void _tnl_NewList( GLcontext *ctx, GLuint list, GLenum mode );
|
||||||
extern void _tnl_save_Begin( GLenum mode );
|
|
||||||
|
|
||||||
extern void _tnl_EndCallList( GLcontext *ctx );
|
extern void _tnl_EndCallList( GLcontext *ctx );
|
||||||
extern void _tnl_BeginCallList( GLcontext *ctx, GLuint list );
|
extern void _tnl_BeginCallList( GLcontext *ctx, GLuint list );
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_exec.c,v 1.5 2001/01/05 02:26:49 keithw Exp $ */
|
/* $Id: t_imm_exec.c,v 1.6 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -471,15 +471,12 @@ void _tnl_imm_init( GLcontext *ctx )
|
|||||||
|
|
||||||
ctx->swtnl_im = _tnl_alloc_immediate( ctx );
|
ctx->swtnl_im = _tnl_alloc_immediate( ctx );
|
||||||
TNL_CURRENT_IM(ctx)->ref_count++;
|
TNL_CURRENT_IM(ctx)->ref_count++;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* TNL_CURRENT_IM(ctx)->id, TNL_CURRENT_IM(ctx)->ref_count); */
|
|
||||||
|
|
||||||
tnl->ExecCopyTexSize = 0;
|
tnl->ExecCopyTexSize = 0;
|
||||||
tnl->ExecCopyCount = 0;
|
tnl->ExecCopyCount = 0;
|
||||||
tnl->ExecCopySource = TNL_CURRENT_IM(ctx);
|
tnl->ExecCopySource = TNL_CURRENT_IM(ctx);
|
||||||
TNL_CURRENT_IM(ctx)->ref_count++;
|
TNL_CURRENT_IM(ctx)->ref_count++;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* TNL_CURRENT_IM(ctx)->id, TNL_CURRENT_IM(ctx)->ref_count); */
|
|
||||||
TNL_CURRENT_IM(ctx)->CopyStart = IMM_MAX_COPIED_VERTS;
|
TNL_CURRENT_IM(ctx)->CopyStart = IMM_MAX_COPIED_VERTS;
|
||||||
|
|
||||||
gl_vector4f_init( &tmp->Obj, 0, 0 );
|
gl_vector4f_init( &tmp->Obj, 0, 0 );
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_imm_fixup.c,v 1.2 2000/12/28 22:11:05 keithw Exp $ */
|
/* $Id: t_imm_fixup.c,v 1.3 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -433,16 +433,12 @@ static void copy_vertices( GLcontext *ctx,
|
|||||||
|
|
||||||
ASSERT(prev == tnl->ExecCopySource);
|
ASSERT(prev == tnl->ExecCopySource);
|
||||||
|
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
|
|
||||||
|
|
||||||
if (--tnl->ExecCopySource->ref_count == 0)
|
if (--tnl->ExecCopySource->ref_count == 0)
|
||||||
_tnl_free_immediate( tnl->ExecCopySource );
|
_tnl_free_immediate( tnl->ExecCopySource );
|
||||||
|
|
||||||
next->ref_count++;
|
next->ref_count++;
|
||||||
tnl->ExecCopySource = next;
|
tnl->ExecCopySource = next;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* next->id, next->ref_count); */
|
|
||||||
tnl->ExecCopyElts[0] = next->Start-3;
|
tnl->ExecCopyElts[0] = next->Start-3;
|
||||||
tnl->ExecCopyElts[1] = next->Start-2;
|
tnl->ExecCopyElts[1] = next->Start-2;
|
||||||
tnl->ExecCopyElts[2] = next->Start-1;
|
tnl->ExecCopyElts[2] = next->Start-1;
|
||||||
@@ -732,14 +728,10 @@ _tnl_get_exec_copy_verts( GLcontext *ctx, struct immediate *IM )
|
|||||||
|
|
||||||
|
|
||||||
if (tnl->ExecCopySource != IM) {
|
if (tnl->ExecCopySource != IM) {
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count-1); */
|
|
||||||
if (--tnl->ExecCopySource->ref_count == 0)
|
if (--tnl->ExecCopySource->ref_count == 0)
|
||||||
_tnl_free_immediate( tnl->ExecCopySource );
|
_tnl_free_immediate( tnl->ExecCopySource );
|
||||||
IM->ref_count++;
|
IM->ref_count++;
|
||||||
tnl->ExecCopySource = IM;
|
tnl->ExecCopySource = IM;
|
||||||
/* fprintf(stderr, "%s id %d refcount %d\n", __FUNCTION__, */
|
|
||||||
/* tnl->ExecCopySource->id, tnl->ExecCopySource->ref_count); */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (prim == GL_POLYGON+1) {
|
if (prim == GL_POLYGON+1) {
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_pipeline.c,v 1.7 2000/12/26 05:09:33 keithw Exp $ */
|
/* $Id: t_pipeline.c,v 1.8 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -115,7 +115,6 @@ void _tnl_run_pipeline( GLcontext *ctx )
|
|||||||
GLuint changed_inputs = pipe->run_input_changes;
|
GLuint changed_inputs = pipe->run_input_changes;
|
||||||
GLboolean running = GL_TRUE;
|
GLboolean running = GL_TRUE;
|
||||||
GLuint i;
|
GLuint i;
|
||||||
|
|
||||||
unsigned short __tmp;
|
unsigned short __tmp;
|
||||||
|
|
||||||
/* Done elsewhere.
|
/* Done elsewhere.
|
||||||
|
@@ -1,4 +1,4 @@
|
|||||||
/* $Id: t_vb_render.c,v 1.8 2001/01/08 17:41:15 keithw Exp $ */
|
/* $Id: t_vb_render.c,v 1.9 2001/01/08 21:56:00 keithw Exp $ */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Mesa 3-D graphics library
|
* Mesa 3-D graphics library
|
||||||
@@ -603,6 +603,8 @@ static GLboolean run_render( GLcontext *ctx,
|
|||||||
length= VB->PrimitiveLength[i];
|
length= VB->PrimitiveLength[i];
|
||||||
ASSERT(length || (flags & PRIM_LAST));
|
ASSERT(length || (flags & PRIM_LAST));
|
||||||
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
|
ASSERT((flags & PRIM_MODE_MASK) <= GL_POLYGON+1);
|
||||||
|
/* fprintf(stderr, "Render %s %d..%d\n", */
|
||||||
|
/* _mesa_prim_name[flags&PRIM_MODE_MASK], i, i+length); */
|
||||||
if (length)
|
if (length)
|
||||||
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
|
tab[flags & PRIM_MODE_MASK]( ctx, i, i + length, flags );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user