Open
Bug 1016086
Opened 11 years ago
Updated 3 years ago
Use a single attribute in all shaders and avoid switching attribute configuration while compositing
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
REOPENED
mozilla32
People
(Reporter: gal, Unassigned)
References
Details
Attachments
(4 files, 1 obsolete file)
|
13.77 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
|
6.49 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
|
2.61 KB,
patch
|
bas.schouten
:
review+
|
Details | Diff | Splinter Review |
|
2.19 KB,
patch
|
gal
:
review+
|
Details | Diff | Splinter Review |
No description provided.
| Reporter | ||
Comment 1•11 years ago
|
||
| Reporter | ||
Comment 2•11 years ago
|
||
This is needed so we can just setup the attribute configuration for all composition shaders once as we start compositing the frame. The blit helper runs as we upload textures with ContentHostIncremental and can stomp over the attribute state.
Assignee: nobody → gal
| Reporter | ||
Comment 3•11 years ago
|
||
| Reporter | ||
Updated•11 years ago
|
Attachment #8428901 -
Flags: review?(bas)
| Reporter | ||
Updated•11 years ago
|
Attachment #8428904 -
Flags: review?(bas)
| Reporter | ||
Updated•11 years ago
|
Attachment #8428905 -
Flags: review?(bas)
| Reporter | ||
Comment 4•11 years ago
|
||
This patch significantly improves our GL trace. For most layers we just set texture bindings, set one uniform (layer rect), and then draw.
Comment 5•11 years ago
|
||
Comment on attachment 8428901 [details] [diff] [review]
Part 1: Use a single attribute in all shaders
Review of attachment 8428901 [details] [diff] [review]:
-----------------------------------------------------------------
I'm a little hesitant we'll never need any of this sort of thing again, but for now it seems okay.
::: gfx/layers/opengl/CompositorOGL.cpp
@@ +1502,5 @@
> NS_ASSERTION(aProg->HasInitialized(), "Shader program not correctly initialized");
>
> + const GLuint coordAttribIndex = 0;
> +
> + mGLContext->fBindBuffer(LOCAL_GL_ARRAY_BUFFER, mQuadVBO);
If we're almost always going to have this bound, isn't there value in only calling this in BeginFrame?
Attachment #8428901 -
Flags: review?(bas) → review+
Comment 7•11 years ago
|
||
Comment on attachment 8428904 [details] [diff] [review]
Part 2: Save/restore attribute state in blit helper
Review of attachment 8428904 [details] [diff] [review]:
-----------------------------------------------------------------
::: gfx/gl/ScopedGLHelpers.cpp
@@ +375,5 @@
> + * or alternatively in the internal vertex array state
> + * for a buffer object.
> + */
> +
> + mGL->fGetVertexAttribiv(mAttribIndex, LOCAL_GL_VERTEX_ATTRIB_ARRAY_ENABLED, &mAttribEnabled);
I expect these getters to all be practically free... I do really hope that's true on all drivers though.
Attachment #8428904 -
Flags: review?(bas) → review+
| Reporter | ||
Comment 8•11 years ago
|
||
The whole texture 2 texture blit stuff is only used with ContentClientIncremental and only on mac, and there its cheap enough.
| Reporter | ||
Comment 9•11 years ago
|
||
Ping for the last part.
Updated•11 years ago
|
Attachment #8428905 -
Flags: review?(bas) → review+
| Reporter | ||
Comment 10•11 years ago
|
||
Backed out parts 1-3 in https://hg.mozilla.org/integration/mozilla-inbound/rev/8d095e8cac56 for breaking robocop tests:
https://tbpl.mozilla.org/php/getParsedLog.php?id=40575241&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=40575038&tree=Mozilla-Inbound
https://tbpl.mozilla.org/php/getParsedLog.php?id=40576485&tree=Mozilla-Inbound
Flags: needinfo?(gal)
| Reporter | ||
Comment 13•11 years ago
|
||
I think ReadTexImage stomps over our attribute state. Fix coming.
| Reporter | ||
Comment 14•11 years ago
|
||
| Reporter | ||
Updated•11 years ago
|
Attachment #8428905 -
Attachment description: Part 3: Setup attribute configuration when we start compositing instead of for every draw command → Part 4: Setup attribute configuration when we start compositing instead of for every draw command
| Reporter | ||
Updated•11 years ago
|
Attachment #8430774 -
Flags: review?(bas)
| Reporter | ||
Comment 15•11 years ago
|
||
| Reporter | ||
Updated•11 years ago
|
Whiteboard: keep-open
Updated•11 years ago
|
Attachment #8430774 -
Flags: review?(bas) → review+
| Reporter | ||
Comment 16•11 years ago
|
||
| Reporter | ||
Comment 18•11 years ago
|
||
| Reporter | ||
Comment 19•11 years ago
|
||
Attachment #8428905 -
Attachment is obsolete: true
Attachment #8431269 -
Flags: review+
| Reporter | ||
Comment 20•11 years ago
|
||
Try server run pending, ready to check in once that passes.
Keywords: checkin-needed
Whiteboard: keep-open
| Reporter | ||
Comment 21•11 years ago
|
||
Assuming this sticks, most draws now require only binding the textures, 1 uniform set (the layer rect, the texture rect is set but filtered since it tends to be (0,0)(1,1)) and then the draw command itself. When switching layer types the program has to be switched in addition.
Comment 22•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
| Reporter | ||
Comment 23•11 years ago
|
||
We forgot a part here.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
| Reporter | ||
Comment 24•11 years ago
|
||
Comment 25•11 years ago
|
||
That forgotten part would be the part that breaks a bunch of Android robocop tests: https://tbpl.mozilla.org/php/getParsedLog.php?id=40833719&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40834089&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40833394&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40833434&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40833558&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40833354&tree=Mozilla-Inbound, https://tbpl.mozilla.org/php/getParsedLog.php?id=40833656&tree=Mozilla-Inbound.
Backed out in https://hg.mozilla.org/integration/mozilla-inbound/rev/2d1c15c3937c.
| Reporter | ||
Comment 26•11 years ago
|
||
Part 3 was supposed to have fixed that. Thanks for the backout!
Comment 27•3 years ago
|
||
The bug assignee didn't login in Bugzilla in the last 7 months, so the assignee is being reset.
Assignee: gal → nobody
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•