Shader: Add initial support for arrays

This commit is contained in:
Jérôme Leclercq
2022-01-01 23:01:31 +01:00
parent 89c7bbf197
commit 1f15328fdd
22 changed files with 781 additions and 57 deletions

View File

@@ -39,6 +39,12 @@ namespace Nz
using ConstantPtr = std::shared_ptr<Constant>;
using TypePtr = std::shared_ptr<Type>;
struct Array
{
TypePtr elementType;
UInt32 length;
};
struct Bool {};
struct Float
@@ -108,7 +114,7 @@ namespace Nz
std::vector<SpirvDecoration> decorations;
};
using AnyType = std::variant<Bool, Float, Function, Image, Integer, Matrix, Pointer, SampledImage, Structure, Vector, Void>;
using AnyType = std::variant<Array, Bool, Float, Function, Image, Integer, Matrix, Pointer, SampledImage, Structure, Vector, Void>;
struct ConstantBool
{