diff options
author | Jason Ekstrand <[email protected]> | 2017-01-12 17:07:08 -0800 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-01-13 16:31:17 -0800 |
commit | 99d497c5b6912c5a8b2fec48084e3e00c7c80395 (patch) | |
tree | 43d893b1f5904348a60166561ba57c389777b9ab /src/intel/vulkan/genX_pipeline.c | |
parent | 56ee2df4bf9b1e8c26cf8689f5ef20237c95466b (diff) |
anv/pipeline: Replace get_fs_input_map with get_last_vue_prog_data
This lets us delete a helper from genX_pipeline.c
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/vulkan/genX_pipeline.c')
-rw-r--r-- | src/intel/vulkan/genX_pipeline.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index b58aac4da7a..7fa68c004eb 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -286,7 +286,6 @@ static void emit_3dstate_sbe(struct anv_pipeline *pipeline) { const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline); - const struct brw_vue_map *fs_input_map; if (!anv_pipeline_has_stage(pipeline, MESA_SHADER_FRAGMENT)) { anv_batch_emit(&pipeline->batch, GENX(3DSTATE_SBE), sbe); @@ -296,7 +295,8 @@ emit_3dstate_sbe(struct anv_pipeline *pipeline) return; } - fs_input_map = anv_pipeline_get_fs_input_map(pipeline); + const struct brw_vue_map *fs_input_map = + &anv_pipeline_get_last_vue_prog_data(pipeline)->vue_map; struct GENX(3DSTATE_SBE) sbe = { GENX(3DSTATE_SBE_header), @@ -846,19 +846,6 @@ emit_cb_state(struct anv_pipeline *pipeline, } } -/** - * Get the brw_vue_prog_data for the last stage which outputs VUEs. - */ -static inline struct brw_vue_prog_data * -get_last_vue_prog_data(struct anv_pipeline *pipeline) -{ - for (int s = MESA_SHADER_GEOMETRY; s >= 0; s--) { - if (pipeline->shaders[s]) - return (struct brw_vue_prog_data *) pipeline->shaders[s]->prog_data; - } - return NULL; -} - static void emit_3dstate_clip(struct anv_pipeline *pipeline, const VkPipelineViewportStateCreateInfo *vp_info, @@ -886,7 +873,8 @@ emit_3dstate_clip(struct anv_pipeline *pipeline, clip.FrontWinding = vk_to_gen_front_face[rs_info->frontFace]; clip.CullMode = vk_to_gen_cullmode[rs_info->cullMode]; clip.ViewportZClipTestEnable = !pipeline->depth_clamp_enable; - const struct brw_vue_prog_data *last = get_last_vue_prog_data(pipeline); + const struct brw_vue_prog_data *last = + anv_pipeline_get_last_vue_prog_data(pipeline); if (last) { clip.UserClipDistanceClipTestEnableBitmask = last->clip_distance_mask; clip.UserClipDistanceCullTestEnableBitmask = last->cull_distance_mask; |