Bug 99842 - GL_ARB_transform_feedback2 on i965 gen6
Summary: GL_ARB_transform_feedback2 on i965 gen6
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/i965 (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Kenneth Graunke
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2017-02-16 17:54 UTC by Felix Potthast
Modified: 2017-02-22 11:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Description Felix Potthast 2017-02-16 17:54:03 UTC
Mesa supports GL_ARB_transform_feedback2 only for gen7+, and i wonder what the reason is, since the functionality is present in OpenGL ES 3.0 which is supported by gen6. It sadly prevents my Chromium/Firefox from supporting WebGL 2.0, since they use an OpenGL context instead of an OpenGL ES context and therefore depend on this extension to get required transform feedback functionality.
Comment 1 Kenneth Graunke 2017-02-17 07:38:46 UTC
Looking at this again, we apparently never implemented Pause and ResumeTransformFeedback() driver hooks...which meant that we actually failed to restore the streamout buffer writing location during [Pause A -> Bind B -> ... -> Bind A -> Resume A] situations.

Honestly, I think we forgot that this was a part of ES 3.0...there aren't any failing tests for this in the CTS, so it looked like everything was working.  There is a failing Piglit test, which I'm guessing came about after we had done ES 3.0 and moved on.

I remember looking at implementing GL_ARB_transform_feedback2 back in the day.  I saw the lack of MI_LOAD_REGISTER_MEM and figured Pause/Resume would be painful to implement.  Of course, I failed to notice that there's a command to do this...but the hard part is that there isn't a register to read, making it hard to obtain the value at Pause time.

Of course, this is part of ES 3.0, so we have to do it anyway.  I've found a solution that seems to work, and should fix those problems.

At that point, GL_ARB_transform_feedback2 only has one feature over and above ES 3.0 - glDrawTransformFeedback().  However...that's easy.  The mechanism for the above bug fix makes this just work with no additional code.

So I think we can turn it on.  I have no idea how well WebGL 2.0 will work...
Comment 2 Kenneth Graunke 2017-02-17 09:56:57 UTC
Patches on mesa-dev:
Comment 3 Kenneth Graunke 2017-02-22 03:07:52 UTC
Fixed on master by:

commit 0a7b252c5b0f5c5c0e114d913d6153bd2cc44ce9
Author: Kenneth Graunke <kenneth@whitecape.org>
Date:   Thu Feb 16 20:05:39 2017 -0800

    i965: Enable ARB_transform_feedback2 on Sandybridge.

And covered in news by:
Comment 4 Felix Potthast 2017-02-22 11:08:33 UTC
Nice work, Thanks!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.