diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2016-02-14 23:03:13 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2016-02-15 17:32:07 -0800 |
commit | b53edea76c025b1596e057bb3c04c556c0a4536a (patch) | |
tree | 6360a48035ab445698a43e97d9a34cb951a050be | |
parent | 85f67cf16e9823c858215e8a7359d18762c2653c (diff) |
anv/gen7: Make disabling the FS work
We disable the fragment shader for depth/stencil-only pipelines. This
commit makes that work for gen7.
-rw-r--r-- | src/vulkan/gen7_pipeline.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/vulkan/gen7_pipeline.c b/src/vulkan/gen7_pipeline.c index 4ec9cf5f019..e329c8f42ab 100644 --- a/src/vulkan/gen7_pipeline.c +++ b/src/vulkan/gen7_pipeline.c @@ -323,9 +323,23 @@ genX(graphics_pipeline_create)( } if (pipeline->ps_ksp0 == NO_KERNEL) { - anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PS)); - anv_finishme("gen7 alternative to " - "3DSTATE_PS_EXTRA.PixelShaderValid = false"); + anv_finishme("disabling ps"); + + /* FIXME: generated header doesn't emit attr swizzle fields */ + anv_batch_emit(&pipeline->batch, GEN7_3DSTATE_SBE); + + /* FIXME-GEN7: This needs a lot more work, cf gen7 upload_wm_state(). */ + anv_batch_emit(&pipeline->batch, GEN7_3DSTATE_WM, + .StatisticsEnable = true, + .ThreadDispatchEnable = false, + .LineEndCapAntialiasingRegionWidth = 0, /* 0.5 pixels */ + .LineAntialiasingRegionWidth = 1, /* 1.0 pixels */ + .EarlyDepthStencilControl = EDSC_NORMAL, + .PointRasterizationRule = RASTRULE_UPPER_RIGHT); + + + anv_batch_emit(&pipeline->batch, GENX(3DSTATE_PS)); + } else { const struct brw_wm_prog_data *wm_prog_data = &pipeline->wm_prog_data; if (wm_prog_data->urb_setup[VARYING_SLOT_BFC0] != -1 || |