From 0206ffc28db1c12a62c96384760c38f21ec1b420 Mon Sep 17 00:00:00 2001 From: Andrii Simiklit Date: Wed, 9 Jan 2019 15:39:45 +0200 Subject: [PATCH] anv/pipeline: remove unnecessary null-pointer check Looks like it is impossible that 'last' variable is a null because at least the get_vs_prog_data shouldn't return a null pointer. So this check is unnecessary starts from commit: 99d497c5b691 "anv/pipeline: Replace get_fs_input_map with ..." This small issue is found by cppcheck. Signed-off-by: Andrii Simiklit Reviewed-by: Jason Ekstrand --- src/intel/vulkan/genX_pipeline.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c index d39a0da12da..e52e5d8304a 100644 --- a/src/intel/vulkan/genX_pipeline.c +++ b/src/intel/vulkan/genX_pipeline.c @@ -1116,10 +1116,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; - if (last) { - clip.UserClipDistanceClipTestEnableBitmask = last->clip_distance_mask; - clip.UserClipDistanceCullTestEnableBitmask = last->cull_distance_mask; - } + clip.UserClipDistanceClipTestEnableBitmask = last->clip_distance_mask; + clip.UserClipDistanceCullTestEnableBitmask = last->cull_distance_mask; #else clip.NonPerspectiveBarycentricEnable = wm_prog_data ? (wm_prog_data->barycentric_interp_modes & -- 2.30.2