anv: Don't use uninitialized barycentric_interp_modes

If we don't have a fragment shader, wm_prog_data in undefined.
This commit is contained in:
Kristian Høgsberg Kristensen 2016-01-25 11:34:32 -08:00
parent 292031a1a5
commit c21de2bf04
1 changed files with 2 additions and 1 deletions

View 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;