From: Kristian Høgsberg Kristensen Date: Mon, 25 Jan 2016 19:34:32 +0000 (-0800) Subject: anv: Don't use uninitialized barycentric_interp_modes X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c21de2bf04c774870f5e58eb160794ca83d96346;p=mesa.git anv: Don't use uninitialized barycentric_interp_modes If we don't have a fragment shader, wm_prog_data in undefined. --- 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;