anv: Add pipeline_has_stage guards a few places

All of these worked before because they were depending on prog_data to be
null.  Soon, we won't be able to depend on a nice prog_data pointer and
it's nice to be more explicit anyway.

Signed-off-by: Jason Ekstrand <jason@jlekstrand.net>
Cc: "12.0" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
Jason Ekstrand
2016-08-25 12:22:28 -07:00
parent b259d86ad6
commit 13c09fdd0c
4 changed files with 40 additions and 10 deletions

View File

@@ -1520,6 +1520,13 @@ struct anv_pipeline {
} gen9;
};
static inline bool
anv_pipeline_has_stage(const struct anv_pipeline *pipeline,
gl_shader_stage stage)
{
return (pipeline->active_stages & mesa_to_vk_shader_stage(stage)) != 0;
}
static inline const struct brw_vs_prog_data *
get_vs_prog_data(struct anv_pipeline *pipeline)
{