summaryrefslogtreecommitdiff
path: root/src/mesa/swrast_setup/ss_context.c
diff options
context:
space:
mode:
authorKeith Whitwell <keith@tungstengraphics.com>2001-01-29 20:47:39 +0000
committerKeith Whitwell <keith@tungstengraphics.com>2001-01-29 20:47:39 +0000
commit5c1e7fa6ee72f4403d9ec9d12830dd689b966e71 (patch)
tree8cb11c26af178632b05de9c5b2f53c32331475c5 /src/mesa/swrast_setup/ss_context.c
parent4b90e68ac6d0fe4ffca5e2cd51794bb4350cac28 (diff)
Removed knowledge of swrast Clear/Bitmap/Accum/Draw/Read/CopyPixels
functions from core mesa -- if drivers need these fallbacks they must now call them themselves. Introduced hooks for clip-vertex-interpolation and the rendering of clipped lines and polygons. Allows drivers to interpolate their hardware-format vertices directly. Used in dri drivers to replace fastpath code. Slight optimizations to pipeline build/run routines.
Diffstat (limited to 'src/mesa/swrast_setup/ss_context.c')
-rw-r--r--src/mesa/swrast_setup/ss_context.c32
1 files changed, 30 insertions, 2 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 );
}