summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-08-25 12:22:28 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-08-30 15:08:23 -0700
commit13c09fdd0cfb62f3f45c39ad01a1c8f4b37c9c19 (patch)
tree8ce5831819f8a7127beb5173c2d0d16b0e6debe4 /src/intel/vulkan/anv_private.h
parentb259d86ad62503dfb3a18e501fb5ddff2c5c099a (diff)
downloadexternal_mesa3d-13c09fdd0cfb62f3f45c39ad01a1c8f4b37c9c19.zip
external_mesa3d-13c09fdd0cfb62f3f45c39ad01a1c8f4b37c9c19.tar.gz
external_mesa3d-13c09fdd0cfb62f3f45c39ad01a1c8f4b37c9c19.tar.bz2
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>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 5fcbb92..6a8c6fc 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -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)
{