You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks like the conditions for it to happen are that the variable must be from reading a texture (e.g. replacing with a mediump uniform doesn't cause the problem), and that variable is fed to a two-parameter build-in (e.g. this doesn't happen with abs()).
I checked that the highp is not there right after calling glslang, but appears after running spirv-opt:
glslang isn't currently adding RelaxedPrecision to the result of textureLod and spirv-opt just eliminates x by promoting it to registers. That's why spirv-cross is making _21 highp.
I found a scenario where a
mediump
variable is turned in to ahighp
after running spirv-opt.will produce:
It looks like the conditions for it to happen are that the variable must be from reading a texture (e.g. replacing with a mediump uniform doesn't cause the problem), and that variable is fed to a two-parameter build-in (e.g. this doesn't happen with
abs()
).I checked that the
highp
is not there right after calling glslang, but appears after running spirv-opt:The text was updated successfully, but these errors were encountered: