aboutsummaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen7_pipeline.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2016-07-18 14:27:35 -0700
committerKenneth Graunke <[email protected]>2016-07-20 10:59:44 -0700
commitbfd9942cdc0db19838a4516f4a67e1bcf25a9d30 (patch)
treebc56c877722af4dc93a45e4388d9cc553cb614a2 /src/intel/vulkan/gen7_pipeline.c
parent44502afd8219c298fafa39625a178713c912d975 (diff)
anv: Unify 3DSTATE_CLIP code across generations.
The bulk of this is the same. There are just a couple fields that only exist on one generation or another, and we can easily handle those with an #ifdef. Cc: "12.0" <[email protected]> Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/intel/vulkan/gen7_pipeline.c')
-rw-r--r--src/intel/vulkan/gen7_pipeline.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c
index a9f5e0b51e5..8ce50be7717 100644
--- a/src/intel/vulkan/gen7_pipeline.c
+++ b/src/intel/vulkan/gen7_pipeline.c
@@ -117,27 +117,8 @@ genX(graphics_pipeline_create)(
emit_urb_setup(pipeline);
- const VkPipelineRasterizationStateCreateInfo *rs_info =
- pCreateInfo->pRasterizationState;
-
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_CLIP), clip) {
- clip.FrontWinding = vk_to_gen_front_face[rs_info->frontFace],
- clip.EarlyCullEnable = true,
- clip.CullMode = vk_to_gen_cullmode[rs_info->cullMode],
- clip.ClipEnable = !(extra && extra->use_rectlist),
- clip.APIMode = APIMODE_D3D,
- clip.ViewportXYClipTestEnable = true,
- clip.ViewportZClipTestEnable = !pipeline->depth_clamp_enable,
- clip.ClipMode = CLIPMODE_NORMAL,
-
- clip.TriangleStripListProvokingVertexSelect = 0,
- clip.LineStripListProvokingVertexSelect = 0,
- clip.TriangleFanProvokingVertexSelect = 1,
-
- clip.MinimumPointWidth = 0.125,
- clip.MaximumPointWidth = 255.875,
- clip.MaximumVPIndex = pCreateInfo->pViewportState->viewportCount - 1;
- }
+ emit_3dstate_clip(pipeline, pCreateInfo->pViewportState,
+ pCreateInfo->pRasterizationState, extra);
if (pCreateInfo->pMultisampleState &&
pCreateInfo->pMultisampleState->rasterizationSamples > 1)