Skip to content

Add a precision to the builtins

Neil Roberts requested to merge nroberts/mesa:precision-for-builtins into master

All of the builtin variables mentioned in the GLSL ES spec and the extensions include a precision declaration which is different depending on what the variable is used for. This MR makes it set the corresponding precision when creating the variable.

This will be needed as part of the work to add a lowering pass to convert mediump to float16. However I think it is worth sending as a separate MR in the meantime because it can be landed independently of whatever method is chosen to perform the lowering and it might bitrot more quickly if anymore builtins are added.

Merge request reports