summaryrefslogtreecommitdiff
path: root/src/mesa/drivers
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers')
-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 aff5d793d2..60d580a5f2 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;
}