SPV: RelaxedPrecision: Generalize fix #2293 to cover more operations.
This simplifies and enforces use of precision in many more places, to help avoid accidental loss of RelaxedPrecision through intermediate operations. Known fixes are: - ?: - function return values with mis-matched precision - precision of function return values when a copy was needed to fix types
This commit is contained in:
parent
27e915ed4f
commit
435dd8028b
10 changed files with 835 additions and 670 deletions
|
|
@ -6,6 +6,11 @@ void fooConst(const in float f, const in highp float g) { }
|
|||
|
||||
void foo(in float f, in highp float g) { }
|
||||
|
||||
float retM ( float x) { return x; }
|
||||
highp float retH (highp float x) { return x; }
|
||||
float retHM(highp float x) { return x; }
|
||||
highp float retMH( float x) { return x; }
|
||||
|
||||
void main()
|
||||
{
|
||||
float aM, bM;
|
||||
|
|
@ -14,4 +19,9 @@ void main()
|
|||
fooConst(aH, bH); // must copy aH
|
||||
foo(aM, bM);
|
||||
foo(aH, bH);
|
||||
|
||||
retM(aM);
|
||||
retH(aH);
|
||||
retHM(aH);
|
||||
retMH(aM);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue