summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen8_pipeline.c
diff options
context:
space:
mode:
authorKenneth Graunke <kenneth@whitecape.org>2016-07-18 14:27:35 -0700
committerKenneth Graunke <kenneth@whitecape.org>2016-07-20 10:59:44 -0700
commitbfd9942cdc0db19838a4516f4a67e1bcf25a9d30 (patch)
treebc56c877722af4dc93a45e4388d9cc553cb614a2 /src/intel/vulkan/gen8_pipeline.c
parent44502afd8219c298fafa39625a178713c912d975 (diff)
downloadexternal_mesa3d-bfd9942cdc0db19838a4516f4a67e1bcf25a9d30.zip
external_mesa3d-bfd9942cdc0db19838a4516f4a67e1bcf25a9d30.tar.gz
external_mesa3d-bfd9942cdc0db19838a4516f4a67e1bcf25a9d30.tar.bz2
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" <mesa-stable@lists.freedesktop.org> Signed-off-by: Kenneth Graunke <kenneth@whitecape.org> Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Diffstat (limited to 'src/intel/vulkan/gen8_pipeline.c')
-rw-r--r--src/intel/vulkan/gen8_pipeline.c25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/intel/vulkan/gen8_pipeline.c b/src/intel/vulkan/gen8_pipeline.c
index 52792a9..cc10d3a 100644
--- a/src/intel/vulkan/gen8_pipeline.c
+++ b/src/intel/vulkan/gen8_pipeline.c
@@ -186,29 +186,10 @@ genX(graphics_pipeline_create)(
emit_urb_setup(pipeline);
- const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
- anv_batch_emit(&pipeline->batch, GENX(3DSTATE_CLIP), clip) {
- clip.ClipEnable = !(extra && extra->use_rectlist);
- clip.EarlyCullEnable = true;
- clip.APIMode = APIMODE_D3D;
- clip.ViewportXYClipTestEnable = true;
-
- clip.ClipMode =
- pCreateInfo->pRasterizationState->rasterizerDiscardEnable ?
- CLIPMODE_REJECT_ALL : CLIPMODE_NORMAL;
-
- clip.NonPerspectiveBarycentricEnable = wm_prog_data ?
- (wm_prog_data->barycentric_interp_modes & 0x38) != 0 : 0;
-
- 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);
+ const struct brw_wm_prog_data *wm_prog_data = get_wm_prog_data(pipeline);
anv_batch_emit(&pipeline->batch, GENX(3DSTATE_WM), wm) {
wm.StatisticsEnable = true;
wm.LineEndCapAntialiasingRegionWidth = _05pixels;