Closed Bug 1880013 Opened 10 months ago Closed 10 months ago

Update glslopt to 0.1.10 for C++20 fix

Categories

(Core :: Graphics: WebRender, task, P3)

Unspecified
All
task

Tracking

()

RESOLVED FIXED
125 Branch
Tracking Status
firefox-esr115 --- disabled
firefox122 --- disabled
firefox123 --- disabled
firefox124 --- disabled
firefox125 --- fixed

People

(Reporter: cpeterson, Assigned: cpeterson)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Update glslopt-rs to include C++20 fix https://github.com/jamienicol/glsl-optimizer/pull/8 (via glslopt-rs submodule update https://github.com/jamienicol/glslopt-rs/pull/8).

glsl-optimizer's c99_math.h #defines a signbit() macro, but this macro clobbers use of std::signbit() in clang's C++20 header files. We compile glsl-optimizer as C11 and C++, so we no longer need any of c99_math.h's C99 polyfill implementations. We can just use C's standard math.h.

cargo:warning=In file included from glsl-optimizer/src/compiler/glsl/lower_precision.cpp:37:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/vector:274:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/__bit_reference:15:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/algorithm:667:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/functional:493:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/__algorithm/search.h:16:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/utility:236:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/compare:144:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/__compare/compare_partial_order_fallback.h:13:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/__compare/partial_order.h:14:
cargo:warning=In file included from /Users/chris/.mozbuild/clang/bin/../include/c++/v1/__compare/weak_order.h:14:
cargo:warning=/Users/chris/.mozbuild/clang/bin/../include/c++/v1/__compare/strong_order.h:68:35: error: expected unqualified-id
cargo:warning= return _VSTD::signbit(__u) <=> _VSTD::signbit(__t);
cargo:warning= ^
cargo:warning=glsl-optimizer/include/c99_math.h:123:20: note: expanded from macro 'signbit'
cargo:warning=#define signbit(x) ((x) < 0.0f)

Thanks Chris! glslopt 0.1.10 has been published to crates.io

Assignee: nobody → cpeterson
OS: Unspecified → All
Summary: Update glslopt-rs to include C++20 fix → Update glslopt to 0.1.10 for C++20 fix
Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c231ed79678 Update glslopt to 0.1.10 for C++20 fix. r=jnicol,supply-chain-reviewers

Backed out for causing wrench bustages

Flags: needinfo?(cpeterson)

Chris, in case it's not clear, I think you need to update gfx/wr/Cargo.lock. Running cargo build in gfx/wr/webrender for example should do that. Sorry I missed that in review!

Attachment #9380227 - Attachment description: Bug 1880013 - Update glslopt to 0.1.10 for C++20 fix. r?jnicol → Bug 1880013 - Update glslopt to 0.1.10 for C++20 fix. r?jnicol,#supply-chain-reviewers

(In reply to Jamie Nicol [:jnicol] from comment #5)

Chris, in case it's not clear, I think you need to update gfx/wr/Cargo.lock. Running cargo build in gfx/wr/webrender for example should do that. Sorry I missed that in review!

Yep. I ran cargo update and mach vendor rust in the root directory, but forgot to vendor in the gfx/wr directory.

Flags: needinfo?(cpeterson)
Pushed by cpeterson@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6ab3e357bc78 Update glslopt to 0.1.10 for C++20 fix. r=jnicol,supply-chain-reviewers
Status: NEW → RESOLVED
Closed: 10 months ago
Resolution: --- → FIXED
Target Milestone: --- → 125 Branch
See Also: 1897470
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: