Use Vulkan rectangle lines to emulate OpenGL multisampled lines

SwiftShader recently added support for multisampled Bresenham lines to be spec
compliant with Vulkan, so now Angle must explicitly request non-Bresenham lines
when multisampling is enabled.

Bug: angleproject:4087
Change-Id: Ie854746144894e3e0a68622e985cbd4ba7781ac3
Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1944529
Commit-Queue: Antonio Maiorano <amaiorano@google.com>
Commit-Queue: Jamie Madill <jmadill@chromium.org>
Reviewed-by: Jamie Madill <jmadill@chromium.org>
This commit is contained in:
Antonio Maiorano 2019-11-29 15:51:14 -05:00 коммит произвёл Commit Bot
Родитель 6935b02965
Коммит ea0dcd4bda
1 изменённых файлов: 2 добавлений и 1 удалений

Просмотреть файл

@ -795,7 +795,8 @@ angle::Result GraphicsPipelineDesc::initializePipeline(
VkPipelineRasterizationLineStateCreateInfoEXT rasterLineState = {};
rasterLineState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT;
// Always enable Bresenham line rasterization if available.
if (contextVk->getFeatures().bresenhamLineRasterization.enabled)
if (rasterAndMS.bits.rasterizationSamples <= 1 &&
contextVk->getFeatures().bresenhamLineRasterization.enabled)
{
rasterLineState.lineRasterizationMode = VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
*pNextPtr = &rasterLineState;