summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/anv_private.h
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2017-01-10 12:46:25 +0000
committerLionel Landwerlin <[email protected]>2017-01-10 18:14:36 +0000
commit4b44ca72250745228f5eeb0fd3e0fddf51e99963 (patch)
tree9cf0f2e7f98a7d6a81aff5bf1dfe51bffd66b08d /src/intel/vulkan/anv_private.h
parent59fe3796a8f3d89feae5b4ec9439f63cc9bb2662 (diff)
anv: add helper to get vue map for fragment shader
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/anv_private.h')
-rw-r--r--src/intel/vulkan/anv_private.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/intel/vulkan/anv_private.h b/src/intel/vulkan/anv_private.h
index 8a69aa22f64..dbc8c3cf68a 100644
--- a/src/intel/vulkan/anv_private.h
+++ b/src/intel/vulkan/anv_private.h
@@ -1482,6 +1482,17 @@ ANV_DECL_GET_PROG_DATA_FUNC(gs, MESA_SHADER_GEOMETRY)
ANV_DECL_GET_PROG_DATA_FUNC(wm, MESA_SHADER_FRAGMENT)
ANV_DECL_GET_PROG_DATA_FUNC(cs, MESA_SHADER_COMPUTE)
+static inline const struct brw_vue_map *
+anv_pipeline_get_fs_input_map(const struct anv_pipeline *pipeline)
+{
+ if (anv_pipeline_has_stage(pipeline, MESA_SHADER_GEOMETRY))
+ return &get_gs_prog_data(pipeline)->base.vue_map;
+ else if (anv_pipeline_has_stage(pipeline, MESA_SHADER_TESS_EVAL))
+ return &get_tes_prog_data(pipeline)->base.vue_map;
+ else
+ return &get_vs_prog_data(pipeline)->base.vue_map;
+}
+
VkResult
anv_pipeline_init(struct anv_pipeline *pipeline, struct anv_device *device,
struct anv_pipeline_cache *cache,