{
if (pipeline == BRW_RENDER_PIPELINE) {
brw_upload_vs_prog(brw);
- brw_upload_tcs_prog(brw);
- brw_upload_tes_prog(brw);
+ if (brw->tess_eval_program) {
+ brw_upload_tcs_prog(brw);
+ brw_upload_tes_prog(brw);
+ } else {
+ brw->tcs.prog_data = NULL;
+ brw->tcs.base.prog_data = NULL;
+ brw->tes.prog_data = NULL;
+ brw->tes.base.prog_data = NULL;
+ }
if (brw->gen < 6)
brw_upload_ff_gs_prog(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,
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));
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;
if (!brw_search_cache(&brw->cache, BRW_CACHE_TCS_PROG,
BRW_NEW_TESS_EVAL_PROGRAM))
return;
- if (tep == NULL) {
- /* Other state atoms had better not try to access prog_data, since
- * there's no TES program.
- */
- brw->tes.prog_data = NULL;
- brw->tes.base.prog_data = NULL;
- return;
- }
-
struct gl_program *prog = &tep->program.Base;
memset(&key, 0, sizeof(key));