Mesa (master): anv: remove incorrect polygonMode=point early-out
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Nov 1 07:53:25 UTC 2019
Module: Mesa
Branch: master
Commit: dd77bdb34b6ab13487ce176bd0aa1da4edbb5b0e
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=dd77bdb34b6ab13487ce176bd0aa1da4edbb5b0e
Author: Erik Faye-Lund <erik.faye-lund at collabora.com>
Date: Mon Oct 28 16:25:10 2019 +0100
anv: remove incorrect polygonMode=point early-out
This is incorrect, because polygonMode only applies if the final
primitive type is a polygon; polygonMode doesn't apply to
line-primitives as the comment suggests.
The Vulkan 1.1 spec, section 26.11, "Polygons" defines that polygons are
separate from points and line segments:
" A polygon results from the decomposition of a triangle strip, triangle
fan or a series of independent triangles. Like points and line segments,
polygon rasterization is controlled by several variables in the
VkPipelineRasterizationStateCreateInfo structure. "
Further, section 26.11.2, "Polygon Mode", only define polygonMode to
apply to polygons:
" Possible values of the VkPipelineRasterizationStateCreateInfo::polygonMode
property of the currently active pipeline, specifying the method of
rasterization for polygons, are: "
This seems to clearly define that polygonMode doesn't apply to points
and lines, so let's make sure that we don't early out with the wrong
value.
Signed-off-by: Erik Faye-Lund <erik.faye-lund at collabora.com>
Reviewed-by: Jason Ekstrand <jason at jlekstrand.net>
---
src/intel/vulkan/genX_pipeline.c | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c
index 27fe6d78912..078b3f2b462 100644
--- a/src/intel/vulkan/genX_pipeline.c
+++ b/src/intel/vulkan/genX_pipeline.c
@@ -477,12 +477,6 @@ anv_raster_polygon_mode(struct anv_pipeline *pipeline,
const VkPipelineInputAssemblyStateCreateInfo *ia_info,
const VkPipelineRasterizationStateCreateInfo *rs_info)
{
- /* Points always override everything. This saves us from having to handle
- * rs_info->polygonMode in all of the line cases below.
- */
- if (rs_info->polygonMode == VK_POLYGON_MODE_POINT)
- return VK_POLYGON_MODE_POINT;
-
if (anv_pipeline_has_stage(pipeline, MESA_SHADER_GEOMETRY)) {
switch (get_gs_prog_data(pipeline)->output_topology) {
case _3DPRIM_POINTLIST:
More information about the mesa-commit
mailing list