draw: assert that we have non-null fragment shader

Instead of just segfaulting.  Recently ran into this.
This commit is contained in:
Brian Paul
2011-11-03 16:55:18 -06:00
parent ac0ec07e6c
commit e814d57725
2 changed files with 4 additions and 0 deletions
@@ -361,6 +361,8 @@ generate_pstip_fs(struct pstip_stage *pstip)
tgsi_dump(pstip_fs.tokens, 0);
#endif
assert(pstip->fs);
pstip->fs->sampler_unit = transform.freeSampler;
assert(pstip->fs->sampler_unit < PIPE_MAX_SAMPLERS);
@@ -229,6 +229,8 @@ widepoint_first_point(struct draw_stage *stage,
const struct draw_fragment_shader *fs = draw->fs.fragment_shader;
uint i;
assert(fs);
wide->num_texcoord_gen = 0;
/* Loop over fragment shader inputs looking for generic inputs