anv: Don't use uninitialized barycentric_interp_modes
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Mon, 25 Jan 2016 19:34:32 +0000 (11:34 -0800)
committerKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Mon, 25 Jan 2016 19:34:32 +0000 (11:34 -0800)
If we don't have a fragment shader, wm_prog_data in undefined.

src/vulkan/gen8_pipeline.c

index b23bb4b8895895fb6eb626c9b89e3711ccfb2e7c..314a9589e757e9e4970a5957959f227a42450f6a 100644 (file)
@@ -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;