summaryrefslogtreecommitdiff
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c46
1 files changed, 25 insertions, 21 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index 91ddcbf9ed..b881b12ff3 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -1,8 +1,8 @@
/*
* Mesa 3-D graphics library
- * Version: 6.5.1
+ * Version: 7.1
*
- * Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
+ * Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -33,10 +33,6 @@
#include "api_arrayelt.h"
#include "api_loopback.h"
#include "config.h"
-#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
-#include "arbprogram.h"
-#include "program.h"
-#endif
#include "attrib.h"
#include "blend.h"
#include "buffers.h"
@@ -57,7 +53,7 @@
#include "extensions.h"
#include "feedback.h"
#include "get.h"
-#include "glapi.h"
+#include "glapi/glapi.h"
#include "hash.h"
#include "histogram.h"
#include "image.h"
@@ -76,18 +72,22 @@
#include "texstate.h"
#include "mtypes.h"
#include "varray.h"
+#if FEATURE_ARB_vertex_program || FEATURE_ARB_fragment_program
+#include "shader/arbprogram.h"
+#include "shader/program.h"
+#endif
#if FEATURE_NV_vertex_program || FEATURE_NV_fragment_program
-#include "nvprogram.h"
-#include "program.h"
+#include "shader/nvprogram.h"
+#include "shader/program.h"
#endif
#if FEATURE_ATI_fragment_shader
-#include "atifragshader.h"
+#include "shader/atifragshader.h"
#endif
#include "math/m_matrix.h"
#include "math/m_xform.h"
-#include "dispatch.h"
+#include "glapi/dispatch.h"
/**
@@ -2716,21 +2716,20 @@ save_PolygonMode(GLenum face, GLenum mode)
}
-/*
- * Polygon stipple must have been upacked already!
- */
static void GLAPIENTRY
save_PolygonStipple(const GLubyte * pattern)
{
GET_CURRENT_CONTEXT(ctx);
+ GLvoid *image = unpack_image(2, 32, 32, 1, GL_COLOR_INDEX, GL_BITMAP,
+ pattern, &ctx->Unpack);
Node *n;
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
n = ALLOC_INSTRUCTION(ctx, OPCODE_POLYGON_STIPPLE, 1);
if (n) {
- void *data;
- n[1].data = _mesa_malloc(32 * 4);
- data = n[1].data; /* This needed for Acorn compiler */
- MEMCPY(data, pattern, 32 * 4);
+ n[1].data = image;
+ }
+ else if (image) {
+ _mesa_free(image);
}
if (ctx->ExecuteFlag) {
CALL_PolygonStipple(ctx->Exec, ((GLubyte *) pattern));
@@ -5738,7 +5737,7 @@ execute_list(GLcontext *ctx, GLuint list)
if (!dlist)
return;
- ctx->ListState.CallStack[ctx->ListState.CallDepth++] = dlist;
+ ctx->ListState.CallDepth++;
if (ctx->Driver.BeginCallList)
ctx->Driver.BeginCallList(ctx, dlist);
@@ -6169,7 +6168,12 @@ execute_list(GLcontext *ctx, GLuint list)
CALL_PolygonMode(ctx->Exec, (n[1].e, n[2].e));
break;
case OPCODE_POLYGON_STIPPLE:
- CALL_PolygonStipple(ctx->Exec, ((GLubyte *) n[1].data));
+ {
+ const struct gl_pixelstore_attrib save = ctx->Unpack;
+ ctx->Unpack = ctx->DefaultPacking;
+ CALL_PolygonStipple(ctx->Exec, ((GLubyte *) n[1].data));
+ ctx->Unpack = save; /* restore */
+ }
break;
case OPCODE_POLYGON_OFFSET:
CALL_PolygonOffset(ctx->Exec, (n[1].f, n[2].f));
@@ -6622,7 +6626,7 @@ execute_list(GLcontext *ctx, GLuint list)
if (ctx->Driver.EndCallList)
ctx->Driver.EndCallList(ctx);
- ctx->ListState.CallStack[ctx->ListState.CallDepth--] = NULL;
+ ctx->ListState.CallDepth--;
}