HLSL: Add template style constructors for vector & matrix types

This commit is contained in:
LoopDawg
2016-06-23 19:13:48 -06:00
parent d02dc5d05a
commit 6daaa4fadf
6 changed files with 892 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
float PixelShaderFunction()
{
// TODO: All of the below should fail, although presently the first failure
// aborts compilation and the rest are skipped. Having a separate test for
// each would be cumbersome.
vector<void, 2> r00; // cannot declare vectors of voids
matrix<void, 2, 3> r01; // cannot declare matrices of voids
vector<float, 2, 3> r02; // too many parameters to vector
matrix<float, 2> r03; // not enough parameters to matrix
int three = 3;
vector<void, three> r04; // size must be a literal constant integer
matrix<void, three, three> r05; // size must be a literal constant integer
vector<vector<int, 3>, 3> r06; // type must be a simple scalar
vector<float3, 3> r07; // type must be a simple scalar
return 0.0;
}