summaryrefslogtreecommitdiff
path: root/src/mesa/main/dlist.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-22 08:53:33 -0700
committerBrian <brian@yutani.localnet.net>2007-02-22 08:53:33 -0700
commit29c471aafc6a3fef23d553e31a555d1782854a77 (patch)
tree335385fd55d510118346136c6feb4daa707988b6 /src/mesa/main/dlist.c
parent6d4cf6be4e79c3a6ab18272577df17389e3834a6 (diff)
parenta4b344baa2484c65a1618f3cce3a94c91dea8ef7 (diff)
Merge branch 'origin' into glsl-compiler-1
Conflicts: src/mesa/main/state.c src/mesa/shader/program.c src/mesa/shader/program.h src/mesa/shader/programopt.c src/mesa/shader/slang/slang_execute.c src/mesa/sources src/mesa/swrast/s_arbshader.c src/mesa/swrast/s_context.c src/mesa/swrast/s_span.c src/mesa/swrast/s_zoom.c src/mesa/tnl/t_context.c src/mesa/tnl/t_save_api.c src/mesa/tnl/t_vb_arbprogram.c src/mesa/tnl/t_vp_build.c src/mesa/tnl/t_vtx_eval.c
Diffstat (limited to 'src/mesa/main/dlist.c')
-rw-r--r--src/mesa/main/dlist.c53
1 files changed, 5 insertions, 48 deletions
diff --git a/src/mesa/main/dlist.c b/src/mesa/main/dlist.c
index dca6ede6cb..49bc2933bf 100644
--- a/src/mesa/main/dlist.c
+++ b/src/mesa/main/dlist.c
@@ -343,8 +343,6 @@ typedef enum
OPCODE_ATTR_3F_ARB,
OPCODE_ATTR_4F_ARB,
OPCODE_MATERIAL,
- OPCODE_INDEX,
- OPCODE_EDGEFLAG,
OPCODE_BEGIN,
OPCODE_END,
OPCODE_RECTF,
@@ -4476,7 +4474,7 @@ save_ProgramLocalParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
if (count > 0) {
- unsigned i;
+ GLint i;
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
@@ -4710,7 +4708,7 @@ save_ProgramEnvParameters4fvEXT(GLenum target, GLuint index, GLsizei count,
ASSERT_OUTSIDE_SAVE_BEGIN_END_AND_FLUSH(ctx);
if (count > 0) {
- unsigned i;
+ GLint i;
const GLfloat * p = params;
for (i = 0 ; i < count ; i++) {
@@ -5110,45 +5108,19 @@ save_EvalPoint2(GLint x, GLint y)
static void GLAPIENTRY
save_Indexf(GLfloat x)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_INDEX, 1);
- if (n) {
- n[1].f = x;
- }
-
- ctx->ListState.ActiveIndex = 1;
- ctx->ListState.CurrentIndex = x;
-
- if (ctx->ExecuteFlag) {
- CALL_Indexf(ctx->Exec, (x));
- }
+ save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, x);
}
static void GLAPIENTRY
save_Indexfv(const GLfloat * v)
{
- save_Indexf(v[0]);
+ save_Attr1fNV(VERT_ATTRIB_COLOR_INDEX, v[0]);
}
static void GLAPIENTRY
save_EdgeFlag(GLboolean x)
{
- GET_CURRENT_CONTEXT(ctx);
- Node *n;
- SAVE_FLUSH_VERTICES(ctx);
- n = ALLOC_INSTRUCTION(ctx, OPCODE_EDGEFLAG, 1);
- if (n) {
- n[1].b = x;
- }
-
- ctx->ListState.ActiveEdgeFlag = 1;
- ctx->ListState.CurrentEdgeFlag = x;
-
- if (ctx->ExecuteFlag) {
- CALL_EdgeFlag(ctx->Exec, (x));
- }
+ save_Attr1fNV(VERT_ATTRIB_EDGEFLAG, x ? 1.0 : 0.0);
}
static void GLAPIENTRY
@@ -6602,12 +6574,6 @@ execute_list(GLcontext *ctx, GLuint list)
CALL_Materialfv(ctx->Exec, (n[1].e, n[2].e, f));
}
break;
- case OPCODE_INDEX:
- CALL_Indexf(ctx->Exec, (n[1].f));
- break;
- case OPCODE_EDGEFLAG:
- CALL_EdgeFlag(ctx->Exec, (n[1].b));
- break;
case OPCODE_BEGIN:
CALL_Begin(ctx->Exec, (n[1].e));
break;
@@ -6793,9 +6759,6 @@ _mesa_NewList(GLuint list, GLenum mode)
for (i = 0; i < MAT_ATTRIB_MAX; i++)
ctx->ListState.ActiveMaterialSize[i] = 0;
- ctx->ListState.ActiveIndex = 0;
- ctx->ListState.ActiveEdgeFlag = 0;
-
ctx->Driver.CurrentSavePrimitive = PRIM_UNKNOWN;
ctx->Driver.NewList(ctx, list, mode);
@@ -8421,12 +8384,6 @@ print_list(GLcontext *ctx, GLuint list)
_mesa_printf("MATERIAL %x %x: %f %f %f %f\n",
n[1].i, n[2].i, n[3].f, n[4].f, n[5].f, n[6].f);
break;
- case OPCODE_INDEX:
- _mesa_printf("INDEX: %f\n", n[1].f);
- break;
- case OPCODE_EDGEFLAG:
- _mesa_printf("EDGEFLAG: %d\n", n[1].i);
- break;
case OPCODE_BEGIN:
_mesa_printf("BEGIN %x\n", n[1].i);
break;