Mesa (staging/22.1): tu: Fix linemode for tessellation with isolines
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Jun 23 16:19:37 UTC 2022
Module: Mesa
Branch: staging/22.1
Commit: 4fbc8fb28e55d2a168e7e2a8f590a792c509eeb2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=4fbc8fb28e55d2a168e7e2a8f590a792c509eeb2
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>
(cherry picked from commit d45583808104de6b904bbb8f9a53732ea100788a)
Conflicts:
src/gallium/drivers/zink/ci/zink-tu-a630-fails.txt
CI file doesn't exist in 22.1, and has been deleted
---
.pick_status.json | 2 +-
src/freedreno/vulkan/tu_pipeline.c | 4 +++-
src/freedreno/vulkan/tu_util.h | 6 ++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/.pick_status.json b/.pick_status.json
index 944f3a9bc6b..c63b84d0eda 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -337,7 +337,7 @@
"description": "tu: Fix linemode for tessellation with isolines",
"nominated": true,
"nomination_type": 1,
- "resolution": 0,
+ "resolution": 1,
"main_sha": null,
"because_sha": "542211676c58b0410662e1a959e259487c103e71"
},
diff --git a/src/freedreno/vulkan/tu_pipeline.c b/src/freedreno/vulkan/tu_pipeline.c
index 441ed0285fb..828f0f2c96d 100644
--- a/src/freedreno/vulkan/tu_pipeline.c
+++ b/src/freedreno/vulkan/tu_pipeline.c
@@ -2910,7 +2910,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 2ad7f86e36e..771a67a3416 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)
{
More information about the mesa-commit
mailing list