Fix shader compilation errors with unoptimized shaders on Adreno
Categories
(Core :: Graphics: WebRender, defect)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | fixed |
People
(Reporter: jnicol, Assigned: jnicol)
References
(Blocks 1 open bug)
Details
Attachments
(2 files)
Attempting to use the unoptimized shaders currently results in some shader compilation errors on various Adreno devices. (Presumably due to driver bugs.)
The first is that the antialias_brush
macro gives this error:
ERROR: 0:1287: '(' : Syntax error: syntax error
It appears to not like a macro with an empty argument list. (No argument list is fine, as is a non-empty argument list).
The second is to do with the workaround we have in place for TEXTURE_EXTERNAL crashes on Mali.
Internal compiler error: Error: array indexing out of boundary
It doesn't like that we sample from a sampler which is an argument to a function. Replacing the function with a ternary operator in the macro definition fixes it (and still works around the Mali issue).
We should also try to get CI to test that compilation succeeds for both optimized and unoptimized shaders. Of course that will only help catch bugs on the hardware we test in CI, but it's better than nothing. (It would have caught these as the Pixel 2 is affected)
Assignee | ||
Comment 1•4 years ago
|
||
Some of the unoptimized shaders fail to compile on Adreno devices,
likely due to driver bugs. We have not noticed this until now because
the optimized versions compile successfully.
The first bug appears to be caused by a macro with an empty argument
list. No argument list or a non-empty argument list works fine, but
an empty argument list causes an error.
The second issue occurs when a sampler is used as an argument to a
function. Using a macro instead works around the bug.
Assignee | ||
Comment 2•4 years ago
|
||
Add a new test_init
subcommand to wrench that tests for successful
initialization. This can then be used in combination with the
--precache
flag to ensure that all shaders are compiled
successfully. Run this with and without --use-unoptimized-shaders
to
ensure that both variants of the shaders compile.
For android we need to ensure that wrench terminates the process when
it completes successfully otherwise it will run forever. We also must
ensure that the test harness stops the old process before relaunching
the activity one in the case of a timeout.
Depends on D109773
Comment 4•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c77283a7fffb
https://hg.mozilla.org/mozilla-central/rev/47e8f1174eba
Description
•