<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Sat, Aug 25, 2018 at 5:56 PM Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I don't know how you find this stuff...<br></blockquote><div><br></div><div>Hours and hours of painfully reading through aub dumps looking for stuff that's out of place and many experiments. This hang has probably taken me near enough to a week of debugging time all told.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Reviewed-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>><br></blockquote><div><br></div><div>Thanks!</div><div><br></div><div>--Jason<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On 25/08/2018 23:17, Jason Ekstrand wrote:<br>
> Cc: <a href="mailto:mesa-stable@lists.freedesktop.org" target="_blank">mesa-stable@lists.freedesktop.org</a><br>
> Bugzilla: <a href="https://bugs.freedesktop.org/show_bug.cgi?id=104809" rel="noreferrer" target="_blank">https://bugs.freedesktop.org/show_bug.cgi?id=104809</a><br>
> ---<br>
> src/intel/vulkan/genX_pipeline.c | 29 ++++++++++++++++++++++++++++-<br>
> 1 file changed, 28 insertions(+), 1 deletion(-)<br>
><br>
> diff --git a/src/intel/vulkan/genX_pipeline.c b/src/intel/vulkan/genX_pipeline.c<br>
> index 022f324606e..b531205508c 100644<br>
> --- a/src/intel/vulkan/genX_pipeline.c<br>
> +++ b/src/intel/vulkan/genX_pipeline.c<br>
> @@ -115,7 +115,34 @@ emit_vertex_input(struct anv_pipeline *pipeline,<br>
> GENX(3DSTATE_VERTEX_ELEMENTS));<br>
> if (!p)<br>
> return;<br>
> - memset(p + 1, 0, (num_dwords - 1) * 4);<br>
> +<br>
> + for (uint32_t i = 0; i < total_elems; i++) {<br>
> + /* The SKL docs for VERTEX_ELEMENT_STATE say:<br>
> + *<br>
> + * "All elements must be valid from Element[0] to the last valid<br>
> + * element. (I.e. if Element[2] is valid then Element[1] and<br>
> + * Element[0] must also be valid)."<br>
> + *<br>
> + * The SKL docs for 3D_Vertex_Component_Control say:<br>
> + *<br>
> + * "Don't store this component. (Not valid for Component 0, but can<br>
> + * be used for Component 1-3)."<br>
> + *<br>
> + * So we can't just leave a vertex element blank and hope for the best.<br>
> + * We have to tell the VF hardware to put something in it; so we just<br>
> + * store a bunch of zero.<br>
> + *<br>
> + * TODO: Compact vertex elements so we never end up with holes.<br>
> + */<br>
> + struct GENX(VERTEX_ELEMENT_STATE) element = {<br>
> + .Valid = true,<br>
> + .Component0Control = VFCOMP_STORE_0,<br>
> + .Component1Control = VFCOMP_STORE_0,<br>
> + .Component2Control = VFCOMP_STORE_0,<br>
> + .Component3Control = VFCOMP_STORE_0,<br>
> + };<br>
> + GENX(VERTEX_ELEMENT_STATE_pack)(NULL, &p[1 + i * 2], &element);<br>
> + }<br>
> <br>
> for (uint32_t i = 0; i < info->vertexAttributeDescriptionCount; i++) {<br>
> const VkVertexInputAttributeDescription *desc =<br>
<br>
<br>
</blockquote></div></div>