From c21de2bf04c774870f5e58eb160794ca83d96346 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Kristian=20H=C3=B8gsberg=20Kristensen?= Date: Mon, 25 Jan 2016 11:34:32 -0800 Subject: [PATCH] anv: Don't use uninitialized barycentric_interp_modes If we don't have a fragment shader, wm_prog_data in undefined. --- src/vulkan/gen8_pipeline.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/vulkan/gen8_pipeline.c b/src/vulkan/gen8_pipeline.c index b23bb4b8895..314a9589e75 100644 --- a/src/vulkan/gen8_pipeline.c +++ b/src/vulkan/gen8_pipeline.c @@ -343,7 +343,8 @@ genX(graphics_pipeline_create)( .ForceThreadDispatchEnable = NORMAL, .PointRasterizationRule = RASTRULE_UPPER_RIGHT, .BarycentricInterpolationMode = - pipeline->wm_prog_data.barycentric_interp_modes); + pipeline->ps_ksp0 == NO_KERNEL ? + 0 : pipeline->wm_prog_data.barycentric_interp_modes); uint32_t samples = 1; uint32_t log2_samples = __builtin_ffs(samples) - 1; -- 2.30.2