Skip to content

glsl: Adds new pass to lower precision to support half-float

Hyunjun Ko requested to merge zzoon/mesa:mediump-ir into master

Until now mesa doesn't fully support half-float though it already keeps track of variables' precision. We've been working to add full support using the Freedreno driver as test-bed.

At first we started the work based on Topi's branch, which had been mostly implemented as a NIR pass, and made it generally work on freedreno. But we found out that we can't implement the spec correctly because the information about the original operations is lost at NIR.

So we moved to work on GLSL-IR and now we're proposing a new pass at the GLSL-IR stage.

The capability PIPE_SHADER_CAP_FP16 is used to enable/disable this feature on gallium drivers, and is disabled by default at the moment.

Note that this is not completed and might cause some regressions for dEQP CTS but we would like to have the progress so far reviewd and hopefully landed, so that we can keep working on completing the support in-tree and reduce branch maintainance overhead. Note that the MR !736 (merged) and MR !2285 (merged) contains a series of patches relevant to this MR, which can be merged independently.

Edited by Hyunjun Ko

Merge request reports