SPV: Partially address #2293: correct "const in" precision matching.
Track whether formal parameters declare reduced precision and match that with arguments, and if they differ, make a copy to promote the precision.
This commit is contained in:
parent
fbb9dc2cf1
commit
4df10335e6
6 changed files with 94 additions and 2 deletions
15
Test/spv.precisionArgs.frag
Normal file
15
Test/spv.precisionArgs.frag
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
#version 310 es
|
||||
|
||||
precision mediump float;
|
||||
|
||||
void fooConst(const in float f, const in highp float g)
|
||||
{
|
||||
}
|
||||
|
||||
void main()
|
||||
{
|
||||
float aM, bM;
|
||||
highp float aH, bH;
|
||||
fooConst(aM, bM); // must copy bM
|
||||
fooConst(aH, bH); // must copy aH
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue