Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync changes from mozilla-central gfx/wr #4017

Merged
merged 4 commits into from Jul 16, 2020
Merged

Conversation

@moz-gfx
Copy link

moz-gfx commented Jul 15, 2020

No description provided.

jamienicol and others added 4 commits Jul 15, 2020
…dreno crash. r=gw

On some Adreno 505 and 506 devices we are encountering driver crashes during
glLinkProgram(). The only circumstance in which we have been able to reproduce
locally is when the show-overdraw debug option is enabled. The reason appears to
be that, due to shader optimisation, the debug overdraw variants of many shaders
have identical source code. The crash seems to occur when linking a shader which
has identical source code to a previously linked shader.

This does not, however, explain the non-insignificant numbers of crashes in the
wild because a) it's unlikely many users are enabling overdraw debugging, and b)
some crash reports predate the commit which enabled shader
optimisation. However, it is possible that for a different reason we are
compiling multiple shaders with identical source code.

To attempt to work around this crash this change adds a random comment to the
end of each shader source string, on the affected devices.

Differential Revision: https://phabricator.services.mozilla.com/D83571

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/bbe5ed51273b2a3a90c736b024f3e27cf01314aa
…gw,jrmuizel

we only draw quads, and for quads we have a fixed vertex buffer with positions.
If we get stop using instancing, we'll no longer have the luxury of 4 vertices there.
Given that they are trivial to compute, it seems simpler to just do that in the shader today.
So this PR is a required step on the way to instance-less rendering.

It appears that we are hitting a driver bug with Intel on macOS, where scissored clears don't work properly if we render without per-vertex attributes.
It doesn't make a ton of sense, but switching to quad clears appears to fix it for me. Added the corresponding entry to the wiki - https://github.com/servo/webrender/wiki/Driver-issues#bug-1652763---glitches-on-macos-intel-with-clears

Differential Revision: https://phabricator.services.mozilla.com/D83391

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/697243e0434b814a992e1c9356f95517f4854b07
…dreno crash. r=gw

On some Adreno 505 and 506 devices we are encountering driver crashes during
glLinkProgram(). The only circumstance in which we have been able to reproduce
locally is when the show-overdraw debug option is enabled. The reason appears to
be that, due to shader optimisation, the debug overdraw variants of many shaders
have identical source code. The crash seems to occur when linking a shader which
has identical source code to a previously linked shader.

This does not, however, explain the non-insignificant numbers of crashes in the
wild because a) it's unlikely many users are enabling overdraw debugging, and b)
some crash reports predate the commit which enabled shader
optimisation. However, it is possible that for a different reason we are
compiling multiple shaders with identical source code.

To attempt to work around this crash this change adds a random comment to the
end of each shader source string, on the affected devices.

Differential Revision: https://phabricator.services.mozilla.com/D83571

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/c08d4fe356e52e3e61d18765f9256d143687efda
@moz-gfx
Copy link
Author

moz-gfx commented Jul 15, 2020

@bors-servo r=auto

@bors-servo
Copy link
Contributor

bors-servo commented Jul 15, 2020

📌 Commit a61bae0 has been approved by auto

@bors-servo
Copy link
Contributor

bors-servo commented Jul 15, 2020

Testing commit a61bae0 with merge ecbecf7...

@bors-servo
Copy link
Contributor

bors-servo commented Jul 16, 2020

☀️ Test successful - status-taskcluster
Approved by: auto
Pushing ecbecf7 to master...

@bors-servo bors-servo merged commit ecbecf7 into servo:master Jul 16, 2020
2 checks passed
2 checks passed
Community-TC (pull_request) TaskGroup: success
Details
homu Test successful
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

5 participants
You can’t perform that action at this time.