engine icon indicating copy to clipboard operation
engine copied to clipboard

[Impeller] Use the ES profile for shaderc ingestion

Open bdero opened this issue 3 years ago • 2 comments

This is a step towards being able to control floating point precision. The GLSL 4.6 spec ignores precision (and so does glslang in this mode). The compiler is still not emitting half precision on Metal, so something else probably needs to be adjusted (perhaps the shaderc_env or spirv_target) since it appears to have support for doing so internally.

All of the shaders needed to be modified because explicitly specifying precision (and explicitly specifying conversions between different precisions) is mandatory for GLSL ES 3.2. If we end up needing to reverse this change for some reason, none of the shaders will need to be changed to do so, as all of the changes are also compatible with GLSL 4.6

bdero avatar Aug 09 '22 23:08 bdero

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat (don't just cc him here, he won't see it! He's on Discord!).

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

flutter-dashboard[bot] avatar Aug 09 '22 23:08 flutter-dashboard[bot]

Might be worth experimenting with this a bit more before landing -- we may or may not end up needing it.

bdero avatar Aug 09 '22 23:08 bdero

@bdero Do you still intend on landing this. If not, let's move this to the icebox?

chinmaygarde avatar Aug 15 '22 20:08 chinmaygarde

@chinmaygarde I don't think we should land this right now -- moved to ice box. I didn't find a way to tease the compiler into emitting precision info and this needs a deeper look at shaderc internals.

bdero avatar Aug 15 '22 20:08 bdero