<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Jan 8, 2017 at 9:26 PM, Kenneth Graunke <span dir="ltr"><<a href="mailto:kenneth@whitecape.org" target="_blank">kenneth@whitecape.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Kenneth Graunke <<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>><br>
---<br>
 src/intel/vulkan/anv_pipeline.<wbr>c | 9 +++++++--<br>
 1 file changed, 7 insertions(+), 2 deletions(-)<br>
<br>
diff --git a/src/intel/vulkan/anv_<wbr>pipeline.c b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
index 17491e34fc0..b34759a5406 100644<br>
--- a/src/intel/vulkan/anv_<wbr>pipeline.c<br>
+++ b/src/intel/vulkan/anv_<wbr>pipeline.c<br>
@@ -212,7 +212,6 @@ static const uint32_t vk_to_gen_primitive_type[] = {<br>
    [VK_PRIMITIVE_TOPOLOGY_LINE_<wbr>STRIP_WITH_ADJACENCY]     = _3DPRIM_LINESTRIP_ADJ,<br>
    [VK_PRIMITIVE_TOPOLOGY_<wbr>TRIANGLE_LIST_WITH_ADJACENCY]  = _3DPRIM_TRILIST_ADJ,<br>
    [VK_PRIMITIVE_TOPOLOGY_<wbr>TRIANGLE_STRIP_WITH_ADJACENCY] = _3DPRIM_TRISTRIP_ADJ,<br>
-/*   [VK_PRIMITIVE_TOPOLOGY_PATCH_<wbr>LIST]                = _3DPRIM_PATCHLIST_1 */<br>
 };<br>
<br>
 static void<br>
@@ -1086,8 +1085,14 @@ anv_pipeline_init(struct anv_pipeline *pipeline,<br>
<br>
    const VkPipelineInputAssemblyStateCr<wbr>eateInfo *ia_info =<br>
       pCreateInfo-><wbr>pInputAssemblyState;<br>
+   const VkPipelineTessellationStateCre<wbr>ateInfo *tess_info =<br>
+      pCreateInfo-><wbr>pTessellationState;<br>
    pipeline->primitive_restart = ia_info-><wbr>primitiveRestartEnable;<br>
-   pipeline->topology = vk_to_gen_primitive_type[ia_<wbr>info->topology];<br>
+<br>
+   if (tess_info)<br>
+      pipeline->topology = _3DPRIM_PATCHLIST(tess_info-><wbr>patchControlPoints);<br></blockquote><div><br></div><div>I don't think this is what you want.  I think you want to key it off of whether or not you have a tessellation shader (there's a has_stage helper for this).  They can provide a pTessellationState without a tessellation shader.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+   else<br>
+      pipeline->topology = vk_to_gen_primitive_type[ia_<wbr>info->topology];<br>
<br>
    return VK_SUCCESS;<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.11.0<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div>