tu: Fix linemode for tessellation with isolines
authorConnor Abbott <cwabbott0@gmail.com>
Wed, 22 Jun 2022 15:42:46 +0000 (17:42 +0200)
committerMarge Bot <emma+marge@anholt.net>
Wed, 22 Jun 2022 17:57:53 +0000 (17:57 +0000)
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
src/freedreno/vulkan/tu_util.h
src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt

index 1c10189..6e5a797 100644 (file)
@@ -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);
index 58a35da..d52c8aa 100644 (file)
@@ -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)
 {
index 8a3043c..f56d05f 100644 (file)
@@ -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