GLuint specular_offset;
/* The drawing fallbacks */
+ GLuint Fallback;
nouveau_tri_func* draw_tri;
nouveau_line_func* draw_line;
nouveau_point_func* draw_point;
#define NOUVEAU_CONTEXT(ctx) ((nouveauContextPtr)(ctx->DriverCtx))
+#define NOUVEAU_FALLBACK_TEXTURE 0x0001
+#define NOUVEAU_FALLBACK_DRAW_BUFFER 0x0002
+#define NOUVEAU_FALLBACK_READ_BUFFER 0x0004
+#define NOUVEAU_FALLBACK_STENCIL 0x0008
+#define NOUVEAU_FALLBACK_RENDER_MODE 0x0010
+#define NOUVEAU_FALLBACK_LOGICOP 0x0020
+#define NOUVEAU_FALLBACK_SEP_SPECULAR 0x0040
+#define NOUVEAU_FALLBACK_BLEND_EQ 0x0080
+#define NOUVEAU_FALLBACK_BLEND_FUNC 0x0100
+#define NOUVEAU_FALLBACK_PROJTEX 0x0200
+#define NOUVEAU_FALLBACK_DISABLE 0x0400
+
extern GLboolean nouveauCreateContext( const __GLcontextModes *glVisual,
__DRIcontextPrivate *driContextPriv,
#include "nouveau_context.h"
#include "nouveau_tris.h"
+#include "nv10_swtcl.h"
+#include "nouveau_span.h"
#include "swrast/swrast.h"
#include "swrast_setup/swrast_setup.h"
#include "tnl/tnl.h"
_swsetup_Translate(ctx, v0, &v[0]);
_swsetup_Translate(ctx, v1, &v[1]);
_swsetup_Translate(ctx, v2, &v[2]);
- nouveauSpanRenderStart( ctx );
_swrast_Triangle(ctx, &v[0], &v[1], &v[2]);
- nouveauSpanRenderFinish( ctx );
}
SWvertex v[2];
_swsetup_Translate(ctx, v0, &v[0]);
_swsetup_Translate(ctx, v1, &v[1]);
- nouveauSpanRenderStart( ctx );
_swrast_Line(ctx, &v[0], &v[1]);
- nouveauSpanRenderFinish( ctx );
}
GLcontext *ctx = nmesa->glCtx;
SWvertex v[1];
_swsetup_Translate(ctx, v0, &v[0]);
- nouveauSpanRenderStart( ctx );
_swrast_Point(ctx, &v[0]);
- nouveauSpanRenderFinish( ctx );
}
-
void nouveauFallback(struct nouveau_context *nmesa, GLuint bit, GLboolean mode)
{
GLcontext *ctx = nmesa->glCtx;
if (mode) {
nmesa->Fallback |= bit;
if (oldfallback == 0) {
- nv40FinishPrimitive(nmesa);
+ if (nmesa->screen->card_type<NV_10) {
+ //nv03FinishPrimitive(nmesa);
+ } else {
+ nv10FinishPrimitive(nmesa);
+ }
_swsetup_Wakeup(ctx);
nmesa->renderIndex = ~0;
if (oldfallback == bit) {
_swrast_flush( ctx );
- tnl->Driver.Render.Start = nouveauRenderStart;
- tnl->Driver.Render.PrimitiveNotify = nouveauRenderPrimitive;
- tnl->Driver.Render.Finish = nouveauRenderFinish;
-
- tnl->Driver.Render.BuildVertices = _tnl_build_vertices;
- tnl->Driver.Render.CopyPV = _tnl_copy_pv;
- tnl->Driver.Render.Interp = _tnl_interp;
- tnl->Driver.Render.ResetLineStipple = nouveauResetLineStipple;
+ nouveauInitTriFunctions(ctx);
_tnl_invalidate_vertex_state( ctx, ~0 );
_tnl_invalidate_vertices( ctx, ~0 );
void nouveauRunPipeline( GLcontext *ctx )
{
- struct nouveau_context *vmesa = NOUVEAU_CONTEXT(ctx);
+ struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
- if (vmesa->newState) {
- vmesa->newRenderState |= vmesa->newState;
+ if (nmesa->newState) {
+ nmesa->newRenderState |= nmesa->newState;
}
_tnl_run_pipeline( ctx );
BEGIN_RING_PRIM(channel,NV20_BEGIN_VERTICES,NOUVEAU_MIN_PRIM_SIZE);
}
-static inline void nv10FinishPrimitive(struct nouveau_context *nmesa)
+inline void nv10FinishPrimitive(struct nouveau_context *nmesa)
{
FINISH_RING_PRIM();
if (nmesa->screen->card_type==NV_10)
}
-
/**********************************************************************/
/* Initialization. */
/**********************************************************************/
-
-void nouveauInitTriFuncs(GLcontext *ctx)
+void nouveauTriInitFunctions(GLcontext *ctx)
{
struct nouveau_context *nmesa = NOUVEAU_CONTEXT(ctx);
TNLcontext *tnl = TNL_CONTEXT(ctx);
}
+