summaryrefslogtreecommitdiff
path: root/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
diff options
context:
space:
mode:
authorBrian <brian@yutani.localnet.net>2007-02-23 13:40:13 -0700
committerBrian <brian@yutani.localnet.net>2007-02-23 13:40:13 -0700
commit064ae479a770bf434958d673baf6f7530f642697 (patch)
tree9331a6b09260d32604cc2603b9bcf93848aecff0 /src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
parent36a0ee199ddc5f29273f9761eeed8e18ad5c874f (diff)
Update DRI drivers for new glsl compiler.
Mostly: - update #includes - update STATE_* token code
Diffstat (limited to 'src/mesa/drivers/dri/nouveau/nouveau_shader_0.c')
-rw-r--r--src/mesa/drivers/dri/nouveau/nouveau_shader_0.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
index 73c1f7c2a5..abba59dc0c 100644
--- a/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
+++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c
@@ -34,9 +34,10 @@
#include "macros.h"
#include "enums.h"
-#include "program.h"
-#include "programopt.h"
-#include "program_instruction.h"
+#include "shader/prog_instruction.h"
+#include "shader/prog_parameter.h"
+#include "shader/prog_statevars.h"
+#include "shader/programopt.h"
#include "nouveau_context.h"
#include "nouveau_shader.h"
@@ -411,8 +412,10 @@ pass0_fixup_swizzle(nvsPtr nvs, nvsFragmentHeader *parent, int fpos,
if (!rec->swzconst_done) {
struct gl_program *prog = &nvs->mesa.vp.Base;
+ GLuint swizzle;
rec->swzconst_id = _mesa_add_unnamed_constant(prog->Parameters,
- sc, 4);
+ sc, 4, &swizzle);
+ /* XXX what about swizzle? */
rec->swzconst_done = 1;
COPY_4V(nvs->params[rec->swzconst_id].val, sc);
}
@@ -818,7 +821,8 @@ pass0_vp_insert_ff_clip_planes(GLcontext *ctx, nouveauShader *nvs)
nvsInstruction *nvsinst;
GLuint fpos = 0;
nvsRegister opos, epos, eqn, mv[4];
- GLint tokens[6] = { STATE_MATRIX, STATE_MODELVIEW, 0, 0, 0, 0 };
+ gl_state_index tokens[STATE_LENGTH]
+ = { STATE_MODELVIEW_MATRIX, 0, 0, 0, 0 };
GLint id;
int i;
@@ -826,7 +830,7 @@ pass0_vp_insert_ff_clip_planes(GLcontext *ctx, nouveauShader *nvs)
pass0_make_reg(nvs, &opos, NVS_FILE_ATTRIB, NVS_FR_POSITION);
pass0_make_reg(nvs, &epos, NVS_FILE_TEMP , -1);
for (i=0; i<4; i++) {
- tokens[3] = tokens[4] = i;
+ tokens[2] = tokens[3] = i;
id = _mesa_add_state_reference(prog->Parameters, tokens);
pass0_make_reg(nvs, &mv[i], NVS_FILE_CONST, id);
}