diff options
author | Brian <[email protected]> | 2007-03-26 10:13:02 -0600 |
---|---|---|
committer | Brian <[email protected]> | 2007-03-26 10:13:02 -0600 |
commit | d619cceea47dc3070ebb7f7ea4f8b6b31a672d38 (patch) | |
tree | f8b8a9f3fdc3f17a43436af270b22754b1749d31 /src/mesa/drivers/dri/nouveau | |
parent | 76f3b66e0489526694d6a39b4a6ac3b1c2bee100 (diff) | |
parent | e71c34aaa173ca451fa02e526ead77758f7eeb74 (diff) |
merge of glsl-compiler-1 branch
Diffstat (limited to 'src/mesa/drivers/dri/nouveau')
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_context.c | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader.c | 5 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader_0.c | 16 | ||||
-rw-r--r-- | src/mesa/drivers/dri/nouveau/nouveau_shader_2.c | 3 |
4 files changed, 16 insertions, 10 deletions
diff --git a/src/mesa/drivers/dri/nouveau/nouveau_context.c b/src/mesa/drivers/dri/nouveau/nouveau_context.c index f217c4404e9..8e11eb61342 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_context.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_context.c @@ -201,7 +201,7 @@ GLboolean nouveauCreateContext( const __GLcontextModes *glVisual, nouveauShaderInitFuncs(ctx); /* Install Mesa's fixed-function texenv shader support */ if (nmesa->screen->card->type >= NV_40) - ctx->_MaintainTexEnvProgram = GL_TRUE; + ctx->FragmentProgram._MaintainTexEnvProgram = GL_TRUE; /* Initialize the swrast */ _swrast_CreateContext( ctx ); diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader.c b/src/mesa/drivers/dri/nouveau/nouveau_shader.c index 3d5b6843a15..b6837c5de14 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader.c @@ -35,9 +35,10 @@ #include "enums.h" #include "extensions.h" -#include "program.h" +#include "shader/program.h" +#include "shader/prog_instruction.h" +/*#include "shader/arbprogparse.h"*/ #include "tnl/tnl.h" -#include "shader/arbprogparse.h" #include "nouveau_context.h" #include "nouveau_shader.h" diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_0.c index 7c2e2b9443b..8c203cc664b 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" @@ -428,8 +429,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); } @@ -839,7 +842,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; @@ -847,7 +851,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); } diff --git a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c index 130ef35e57b..cd27daca88b 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_shader_2.c @@ -34,7 +34,8 @@ #include "macros.h" #include "enums.h" -#include "program.h" +#include "shader/prog_parameter.h" +#include "shader/prog_print.h" #include "nouveau_context.h" #include "nouveau_shader.h" |