SPV: Fix #2293: keep relaxed precision on arg passed to relaxed param

When arguments are copied to make space for a writable formal parameter,
and the formal parameter is relaxed precision, make the copy also
relaxed precision.
This commit is contained in:
John Kessenich 2020-06-26 09:05:31 -06:00
parent 4df10335e6
commit bf6efd0316
6 changed files with 77 additions and 32 deletions

View file

@ -2,9 +2,9 @@
precision mediump float;
void fooConst(const in float f, const in highp float g)
{
}
void fooConst(const in float f, const in highp float g) { }
void foo(in float f, in highp float g) { }
void main()
{
@ -12,4 +12,6 @@ void main()
highp float aH, bH;
fooConst(aM, bM); // must copy bM
fooConst(aH, bH); // must copy aH
foo(aM, bM);
foo(aH, bH);
}