anv/pipeline: Handle null wm_prog_data in 3DSTATE_CLIP
authorJason Ekstrand <jason.ekstrand@intel.com>
Sat, 5 Mar 2016 22:42:16 +0000 (14:42 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Sat, 5 Mar 2016 22:42:16 +0000 (14:42 -0800)
src/intel/vulkan/gen8_pipeline.c

index 8471fc733ba69bb3684fb8d47961cd4cf72b7db0..10dd6457fbc99dc9079c8d2e83f24bc38cda2116 100644 (file)
@@ -344,8 +344,8 @@ genX(graphics_pipeline_create)(
                      pCreateInfo->pRasterizationState->rasterizerDiscardEnable ?
                      REJECT_ALL : NORMAL,
 
-                  .NonPerspectiveBarycentricEnable =
-                     (wm_prog_data->barycentric_interp_modes & 0x38) != 0,
+                  .NonPerspectiveBarycentricEnable = wm_prog_data ?
+                     (wm_prog_data->barycentric_interp_modes & 0x38) != 0 : 0,
 
                   .TriangleStripListProvokingVertexSelect = 0,
                   .LineStripListProvokingVertexSelect = 0,