<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Jul 2, 2018 at 3:26 PM, Caio Marcelo de Oliveira Filho <span dir="ltr"><<a href="mailto:caio.oliveira@intel.com" target="_blank">caio.oliveira@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><span class="gmail-">> > @@ -1430,6 +1431,18 @@ anv_pipeline_init(struct anv_pipeline *pipeline,<br>
> > anv_subpass_view_count(<wbr>pipeline->subpass);<br>
> > }<br>
> > <br>
> > + const VkPipelineVertexInputDivisorSt<wbr>ateCreateInfoEXT *vi_div_state =<br>
> > + vk_find_struct_const(<wbr>pCreateInfo->pNext,<br>
> > + PIPELINE_VERTEX_INPUT_DIVISOR_<wbr>STATE_CREATE_INFO_EXT);<br>
> > + if (vi_div_state) {<br>
> > + for (uint32_t i = 0; i < vi_div_state-><wbr>vertexBindingDivisorCount; i++) {<br>
> > + const VkVertexInputBindingDivisorDes<wbr>criptionEXT *desc =<br>
> > + &vi_div_state-><wbr>pVertexBindingDivisors[i];<br>
> > +<br>
> > + pipeline->vb[desc->binding].<wbr>instance_divisor *= desc->divisor;<br>
> > + }<br>
> > + }<br>
> <br>
> I don't think the spec restricts the divisor descriptions to be unique<br>
> (i.e. only one description per binding), so to be slightly more robust<br>
> maybe do<br>
> <br>
> pipeline->vb[desc->binding].<wbr>instance_divisor *= anv_subpass_view_count(<wbr>pipeline->subpass) * desc->divisor;<br>
<br>
</span>I meant:<br>
<br>
pipeline->vb[desc->binding].<wbr>instance_divisor = anv_subpass_view_count(<wbr>pipeline->subpass) * desc->divisor;<br></blockquote><div><br></div><div>Ugh... You may be right. That's a bit insane...</div><div><br></div><div>How about this version? <a href="https://gitlab.freedesktop.org/jekstrand/mesa/commits/wip/VK_EXT_vertex_attribute_divisor">https://gitlab.freedesktop.org/jekstrand/mesa/commits/wip/VK_EXT_vertex_attribute_divisor</a></div><div><br></div><div>I've changed it to first grab the vertex divisors from the struct and then the multiview handling is a *=. This moves it to more of a "set a bunch of stuff then compile" model.</div><div><br></div><div>--Jason<br></div></div></div></div>