We have encountered issues on some platforms due to a large number of
if statements in shaders. The shader optimizer previously generated
code with a large number of if statements, due to the way in which it
optimized switch statements.
Previously the optimizer output 2 if statements for every case in a
switch. First it ORs the "fallthrough" var with the case's
condition. Then sets the fallthrough var to false if the "break" var
is true. Then conditionally executes the case's instructions if
fallthrough is true. For example:
switch (uMode) {
case 0:
gl_Position = vec4(0.0);
break;
case 1:
gl_Position = vec4(1.0);
break;
}
becomes:
bool break_var = bool(0);
bool fallthrough_var = (0 == uMode);
if (break_var) fallthrough_var = bool(0);
if (fallthrough_var) {
gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
break_var = bool(1);
};
fallthrough_var = (fallthrough_var || (1 == uMode));
if (break_var) fallthrough_var = bool(0);
if (fallthrough_var) {
gl_Position = vec4(1.0, 1.0, 1.0, 1.0);
break_var = bool(1);
};
This update removes one of these ifs, by ANDing the fallthrough_var
with !break_var rather than conditionally setting it to false. eg:
bool break_var = bool(0);
bool fallthrough_var = (0 == uMode);
if (fallthrough_var) {
gl_Position = vec4(0.0, 0.0, 0.0, 0.0);
break_var = bool(1);
};
fallthrough_var = (fallthrough_var || (1 == uMode));
fallthrough_var = (fallthrough_var && !(break_var));
if (fallthrough_var) {
gl_Position = vec4(1.0, 1.0, 1.0, 1.0);
break_var = bool(1);
};
This is logically equivalent but uses half as many if statements,
which helps to avoid driver bugs on some platforms.
Differential Revision: https://phabricator.services.mozilla.com/D103713
Bumps version to
3011a2b923c8b0f1b392bcdd008cd8b95ffd846b
This is done to fix a bug where parsing bad metadata in the userdata (udta)
would be fatal when we should instead just fail the userdata.
This also updates some mp4parse-rust dependencies which results in some
removals.
Differential Revision: https://phabricator.services.mozilla.com/D102997
Bumps version to
3011a2b923c8b0f1b392bcdd008cd8b95ffd846b
This is done to fix a bug where parsing bad metadata in the userdata (udta)
would be fatal when we should instead just fail the userdata.
This also updates some mp4parse-rust dependencies which results in some
removals.
Differential Revision: https://phabricator.services.mozilla.com/D102997
These show up after bug 1685697 since now cargo thinks the code is ours.
Just prevent them from showing up since they're not useful nor we want
to fix them (they're fixed in more recent versions of the crate).
Differential Revision: https://phabricator.services.mozilla.com/D102775
Pull in a number of new SIMD opcodes, and a change from iNxM.any_true
to v128.any_true. Plus whatever else has landed in the mean time...
Differential Revision: https://phabricator.services.mozilla.com/D102398
The new version contains
- A bug fix for the bucketed allocator (we don't currently use it)
- A few fixes that can happen when requesting large enough allocation sizes to cause integer overflows. At the moment we never request an allocation larger than 512px so we are safe but it's still good to stay up to date.
Differential Revision: https://phabricator.services.mozilla.com/D101608
The `wheel` package was failing with Mac Big Sur.
It's been updated, but our `virtualenv` package
has its own vendored `wheel` package that is out-of-date.
This should solve "assert len(base_version) == 2" and
"would build wheel with unsupported tag" errors.
Differential Revision: https://phabricator.services.mozilla.com/D99482
The `wheel` package was failing with Mac Big Sur.
It's been updated, but our `virtualenv` package
has its own vendored `wheel` package that is out-of-date.
This should solve "assert len(base_version) == 2" and
"would build wheel with unsupported tag" errors.
Differential Revision: https://phabricator.services.mozilla.com/D99482
the goal of this PR is to provide the necessary
infrastructure to handle errors on the GPU process side and send them
back to the client side, triggering the uncaptured error events.
Differential Revision: https://phabricator.services.mozilla.com/D98542
comedy 0.2.0 no longer impls Fail itself. By reenabling the default features
(including std) of failure, the blanket impl will cover that. These features
were disabled to remove a dependency on backtrace, but since bug 1608157 we
are using a version of failure without backtrace by default so that is no
longer needed.
Differential Revision: https://phabricator.services.mozilla.com/D99969