On 5 December 2011 14:57, Eric Anholt <span dir="ltr">&lt;<a href="mailto:eric@anholt.net">eric@anholt.net</a>&gt;</span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon,  5 Dec 2011 09:40:50 -0800, Paul Berry &lt;<a href="mailto:stereotype441@gmail.com">stereotype441@gmail.com</a>&gt; wrote:<br>
&gt; From: Kenneth Graunke &lt;<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>&gt;<br>
&gt;<br>
&gt; The 50/50 split is just an attempt to get things working.  We likely<br>
&gt; want to tune this, and probably want to avoid allocating the GS any<br>
&gt; space if we&#39;re not using it.<br>
&gt;<br>
&gt; For now, this is good enough.<br>
&gt;<br>
&gt; Signed-off-by: Kenneth Graunke &lt;<a href="mailto:kenneth@whitecape.org">kenneth@whitecape.org</a>&gt;<br>
<br>
</div>This should be changed to not take up URB space for non-GS mode.<br>
</blockquote></div><br>In the long term, I agree.  How critical do you think it is to make this change in this patch series?  The reason I ask is that there is this enigmatic comment in the Sandy Bridge PRM (vol 2 part 1, 1.4.7 3DSTATE_URB, p27, or equivalently in the BSpec vol2a 3D Pipeline - Overview [SNB+] &gt; 3D Pipeline &gt; 3D Pipeline State Overview &gt; 3DSTATE_URB DevSNB):<br>
<br>&quot;Because of a urb corruption caused by allocating a previous gsunit’s urb entry to vsunit software is<br>required to send a “GS NULL Fence”(Send URB fence with VS URB size == 1 and GS URB size == 0)<br>plus a dummy DRAW call before any case where VS will be taking over GS URB space.&quot;<br>
<br>If we change this patch to only allocate URB space to the GS when the GS is in use, then I think we have to follow this part of the documentation (because when switching out of transform feedback mode we&#39;ll be reassigning URB entries from the GS to the VS).  But I don&#39;t know how to interpret this, since AFAICT, &quot;URB fence&quot; is a command that doesn&#39;t exist on Sandy Bridge.  It&#39;s possible that what they meant to say in that parenthetical comment was &quot;Send 3DSTATE_URB with VS URB Entry Allocation Size == 1 and GS URB Entry Allocation Size == 0&quot;, but I&#39;m not sure how comfortable I am with that level of reinterpretation.<br>
<br>Also, there is a need to send a dummy DRAW call.  Is there existing i965 code to do this?  I found the documentation for how to do a dummy draw in the bspec and it looks pretty simple but I would rather not duplicate existing code.<br>
<br>If you can help me work out these details, I&#39;d be glad to modify this patch series to only allocate URB space to the GS when the GS is in use.  Otherwise, my preference would be to postpone this until we have transform feedback working, so it will be easier to test for data corruption and verify that we&#39;ve done the GS NULL Fence correctly.<br>
<br>What would you recommend?<br>