<div dir="ltr">On 22 October 2013 10:07, Ian Romanick <span dir="ltr"><<a href="mailto:idr@freedesktop.org" target="_blank">idr@freedesktop.org</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="im">On 10/21/2013 11:48 AM, Kenneth Graunke wrote:<br>
> On 10/21/2013 08:40 AM, Ian Romanick wrote:<br>
>> On 10/17/2013 11:09 PM, Kenneth Graunke wrote:<br>
>>> Here's my implementation of ARB_transform_feedback2.  I believe it's<br>
>>> complete; it passes all of our Piglit tests and a lot of Intel's<br>
>>> oglconform tests.<br>
>>><br>
>>> This should work out of the box on Ivybridge and Baytrail.  It won't<br>
>>> work on Haswell at the moment, due to restrictions on register writes<br>
>>> (to be solved in a future kernel version).  Patch 9 will need to be<br>
>>> replaced with something that detects whether or not we can write<br>
>>> registers from userspace batchbuffers.<br>
>>><br>
>>> In the meantime, I figured I'd send out the rest for review.<br>
>>><br>
>>> Porting this back to Sandybridge is probably doable, but annoying.<br>
>>> Sandybridge doesn't have the MI_LOAD_REGISTER_MEM command, so we'd have<br>
>>> to map the buffers and use MI_LOAD_REGISTER_IMM.  Seems pretty gross.<br>
>>> Plus, transform feedback is done very differently pre-Ivybridge.  I'm<br>
>>> not sure it's worth it, seeing as it's a GL 4.0 feature.<br>
>><br>
>> I assume this is just to support glDrawTransformFeedback?<br>
><br>
> No, it's to support glResumeTransformFeedback.<br>
<br>
</div>This is also part of OpenGL ES 3.0, so we need to fix it. :(<br></blockquote><div><br></div><div>Wow, you're right.  For some reason I had convinced myself that OpenGL ES 3.0 didn't support BindTransformFeedback(), therefore it didn't have to support switching transform feedback objects while paused.  But I just checked the spec and I was totally wrong about that.<br>
<br>So yeah, we need to fix this even for Sandy Bridge.<br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div class=""><div class="h5"><br>
> glDrawTransformFeedback actually just reads pipeline statistics counters<br>
> and leaves them free-running.<br>
><br>
>> Can you add that information to <a href="http://dri.freedesktop.org/wiki/I965Todo/" target="_blank">http://dri.freedesktop.org/wiki/I965Todo/</a> ?<br>
><br>
> Actually, I'm probably wrong...on Gen7 we use MI_LOAD_REGISTER_MEM to<br>
> copy offsets into the SO_WRITE_OFFSET(n) registers.  But on Sandybridge,<br>
> XFB is done using the geometry shader, so it works entirely differently.<br>
>  I don't think there is a register to load.<br></div></div></blockquote><div><br></div><div>There is a register on Sandy Bridge, but instead of writing to it using MI_LOAD_REGISTER_*, you're supposed to write to it using 3DSTATE_GS_SVB_INDEX (see brw_begin_transform_feedback() in gen6_sol.c).  That's kind of unfortunate for pause/resume because 3DSTATE_GS_SVB_INDEX doesn't support anything akin to MI_LOAD_REGISTER_MEM.  It's possible that you can *also* write to those registers directly using MI_LOAD_REGISTER_MEM, but I haven't investigated that.<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">
><br>
> I'll just let whoever looks into it figure it out.  Not much insight anyway.<br>
><br>
> --Ken<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</div></div></blockquote></div><br></div></div>