draw: assert that we have non-null fragment shader
Instead of just segfaulting. Recently ran into this.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user