shader: Implement transform feedbacks and define file format

This commit is contained in:
ReinUsesLisp 2021-04-14 01:04:59 -03:00 committed by ameerj
parent 4a6c299e3f
commit e59971ea1b
11 changed files with 272 additions and 23 deletions

View file

@ -20,6 +20,13 @@ u32 GenericAttributeIndex(Attribute attribute) {
return (static_cast<u32>(attribute) - static_cast<u32>(Attribute::Generic0X)) / 4u;
}
u32 GenericAttributeElement(Attribute attribute) {
if (!IsGeneric(attribute)) {
throw InvalidArgument("Attribute is not generic {}", attribute);
}
return static_cast<u32>(attribute) % 4;
}
std::string NameOf(Attribute attribute) {
switch (attribute) {
case Attribute::PrimitiveId: