summaryrefslogtreecommitdiffstats
path: root/src/intel/vulkan/gen7_pipeline.c
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2016-08-08 20:30:08 +0100
committerJason Ekstrand <[email protected]>2016-08-08 14:44:25 -0700
commit8cde4ddbce330a45d27a350c7f4f18641d34fdd8 (patch)
tree8d8b172e0c0ee2a14babbedb9983c1906756fc2c /src/intel/vulkan/gen7_pipeline.c
parenta3c472a2ec58038c5cd6b61f0c33260d38cd816e (diff)
anv/pipeline/gen7: Set multisample modes
Fixes the following failures : dEQP-VK.api.copy_and_blit.resolve_image.whole_4_bit dEQP-VK.api.copy_and_blit.resolve_image.whole_8_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_4_bit dEQP-VK.api.copy_and_blit.resolve_image.partial_8_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_4_bit dEQP-VK.api.copy_and_blit.resolve_image.with_regions_8_bit Tested on IVB/HSW Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Anuj Phogat <[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.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/intel/vulkan/gen7_pipeline.c b/src/intel/vulkan/gen7_pipeline.c
index 1da28c03d54..135281d64af 100644
--- a/src/intel/vulkan/gen7_pipeline.c
+++ b/src/intel/vulkan/gen7_pipeline.c
@@ -68,7 +68,7 @@ genX(graphics_pipeline_create)(
assert(pCreateInfo->pRasterizationState);
emit_rs_state(pipeline, pCreateInfo->pRasterizationState,
- pass, subpass, extra);
+ pCreateInfo->pMultisampleState, pass, subpass, extra);
emit_ds_state(pipeline, pCreateInfo->pDepthStencilState, pass, subpass);
@@ -85,7 +85,8 @@ genX(graphics_pipeline_create)(
pCreateInfo->pMultisampleState->rasterizationSamples > 1)
anv_finishme("VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO");
- uint32_t samples = 1;
+ 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) {
@@ -273,6 +274,11 @@ genX(graphics_pipeline_create)(
}
wm.BarycentricInterpolationMode = wm_prog_data->barycentric_interp_modes;
+
+ wm.MultisampleRasterizationMode = samples > 1 ?
+ MSRASTMODE_ON_PATTERN : MSRASTMODE_OFF_PIXEL;
+ wm.MultisampleDispatchMode = wm_prog_data->persample_dispatch ?
+ MSDISPMODE_PERSAMPLE : MSDISPMODE_PERPIXEL;
}
}