summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/swrast_setup')
-rw-r--r--src/mesa/swrast_setup/ss_context.c32
-rw-r--r--src/mesa/swrast_setup/ss_context.h7
-rw-r--r--src/mesa/swrast_setup/ss_vbtmp.h5
-rw-r--r--src/mesa/swrast_setup/swrast_setup.h18
4 files changed, 59 insertions, 3 deletions
diff --git a/src/mesa/swrast_setup/ss_context.c b/src/mesa/swrast_setup/ss_context.c
index a6c7aa8740..83c7f45ffa 100644
--- a/src/mesa/swrast_setup/ss_context.c
+++ b/src/mesa/swrast_setup/ss_context.c
@@ -1,4 +1,4 @@
-/* $Id: ss_context.c,v 1.8 2001/01/16 05:29:43 keithw Exp $ */
+/* $Id: ss_context.c,v 1.9 2001/01/29 20:47:39 keithw Exp $ */
/*
* Mesa 3-D graphics library
@@ -32,6 +32,7 @@
#include "ss_context.h"
#include "ss_triangle.h"
#include "ss_vb.h"
+#include "ss_interp.h"
#include "swrast_setup.h"
#include "tnl/t_context.h"
@@ -107,6 +108,7 @@ _swsetup_CreateContext( GLcontext *ctx )
swsetup->NewState = ~0;
_swsetup_vb_init( ctx );
+ _swsetup_interp_init( ctx );
_swsetup_trifuncs_init( ctx );
return GL_TRUE;
@@ -134,6 +136,7 @@ void
_swsetup_RenderStart( GLcontext *ctx )
{
SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+ struct vertex_buffer *VB = &TNL_CONTEXT(ctx)->vb;
GLuint new_state = swsetup->NewState;
if (new_state & _SWSETUP_NEW_RENDERINDEX) {
@@ -145,6 +148,11 @@ _swsetup_RenderStart( GLcontext *ctx )
}
swsetup->NewState = 0;
+
+ if (VB->ClipMask && VB->importable_data)
+ VB->import_data( ctx,
+ VB->importable_data,
+ VEC_NOT_WRITEABLE|VEC_BAD_STRIDE);
}
void
@@ -156,6 +164,26 @@ _swsetup_RenderFinish( GLcontext *ctx )
void
_swsetup_InvalidateState( GLcontext *ctx, GLuint new_state )
{
- SWSETUP_CONTEXT(ctx)->NewState |= new_state;
+ SScontext *swsetup = SWSETUP_CONTEXT(ctx);
+ swsetup->NewState |= new_state;
+
+ if (new_state & _SWSETUP_NEW_INTERP) {
+ swsetup->RenderInterp = _swsetup_validate_interp;
+ swsetup->RenderCopyPV = _swsetup_validate_copypv;
+ }
+}
+
+void
+_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
+ GLuint dst, GLuint out, GLuint in,
+ GLboolean force_boundary )
+{
+ SWSETUP_CONTEXT(ctx)->RenderInterp( ctx, t, dst, out, in, force_boundary );
+}
+
+void
+_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src )
+{
+ SWSETUP_CONTEXT(ctx)->RenderCopyPV( ctx, dst, src );
}
diff --git a/src/mesa/swrast_setup/ss_context.h b/src/mesa/swrast_setup/ss_context.h
index 957a8fc3fc..d19b1c62e0 100644
--- a/src/mesa/swrast_setup/ss_context.h
+++ b/src/mesa/swrast_setup/ss_context.h
@@ -53,6 +53,13 @@ typedef struct {
void (*Points)( GLcontext *ctx, GLuint first, GLuint last );
+ void (*RenderCopyPV)( GLcontext *ctx, GLuint dst, GLuint src );
+
+ void (*RenderInterp)( GLcontext *ctx, GLfloat t,
+ GLuint dst, GLuint out, GLuint in,
+ GLboolean force_boundary );
+
+
SWvertex *verts;
GLenum render_prim;
diff --git a/src/mesa/swrast_setup/ss_vbtmp.h b/src/mesa/swrast_setup/ss_vbtmp.h
index 23b22d95ab..6197f5bdb5 100644
--- a/src/mesa/swrast_setup/ss_vbtmp.h
+++ b/src/mesa/swrast_setup/ss_vbtmp.h
@@ -49,7 +49,10 @@ static void TAG(rs)(GLcontext *ctx, GLuint start, GLuint end, GLuint newinputs )
const GLfloat tz = m[14];
GLuint maxtex = 0;
-/* fprintf(stderr, "%s\n", __FUNCTION__); */
+ if (!newinputs) {
+ fprintf(stderr, "no new inputs\n");
+ return;
+ }
/* TODO: Get import_client_data to pad vectors out to 4 cleanly.
*/
diff --git a/src/mesa/swrast_setup/swrast_setup.h b/src/mesa/swrast_setup/swrast_setup.h
index f3607c75e9..f3f8941a40 100644
--- a/src/mesa/swrast_setup/swrast_setup.h
+++ b/src/mesa/swrast_setup/swrast_setup.h
@@ -69,4 +69,22 @@ _swsetup_RenderStart( GLcontext *ctx );
extern void
_swsetup_RenderFinish( GLcontext *ctx );
+extern void
+_swsetup_RenderProjectInterpVerts( GLcontext *ctx );
+
+extern void
+_swsetup_RenderInterp( GLcontext *ctx, GLfloat t,
+ GLuint dst, GLuint out, GLuint in,
+ GLboolean force_boundary );
+extern void
+_swsetup_RenderCopyPV( GLcontext *ctx, GLuint dst, GLuint src );
+
+extern void
+_swsetup_RenderClippedPolygon( GLcontext *ctx, const GLuint *elts, GLuint n );
+
+extern void
+_swsetup_RenderClippedLine( GLcontext *ctx, GLuint ii, GLuint jj );
+
+
+
#endif