diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/drivers/dri/r300/r300_vertexprog.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mesa/drivers/dri/r300/r300_vertexprog.c b/src/mesa/drivers/dri/r300/r300_vertexprog.c index 45b419d04ec..e45300b106b 100644 --- a/src/mesa/drivers/dri/r300/r300_vertexprog.c +++ b/src/mesa/drivers/dri/r300/r300_vertexprog.c @@ -98,7 +98,7 @@ static struct{ int r300VertexProgUpdateParams(GLcontext *ctx, struct r300_vertex_program *vp, float *dst) { int pi; - struct gl_vertex_program *mesa_vp=(void *)vp; + struct gl_vertex_program *mesa_vp = &vp->mesa_program; float *dst_o=dst; struct gl_program_parameter_list *paramList; @@ -386,7 +386,7 @@ static unsigned long op_operands(enum prog_opcode opcode) void r300_translate_vertex_shader(struct r300_vertex_program *vp) { - struct gl_vertex_program *mesa_vp=(void *)vp; + struct gl_vertex_program *mesa_vp= &vp->mesa_program; struct prog_instruction *vpi; int i, cur_reg=0; VERTEX_SHADER_INSTRUCTION *o_inst; @@ -399,6 +399,9 @@ void r300_translate_vertex_shader(struct r300_vertex_program *vp) int u_temp_i=VSF_MAX_FRAGMENT_TEMPS-1; struct prog_src_register src[3]; + if (!mesa_vp->Base.String) + return; + if (getenv("R300_VP_SAFETY")) { WARN_ONCE("R300_VP_SAFETY enabled.\n"); |