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 #3926

Merged
merged 4 commits into from Apr 21, 2020
Merged

Conversation

@moz-gfx
Copy link

moz-gfx commented Apr 21, 2020

No description provided.

Jim Blandy added 4 commits Apr 21, 2020
…abled. r=lsalzman

When the `software` feature is enabled, a clause gets added to two `match`
statements, causing Rust to complain that another `match` clause is unreachable.
This patch makes the other match clause conditional on the absence of the
`software` feature.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/0ff89c708ad7488fd4f156603be42c3009952ee9
…=lsalzman

Provide an explicit copy constructor for the GCC `VectorType` polyfill. Since
`VectorType` has an assignment operator, GCC is uncomfortable faking a copy
constructor, so we have to provide one.

Make `VectorType` default constructor actually initialize the elements. When we
have a GLSL `if` whose condition varies from fragment to fragment, and whose
alternatives either assign to a variable or discard the fragment, we compile the
assignment to an `if_then_else` call that preserves the old elements for
fragments not taking the assignment's path. But if this is the initializing
assignment, the 'old value' operand to that `if_then_else` is uninitialized. We
could make the translator smarter about this, and have it not use predicated
assignment in such cases, but this fix is fine for now.

Make `VectorType::wrap` take its argument by const reference, to avoid weird ABI
'notes'.

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

[ghsync] From https://hg.mozilla.org/mozilla-central/rev/ef53eeea860213842aa1e23f611f523b5bd9679b
Add `UNUSED` marker to `gl.cc` function arguments.

Add GCC pragmas to ignore `-Wunused-parameter` and `-Wunused-but-set-variable`
warnings in the generated shaders. Since these are generated from GLSL, it is
hard to avoid the warnings by changing the code itself.

Avoid uninitialized values in `vec4::operator[]`.

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

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

moz-gfx commented Apr 21, 2020

@bors-servo r=auto

@bors-servo
Copy link
Contributor

bors-servo commented Apr 21, 2020

📌 Commit 81d7bb9 has been approved by auto

@bors-servo
Copy link
Contributor

bors-servo commented Apr 21, 2020

Testing commit 81d7bb9 with merge abec7d7...

@bors-servo
Copy link
Contributor

bors-servo commented Apr 21, 2020

☀️ Test successful - status-appveyor, status-taskcluster
Approved by: auto
Pushing abec7d7 to master...

@bors-servo bors-servo merged commit abec7d7 into servo:master Apr 21, 2020
3 checks passed
3 checks passed
Community-TC (pull_request) TaskGroup: success
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
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

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