Mesa (main): tu: Fix linemode for tessellation with isolines

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 22 18:30:57 UTC 2022


Module: Mesa
Branch: main
Commit: d45583808104de6b904bbb8f9a53732ea100788a
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=d45583808104de6b904bbb8f9a53732ea100788a

Author: Connor Abbott <cwabbott0 at gmail.com>
Date:   Wed Jun 22 17:42:46 2022 +0200

tu: Fix linemode for tessellation with isolines

Fixes: 542211676c5 ("turnip: enable VK_EXT_line_rasterization")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17190>

---

 src/freedreno/vulkan/tu_pipeline.c                 | 4 +++-
 src/freedreno/vulkan/tu_util.h                     | 6 ++++++
 src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt | 1 -
 3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c
index 1c101891ffd..6e5a797f3c5 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -3355,7 +3355,9 @@ tu_pipeline_builder_parse_rasterization(struct tu_pipeline_builder *builder,
 
    pipeline->line_mode = RECTANGULAR;
 
-   if (tu6_primtype_line(pipeline->ia.primtype)) {
+   if (tu6_primtype_line(pipeline->ia.primtype) ||
+       (tu6_primtype_patches(pipeline->ia.primtype) &&
+        pipeline->tess.patch_type == IR3_TESS_ISOLINES)) {
       const VkPipelineRasterizationLineStateCreateInfoEXT *rast_line_state =
          vk_find_struct_const(rast_info->pNext,
                               PIPELINE_RASTERIZATION_LINE_STATE_CREATE_INFO_EXT);
diff --git a/src/freedreno/vulkan/tu_util.h b/src/freedreno/vulkan/tu_util.h
index 58a35da590f..d52c8aa0409 100644
--- a/src/freedreno/vulkan/tu_util.h
+++ b/src/freedreno/vulkan/tu_util.h
@@ -99,6 +99,12 @@ tu6_primtype_line(enum pc_di_primtype type)
     }
 }
 
+static inline bool
+tu6_primtype_patches(enum pc_di_primtype type)
+{
+   return type >= DI_PT_PATCHES0 && type <= DI_PT_PATCHES31;
+}
+
 static inline enum pc_di_primtype
 tu6_primtype(VkPrimitiveTopology topology)
 {
diff --git a/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt b/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt
index 8a3043cee83..f56d05fc436 100644
--- a/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt
+++ b/src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt
@@ -85,7 +85,6 @@ dEQP-GLES31.functional.blend_equation_advanced.srgb.multiply,Fail
 dEQP-GLES31.functional.blend_equation_advanced.srgb.overlay,Fail
 dEQP-GLES31.functional.blend_equation_advanced.srgb.screen,Fail
 dEQP-GLES31.functional.blend_equation_advanced.srgb.softlight,Fail
-dEQP-GLES31.functional.tessellation_geometry_interaction.render.passthrough.passthrough_tessellation_geometry_shade_lines_no_change,Fail
 dEQP-GLES31.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_npot,Fail
 dEQP-GLES31.functional.texture.border_clamp.formats.depth24_stencil8_sample_stencil.nearest_size_pot,Fail
 dEQP-GLES31.functional.texture.border_clamp.formats.depth32f_stencil8_sample_stencil.nearest_size_npot,Fail



More information about the mesa-commit mailing list