Add conversion folding when the source is a constant.

This change adds unary conversion folding when the source is a constant.
This fixes an ISV issue whereby:

```
const float16_t f = float16_t(42.0);
```

Wouldn't compile because the conversion operator would always produce an
EvqTemporary when it could have produced an EvqConst.

I've also added a test case that proves out that all basic-type to
basic-type conversions work.
This commit is contained in:
Neil Henning
2018-11-26 10:17:33 +00:00
parent 0e6c82ce93
commit 81a63f1de0
11 changed files with 1012 additions and 40 deletions

View File

@@ -231,6 +231,7 @@ INSTANTIATE_TEST_CASE_P(
"precise_struct_block.vert",
"maxClipDistances.vert",
"findFunction.frag",
"constantUnaryConversion.comp"
})),
FileNameAsCustomTestSuffix
);