summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAapo Tahkola <[email protected]>2006-02-16 19:50:40 +0000
committerAapo Tahkola <[email protected]>2006-02-16 19:50:40 +0000
commit8da9f448f4b90a05e01d82784de299e04bbd288c (patch)
tree41d5786c724cf0326d00ab797d2536a4b2b5848d /src
parent555b5fac4f47576f04d8e4159dc22f72a2b0a397 (diff)
Skip ARL while we dont implement it. Fix broken nv vps but do it with software for now.
Diffstat (limited to 'src')
-rw-r--r--src/mesa/drivers/dri/r300/r300_vertexprog.c26
1 files changed, 17 insertions, 9 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c
index aff5d793d2b..60d580a5f2a 100644
--- a/src/mesa/drivers/dri/r300/r300_vertexprog.c
+++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c
@@ -107,19 +107,21 @@ int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, f
float *dst_o=dst;
struct program_parameter_list *paramList;
- _mesa_load_state_parameters(ctx, mesa_vp->Base.Parameters);
- if (mesa_vp->Base.Parameters == NULL) {
- static int once=0;
-
- WARN_ONCE("mesa_vp->Base.Parameters NULL\n");
+ if (mesa_vp->IsNVProgram) {
+ _mesa_init_vp_per_primitive_registers(ctx);
- if (once == 0) {
- _mesa_print_program(&vp->mesa_program.Base);
- once++;
+ for (pi=0; pi < MAX_NV_VERTEX_PROGRAM_PARAMS; pi++) {
+ *dst++=ctx->VertexProgram.Parameters[pi][0];
+ *dst++=ctx->VertexProgram.Parameters[pi][1];
+ *dst++=ctx->VertexProgram.Parameters[pi][2];
+ *dst++=ctx->VertexProgram.Parameters[pi][3];
}
- return 0;
+ return dst - dst_o;
}
+ assert(mesa_vp->Base.Parameters);
+ _mesa_load_state_parameters(ctx, mesa_vp->Base.Parameters);
+
if(mesa_vp->Base.Parameters->NumParameters * 4 > VSF_MAX_FRAGMENT_LENGTH){
fprintf(stderr, "%s:Params exhausted\n", __FUNCTION__);
exit(-1);
@@ -867,6 +869,9 @@ void translate_vertex_shader(struct r300_vertex_program *vp)
goto next;
case OPCODE_ARL:
+ WARN_ONCE("ARL not implemented yet!\n");
+ goto next;
+
case OPCODE_RCC:
fprintf(stderr, "Dont know how to handle op %d yet\n", vpi->Opcode);
exit(-1);
@@ -949,5 +954,8 @@ void translate_vertex_shader(struct r300_vertex_program *vp)
vp->translated=GL_TRUE;
vp->native = GL_TRUE;
}
+
+ if (mesa_vp->IsNVProgram)
+ vp->native = GL_FALSE;
}