Commit ea0dcd4b by Antonio Maiorano Committed by Commit Bot

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: 's avatarJamie Madill <jmadill@chromium.org>
parent 6935b029
...@@ -795,7 +795,8 @@ angle::Result GraphicsPipelineDesc::initializePipeline( ...@@ -795,7 +795,8 @@ angle::Result GraphicsPipelineDesc::initializePipeline(
VkPipelineRasterizationLineStateCreateInfoEXT rasterLineState = {}; VkPipelineRasterizationLineStateCreateInfoEXT rasterLineState = {};
rasterLineState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT; rasterLineState.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT;
// Always enable Bresenham line rasterization if available. // 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; rasterLineState.lineRasterizationMode = VK_LINE_RASTERIZATION_MODE_BRESENHAM_EXT;
*pNextPtr = &rasterLineState; *pNextPtr = &rasterLineState;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment