mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 00:00:11 +01:00
dzn: Set MultisampleEnable to enable MSAA lines
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20614>
This commit is contained in:
parent
ca20577622
commit
9f928adf81
1 changed files with 11 additions and 0 deletions
|
|
@ -1171,6 +1171,8 @@ dzn_graphics_pipeline_translate_rast(struct dzn_graphics_pipeline *pipeline,
|
|||
in->pRasterizationState;
|
||||
const VkPipelineViewportStateCreateInfo *in_vp =
|
||||
in_rast->rasterizerDiscardEnable ? NULL : in->pViewportState;
|
||||
const VkPipelineMultisampleStateCreateInfo *in_ms =
|
||||
in_rast->rasterizerDiscardEnable ? NULL : in->pMultisampleState;
|
||||
|
||||
if (in_vp) {
|
||||
pipeline->vp.count = in_vp->viewportCount;
|
||||
|
|
@ -1200,6 +1202,15 @@ dzn_graphics_pipeline_translate_rast(struct dzn_graphics_pipeline *pipeline,
|
|||
desc->DepthBiasClamp = in_rast->depthBiasClamp;
|
||||
}
|
||||
|
||||
/* The Vulkan conformance tests use different reference rasterizers for single-sampled
|
||||
* and multi-sampled lines. The single-sampled lines can be bresenham lines, but multi-
|
||||
* sampled need to be quadrilateral lines. This still isn't *quite* sufficient, because
|
||||
* D3D only supports a line width of 1.4 (per spec), but Vulkan requires us to support
|
||||
* 1.0 (and without claiming wide lines, that's all we can support).
|
||||
*/
|
||||
if (in_ms && in_ms->rasterizationSamples > 1)
|
||||
desc->MultisampleEnable = true;
|
||||
|
||||
assert(in_rast->lineWidth == 1.0f);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue