anv/pipeline: More competent gen8 clipping
authorJason Ekstrand <jason.ekstrand@intel.com>
Tue, 1 Mar 2016 21:39:04 +0000 (13:39 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Fri, 4 Mar 2016 20:03:00 +0000 (12:03 -0800)
src/intel/vulkan/gen8_pipeline.c

index 52629a733420151abcdbedf4eda26cf99eeb2be3..ecb8f6d7b0943b4c2995f6fcd53662097a5ccba3 100644 (file)
@@ -326,7 +326,21 @@ genX(graphics_pipeline_create)(
 
    anv_batch_emit(&pipeline->batch, GENX(3DSTATE_CLIP),
                   .ClipEnable = true,
+                  .EarlyCullEnable = true,
+                  .APIMode = 1, /* D3D */
                   .ViewportXYClipTestEnable = !(extra && extra->disable_viewport),
+
+                  .ClipMode =
+                     pCreateInfo->pRasterizationState->rasterizerDiscardEnable ?
+                     REJECT_ALL : NORMAL,
+
+                  .NonPerspectiveBarycentricEnable =
+                     (pipeline->wm_prog_data.barycentric_interp_modes & 0x38) != 0,
+
+                  .TriangleStripListProvokingVertexSelect = 0,
+                  .LineStripListProvokingVertexSelect = 0,
+                  .TriangleFanProvokingVertexSelect = 1,
+
                   .MinimumPointWidth = 0.125,
                   .MaximumPointWidth = 255.875,
                   .MaximumVPIndex = pCreateInfo->pViewportState->viewportCount - 1);