diff options
author | Brian Paul <brian.paul@tungstengraphics.com> | 2006-08-24 22:05:35 +0000 |
---|---|---|
committer | Brian Paul <brian.paul@tungstengraphics.com> | 2006-08-24 22:05:35 +0000 |
commit | beb32c4a5905d2a5347f49d2941e8340d6959206 (patch) | |
tree | f990fcb61f1edc6377de26c58a61e97501a69e15 | |
parent | 94ff996cae9951129fee1010b201b72e8453f406 (diff) |
fix bad casts, carry over r200 fix to check for null program string in r300_translate_vertex_shader()
-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 45b419d04e..e45300b106 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"); |