On Wednesday, December 23, 2015 2:21:49 AM PST eocallag...@alterapraxis.com wrote: > On 2015-12-22 21:20, Kenneth Graunke wrote: [snip] > > diff --git a/src/mesa/drivers/dri/i965/brw_tcs.c > > b/src/mesa/drivers/dri/i965/brw_tcs.c > > index b5eb4cd..037a2da 100644 > > --- a/src/mesa/drivers/dri/i965/brw_tcs.c > > +++ b/src/mesa/drivers/dri/i965/brw_tcs.c > > @@ -187,6 +187,10 @@ brw_upload_tcs_prog(struct brw_context *brw) > > > > /* BRW_NEW_TESS_CTRL_PROGRAM */ > > struct brw_tess_ctrl_program *tcp = > > > > (struct brw_tess_ctrl_program *) brw->tess_ctrl_program; > > > > + /* BRW_NEW_TESS_EVAL_PROGRAM */ > > + struct brw_tess_eval_program *tep = > > + (struct brw_tess_eval_program *) brw->tess_eval_program; > > + assert(tcp && tep); > > > > if (!brw_state_dirty(brw, > > > > _NEW_TEXTURE, > > > > @@ -195,15 +199,6 @@ brw_upload_tcs_prog(struct brw_context *brw) > > > > BRW_NEW_TESS_EVAL_PROGRAM)) > > > > return; > > > > - if (tcp == NULL) { > > - /* Other state atoms had better not try to access prog_data, > > since > > - * there's no HS program. > > - */ > > - brw->tcs.prog_data = NULL; > > - brw->tcs.base.prog_data = NULL; > > - return; > > - } > > - > > > > struct gl_program *prog = &tcp->program.Base; > > > > memset(&key, 0, sizeof(key)); > > > > @@ -216,13 +211,9 @@ brw_upload_tcs_prog(struct brw_context *brw) > > > > brw_populate_sampler_prog_key_data(ctx, prog, > > > > stage_state->sampler_count, > > > > &key.tex); > > > > - /* BRW_NEW_TESS_EVAL_PROGRAM */ > > > > /* We need to specialize our code generation for tessellation > > > > levels > > > > * based on the domain the DS is expecting to tessellate. > > */ > > > > - struct brw_tess_eval_program *tep = > > - (struct brw_tess_eval_program *) brw->tess_eval_program; > > - assert(tep); > > > > key.tes_primitive_mode = tep->program.PrimitiveMode; > > Does this compile? You've killed off *tep yet we still dereference it.
Yep, it does. I actually just moved the declaration to the top of the function with most of the other ones. Check the second hunk. --Ken
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev