diff options
author | Anuj Phogat <[email protected]> | 2016-08-08 14:36:40 -0700 |
---|---|---|
committer | Anuj Phogat <[email protected]> | 2016-08-09 14:45:25 -0700 |
commit | f16295a198b02c993d834ebcfebf25bcf6885572 (patch) | |
tree | 42a2498201066c4779f934d82893f031bfd1135c | |
parent | 2ef5063ad79313d4f81c559e1493cd7e3daf3b6d (diff) |
anv/gen7_pipeline: Set multisample state using shared function
Signed-off-by: Anuj Phogat <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
-rw-r--r-- | src/intel/vulkan/gen7_pipeline.c | 20 |
1 files changed, 4 insertions, 16 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c index 135281d64af..48457aa9a33 100644 --- a/src/intel/vulkan/gen7_pipeline.c +++ b/src/intel/vulkan/gen7_pipeline.c @@ -81,22 +81,7 @@ genX(graphics_pipeline_create)( pCreateInfo->pRasterizationState, extra); emit_3dstate_streamout(pipeline, pCreateInfo->pRasterizationState); - if (pCreateInfo->pMultisampleState && - pCreateInfo->pMultisampleState->rasterizationSamples > 1) - anv_finishme("VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO"); - - uint32_t samples = pCreateInfo->pMultisampleState ? - pCreateInfo->pMultisampleState->rasterizationSamples : 1; - uint32_t log2_samples = __builtin_ffs(samples) - 1; - - anv_batch_emit(&pipeline->batch, GENX(3DSTATE_MULTISAMPLE), ms) { - ms.PixelLocation = PIXLOC_CENTER; - ms.NumberofMultisamples = log2_samples; - } - - anv_batch_emit(&pipeline->batch, GENX(3DSTATE_SAMPLE_MASK), sm) { - sm.SampleMask = 0xff; - } + emit_ms_state(pipeline, pCreateInfo->pMultisampleState); const struct brw_vs_prog_data *vs_prog_data = get_vs_prog_data(pipeline); @@ -252,6 +237,9 @@ genX(graphics_pipeline_create)( ps.KernelStartPointer2 = pipeline->ps_ksp0 + wm_prog_data->prog_offset_2; } + uint32_t samples = pCreateInfo->pMultisampleState ? + pCreateInfo->pMultisampleState->rasterizationSamples : 1; + /* FIXME-GEN7: This needs a lot more work, cf gen7 upload_wm_state(). */ anv_batch_emit(&pipeline->batch, GENX(3DSTATE_WM), wm) { wm.StatisticsEnable = true; |