Add line breaks to make dehydrated files more merge-friendly.
Change-Id: Ica329608e5ee7f873a55dc27e6c14bb8734665a3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/324118 Commit-Queue: John Stiles <johnstiles@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: John Stiles <johnstiles@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
e895cdc716
commit
e1589a1e19
@ -62,7 +62,7 @@ public:
|
||||
if (symbols) {
|
||||
dehydrator->write(*symbols);
|
||||
} else {
|
||||
dehydrator->writeU8(Rehydrator::kVoid_Command);
|
||||
dehydrator->writeCommand(Rehydrator::kVoid_Command);
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,12 +76,12 @@ private:
|
||||
|
||||
void Dehydrator::write(Layout l) {
|
||||
if (l == Layout()) {
|
||||
this->writeU8(Rehydrator::kDefaultLayout_Command);
|
||||
this->writeCommand(Rehydrator::kDefaultLayout_Command);
|
||||
} else if (l == Layout::builtin(l.fBuiltin)) {
|
||||
this->writeS8(Rehydrator::kBuiltinLayout_Command);
|
||||
this->writeCommand(Rehydrator::kBuiltinLayout_Command);
|
||||
this->writeS16(l.fBuiltin);
|
||||
} else {
|
||||
this->writeS8(Rehydrator::kLayout_Command);
|
||||
this->writeCommand(Rehydrator::kLayout_Command);
|
||||
fBody.write32(l.fFlags);
|
||||
this->writeS8(l.fLocation);
|
||||
this->writeS8(l.fOffset);
|
||||
@ -103,14 +103,14 @@ void Dehydrator::write(Layout l) {
|
||||
|
||||
void Dehydrator::write(Modifiers m) {
|
||||
if (m == Modifiers()) {
|
||||
this->writeU8(Rehydrator::kDefaultModifiers_Command);
|
||||
this->writeCommand(Rehydrator::kDefaultModifiers_Command);
|
||||
} else {
|
||||
if (m.fFlags <= 255) {
|
||||
this->writeU8(Rehydrator::kModifiers8Bit_Command);
|
||||
this->writeCommand(Rehydrator::kModifiers8Bit_Command);
|
||||
this->write(m.fLayout);
|
||||
this->writeU8(m.fFlags);
|
||||
} else {
|
||||
this->writeU8(Rehydrator::kModifiers_Command);
|
||||
this->writeCommand(Rehydrator::kModifiers_Command);
|
||||
this->write(m.fLayout);
|
||||
this->writeS32(m.fFlags);
|
||||
}
|
||||
@ -128,6 +128,7 @@ void Dehydrator::write(String s) {
|
||||
offset = fStringBuffer.str().length() + HEADER_SIZE;
|
||||
fStrings.insert({ s, offset });
|
||||
SkASSERT(s.length() <= 255);
|
||||
fStringBreaks.add(fStringBuffer.bytesWritten());
|
||||
fStringBuffer.write8(s.length());
|
||||
fStringBuffer.writeString(s);
|
||||
} else {
|
||||
@ -139,14 +140,14 @@ void Dehydrator::write(String s) {
|
||||
void Dehydrator::write(const Symbol& s) {
|
||||
uint16_t id = this->symbolId(&s, false);
|
||||
if (id) {
|
||||
this->writeU8(Rehydrator::kSymbolRef_Command);
|
||||
this->writeCommand(Rehydrator::kSymbolRef_Command);
|
||||
this->writeU16(id);
|
||||
return;
|
||||
}
|
||||
switch (s.kind()) {
|
||||
case Symbol::Kind::kFunctionDeclaration: {
|
||||
const FunctionDeclaration& f = s.as<FunctionDeclaration>();
|
||||
this->writeU8(Rehydrator::kFunctionDeclaration_Command);
|
||||
this->writeCommand(Rehydrator::kFunctionDeclaration_Command);
|
||||
this->writeId(&f);
|
||||
this->write(f.modifiers());
|
||||
this->write(f.name());
|
||||
@ -159,7 +160,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
case Symbol::Kind::kSymbolAlias: {
|
||||
const SymbolAlias& alias = s.as<SymbolAlias>();
|
||||
this->writeU8(Rehydrator::kSymbolAlias_Command);
|
||||
this->writeCommand(Rehydrator::kSymbolAlias_Command);
|
||||
this->writeId(&alias);
|
||||
this->write(alias.name());
|
||||
this->write(*alias.origSymbol());
|
||||
@ -167,7 +168,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
case Symbol::Kind::kUnresolvedFunction: {
|
||||
const UnresolvedFunction& f = s.as<UnresolvedFunction>();
|
||||
this->writeU8(Rehydrator::kUnresolvedFunction_Command);
|
||||
this->writeCommand(Rehydrator::kUnresolvedFunction_Command);
|
||||
this->writeId(&f);
|
||||
this->writeU8(f.fFunctions.size());
|
||||
for (const FunctionDeclaration* funcDecl : f.fFunctions) {
|
||||
@ -179,23 +180,23 @@ void Dehydrator::write(const Symbol& s) {
|
||||
const Type& t = s.as<Type>();
|
||||
switch (t.typeKind()) {
|
||||
case Type::TypeKind::kArray:
|
||||
this->writeU8(Rehydrator::kArrayType_Command);
|
||||
this->writeCommand(Rehydrator::kArrayType_Command);
|
||||
this->writeId(&t);
|
||||
this->write(t.componentType());
|
||||
this->writeS8(t.columns());
|
||||
break;
|
||||
case Type::TypeKind::kEnum:
|
||||
this->writeU8(Rehydrator::kEnumType_Command);
|
||||
this->writeCommand(Rehydrator::kEnumType_Command);
|
||||
this->writeId(&t);
|
||||
this->write(t.name());
|
||||
break;
|
||||
case Type::TypeKind::kNullable:
|
||||
this->writeU8(Rehydrator::kNullableType_Command);
|
||||
this->writeCommand(Rehydrator::kNullableType_Command);
|
||||
this->writeId(&t);
|
||||
this->write(t.componentType());
|
||||
break;
|
||||
case Type::TypeKind::kStruct:
|
||||
this->writeU8(Rehydrator::kStructType_Command);
|
||||
this->writeCommand(Rehydrator::kStructType_Command);
|
||||
this->writeId(&t);
|
||||
this->write(t.name());
|
||||
this->writeU8(t.fields().size());
|
||||
@ -206,7 +207,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this->writeU8(Rehydrator::kSystemType_Command);
|
||||
this->writeCommand(Rehydrator::kSystemType_Command);
|
||||
this->writeId(&t);
|
||||
this->write(t.name());
|
||||
}
|
||||
@ -214,7 +215,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
case Symbol::Kind::kVariable: {
|
||||
const Variable& v = s.as<Variable>();
|
||||
this->writeU8(Rehydrator::kVariable_Command);
|
||||
this->writeCommand(Rehydrator::kVariable_Command);
|
||||
this->writeId(&v);
|
||||
this->write(v.modifiers());
|
||||
this->write(v.name());
|
||||
@ -224,7 +225,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
case Symbol::Kind::kField: {
|
||||
const Field& f = s.as<Field>();
|
||||
this->writeU8(Rehydrator::kField_Command);
|
||||
this->writeCommand(Rehydrator::kField_Command);
|
||||
this->writeU16(this->symbolId(&f.owner()));
|
||||
this->writeU8(f.fieldIndex());
|
||||
break;
|
||||
@ -236,7 +237,7 @@ void Dehydrator::write(const Symbol& s) {
|
||||
}
|
||||
|
||||
void Dehydrator::write(const SymbolTable& symbols) {
|
||||
this->writeU8(Rehydrator::kSymbolTable_Command);
|
||||
this->writeCommand(Rehydrator::kSymbolTable_Command);
|
||||
this->writeU16(symbols.fOwnedSymbols.size());
|
||||
for (const std::unique_ptr<const Symbol>& s : symbols.fOwnedSymbols) {
|
||||
this->write(*s);
|
||||
@ -250,6 +251,7 @@ void Dehydrator::write(const SymbolTable& symbols) {
|
||||
bool found = false;
|
||||
for (size_t i = 0; i < symbols.fOwnedSymbols.size(); ++i) {
|
||||
if (symbols.fOwnedSymbols[i].get() == p.second) {
|
||||
fCommandBreaks.add(fBody.bytesWritten());
|
||||
this->writeU16(i);
|
||||
found = true;
|
||||
break;
|
||||
@ -264,7 +266,7 @@ void Dehydrator::write(const Expression* e) {
|
||||
switch (e->kind()) {
|
||||
case Expression::Kind::kBinary: {
|
||||
const BinaryExpression& b = e->as<BinaryExpression>();
|
||||
this->writeU8(Rehydrator::kBinary_Command);
|
||||
this->writeCommand(Rehydrator::kBinary_Command);
|
||||
this->write(&b.left());
|
||||
this->writeU8((int) b.getOperator());
|
||||
this->write(&b.right());
|
||||
@ -273,13 +275,13 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kBoolLiteral: {
|
||||
const BoolLiteral& b = e->as<BoolLiteral>();
|
||||
this->writeU8(Rehydrator::kBoolLiteral_Command);
|
||||
this->writeCommand(Rehydrator::kBoolLiteral_Command);
|
||||
this->writeU8(b.value());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kConstructor: {
|
||||
const Constructor& c = e->as<Constructor>();
|
||||
this->writeU8(Rehydrator::kConstructor_Command);
|
||||
this->writeCommand(Rehydrator::kConstructor_Command);
|
||||
this->write(c.type());
|
||||
this->writeU8(c.arguments().size());
|
||||
for (const auto& a : c.arguments()) {
|
||||
@ -289,13 +291,11 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kExternalFunctionCall:
|
||||
case Expression::Kind::kExternalValue:
|
||||
// not implemented; doesn't seem like we'll ever need them from within an include
|
||||
// file
|
||||
SkASSERT(false);
|
||||
SkDEBUGFAIL("unimplemented--not expected to be used from within an include file");
|
||||
break;
|
||||
case Expression::Kind::kFieldAccess: {
|
||||
const FieldAccess& f = e->as<FieldAccess>();
|
||||
this->writeU8(Rehydrator::kFieldAccess_Command);
|
||||
this->writeCommand(Rehydrator::kFieldAccess_Command);
|
||||
this->write(f.fBase.get());
|
||||
this->writeU8(f.fFieldIndex);
|
||||
this->writeU8(f.fOwnerKind);
|
||||
@ -303,7 +303,7 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kFloatLiteral: {
|
||||
const FloatLiteral& f = e->as<FloatLiteral>();
|
||||
this->writeU8(Rehydrator::kFloatLiteral_Command);
|
||||
this->writeCommand(Rehydrator::kFloatLiteral_Command);
|
||||
FloatIntUnion u;
|
||||
u.fFloat = f.value();
|
||||
this->writeS32(u.fInt);
|
||||
@ -311,7 +311,7 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kFunctionCall: {
|
||||
const FunctionCall& f = e->as<FunctionCall>();
|
||||
this->writeU8(Rehydrator::kFunctionCall_Command);
|
||||
this->writeCommand(Rehydrator::kFunctionCall_Command);
|
||||
this->write(f.type());
|
||||
this->writeId(&f.function());
|
||||
this->writeU8(f.arguments().size());
|
||||
@ -322,44 +322,44 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kIndex: {
|
||||
const IndexExpression& i = e->as<IndexExpression>();
|
||||
this->writeU8(Rehydrator::kIndex_Command);
|
||||
this->writeCommand(Rehydrator::kIndex_Command);
|
||||
this->write(i.fBase.get());
|
||||
this->write(i.fIndex.get());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kIntLiteral: {
|
||||
const IntLiteral& i = e->as<IntLiteral>();
|
||||
this->writeU8(Rehydrator::kIntLiteral_Command);
|
||||
this->writeCommand(Rehydrator::kIntLiteral_Command);
|
||||
this->writeS32(i.value());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kNullLiteral:
|
||||
this->writeU8(Rehydrator::kNullLiteral_Command);
|
||||
this->writeCommand(Rehydrator::kNullLiteral_Command);
|
||||
break;
|
||||
case Expression::Kind::kPostfix: {
|
||||
const PostfixExpression& p = e->as<PostfixExpression>();
|
||||
this->writeU8(Rehydrator::kPostfix_Command);
|
||||
this->writeCommand(Rehydrator::kPostfix_Command);
|
||||
this->writeU8((int) p.fOperator);
|
||||
this->write(p.fOperand.get());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kPrefix: {
|
||||
const PrefixExpression& p = e->as<PrefixExpression>();
|
||||
this->writeU8(Rehydrator::kPrefix_Command);
|
||||
this->writeCommand(Rehydrator::kPrefix_Command);
|
||||
this->writeU8((int) p.fOperator);
|
||||
this->write(p.fOperand.get());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kSetting: {
|
||||
const Setting& s = e->as<Setting>();
|
||||
this->writeU8(Rehydrator::kSetting_Command);
|
||||
this->writeCommand(Rehydrator::kSetting_Command);
|
||||
this->write(s.name());
|
||||
this->write(s.type());
|
||||
break;
|
||||
}
|
||||
case Expression::Kind::kSwizzle: {
|
||||
const Swizzle& s = e->as<Swizzle>();
|
||||
this->writeU8(Rehydrator::kSwizzle_Command);
|
||||
this->writeCommand(Rehydrator::kSwizzle_Command);
|
||||
this->write(s.fBase.get());
|
||||
this->writeU8(s.fComponents.size());
|
||||
for (int c : s.fComponents) {
|
||||
@ -369,7 +369,7 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kTernary: {
|
||||
const TernaryExpression& t = e->as<TernaryExpression>();
|
||||
this->writeU8(Rehydrator::kTernary_Command);
|
||||
this->writeCommand(Rehydrator::kTernary_Command);
|
||||
this->write(t.test().get());
|
||||
this->write(t.ifTrue().get());
|
||||
this->write(t.ifFalse().get());
|
||||
@ -377,7 +377,7 @@ void Dehydrator::write(const Expression* e) {
|
||||
}
|
||||
case Expression::Kind::kVariableReference: {
|
||||
const VariableReference& v = e->as<VariableReference>();
|
||||
this->writeU8(Rehydrator::kVariableReference_Command);
|
||||
this->writeCommand(Rehydrator::kVariableReference_Command);
|
||||
this->writeId(v.variable());
|
||||
this->writeU8(v.refKind());
|
||||
break;
|
||||
@ -385,12 +385,11 @@ void Dehydrator::write(const Expression* e) {
|
||||
case Expression::Kind::kFunctionReference:
|
||||
case Expression::Kind::kTypeReference:
|
||||
case Expression::Kind::kDefined:
|
||||
// shouldn't appear in finished code
|
||||
SkASSERT(false);
|
||||
SkDEBUGFAIL("this expression shouldn't appear in finished code");
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
this->writeU8(Rehydrator::kVoid_Command);
|
||||
this->writeCommand(Rehydrator::kVoid_Command);
|
||||
}
|
||||
}
|
||||
|
||||
@ -399,7 +398,7 @@ void Dehydrator::write(const Statement* s) {
|
||||
switch (s->kind()) {
|
||||
case Statement::Kind::kBlock: {
|
||||
const Block& b = s->as<Block>();
|
||||
this->writeU8(Rehydrator::kBlock_Command);
|
||||
this->writeCommand(Rehydrator::kBlock_Command);
|
||||
AutoDehydratorSymbolTable symbols(this, b.symbolTable());
|
||||
this->writeU8(b.children().size());
|
||||
for (const std::unique_ptr<Statement>& blockStmt : b.children()) {
|
||||
@ -409,30 +408,30 @@ void Dehydrator::write(const Statement* s) {
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kBreak:
|
||||
this->writeU8(Rehydrator::kBreak_Command);
|
||||
this->writeCommand(Rehydrator::kBreak_Command);
|
||||
break;
|
||||
case Statement::Kind::kContinue:
|
||||
this->writeU8(Rehydrator::kContinue_Command);
|
||||
this->writeCommand(Rehydrator::kContinue_Command);
|
||||
break;
|
||||
case Statement::Kind::kDiscard:
|
||||
this->writeU8(Rehydrator::kDiscard_Command);
|
||||
this->writeCommand(Rehydrator::kDiscard_Command);
|
||||
break;
|
||||
case Statement::Kind::kDo: {
|
||||
const DoStatement& d = s->as<DoStatement>();
|
||||
this->writeU8(Rehydrator::kDo_Command);
|
||||
this->writeCommand(Rehydrator::kDo_Command);
|
||||
this->write(d.statement().get());
|
||||
this->write(d.test().get());
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kExpression: {
|
||||
const ExpressionStatement& e = s->as<ExpressionStatement>();
|
||||
this->writeU8(Rehydrator::kExpressionStatement_Command);
|
||||
this->writeCommand(Rehydrator::kExpressionStatement_Command);
|
||||
this->write(e.expression().get());
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kFor: {
|
||||
const ForStatement& f = s->as<ForStatement>();
|
||||
this->writeU8(Rehydrator::kFor_Command);
|
||||
this->writeCommand(Rehydrator::kFor_Command);
|
||||
this->write(f.initializer().get());
|
||||
this->write(f.test().get());
|
||||
this->write(f.next().get());
|
||||
@ -442,7 +441,7 @@ void Dehydrator::write(const Statement* s) {
|
||||
}
|
||||
case Statement::Kind::kIf: {
|
||||
const IfStatement& i = s->as<IfStatement>();
|
||||
this->writeU8(Rehydrator::kIf_Command);
|
||||
this->writeCommand(Rehydrator::kIf_Command);
|
||||
this->writeU8(i.isStatic());
|
||||
this->write(i.test().get());
|
||||
this->write(i.ifTrue().get());
|
||||
@ -451,22 +450,22 @@ void Dehydrator::write(const Statement* s) {
|
||||
}
|
||||
case Statement::Kind::kInlineMarker: {
|
||||
const InlineMarker& i = s->as<InlineMarker>();
|
||||
this->writeU8(Rehydrator::kInlineMarker_Command);
|
||||
this->writeCommand(Rehydrator::kInlineMarker_Command);
|
||||
this->writeId(i.fFuncDecl);
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kNop:
|
||||
SkASSERT(false);
|
||||
SkDEBUGFAIL("unexpected--nop statement in finished code");
|
||||
break;
|
||||
case Statement::Kind::kReturn: {
|
||||
const ReturnStatement& r = s->as<ReturnStatement>();
|
||||
this->writeU8(Rehydrator::kReturn_Command);
|
||||
this->writeCommand(Rehydrator::kReturn_Command);
|
||||
this->write(r.fExpression.get());
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kSwitch: {
|
||||
const SwitchStatement& ss = s->as<SwitchStatement>();
|
||||
this->writeU8(Rehydrator::kSwitch_Command);
|
||||
this->writeCommand(Rehydrator::kSwitch_Command);
|
||||
this->writeU8(ss.fIsStatic);
|
||||
AutoDehydratorSymbolTable symbols(this, ss.fSymbols);
|
||||
this->write(ss.fValue.get());
|
||||
@ -481,11 +480,11 @@ void Dehydrator::write(const Statement* s) {
|
||||
break;
|
||||
}
|
||||
case Statement::Kind::kSwitchCase:
|
||||
SkASSERT(false);
|
||||
SkDEBUGFAIL("SwitchCase statements shouldn't appear here");
|
||||
break;
|
||||
case Statement::Kind::kVarDeclaration: {
|
||||
const VarDeclaration& v = s->as<VarDeclaration>();
|
||||
this->writeU8(Rehydrator::kVarDeclaration_Command);
|
||||
this->writeCommand(Rehydrator::kVarDeclaration_Command);
|
||||
this->writeU16(this->symbolId(v.fVar));
|
||||
this->write(v.fBaseType);
|
||||
this->writeU8(v.fSizes.size());
|
||||
@ -497,14 +496,14 @@ void Dehydrator::write(const Statement* s) {
|
||||
}
|
||||
case Statement::Kind::kWhile: {
|
||||
const WhileStatement& w = s->as<WhileStatement>();
|
||||
this->writeU8(Rehydrator::kWhile_Command);
|
||||
this->writeCommand(Rehydrator::kWhile_Command);
|
||||
this->write(w.fTest.get());
|
||||
this->write(w.fStatement.get());
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
this->writeU8(Rehydrator::kVoid_Command);
|
||||
this->writeCommand(Rehydrator::kVoid_Command);
|
||||
}
|
||||
}
|
||||
|
||||
@ -512,7 +511,7 @@ void Dehydrator::write(const ProgramElement& e) {
|
||||
switch (e.kind()) {
|
||||
case ProgramElement::Kind::kEnum: {
|
||||
const Enum& en = e.as<Enum>();
|
||||
this->writeU8(Rehydrator::kEnum_Command);
|
||||
this->writeCommand(Rehydrator::kEnum_Command);
|
||||
this->write(en.typeName());
|
||||
AutoDehydratorSymbolTable symbols(this, en.symbols());
|
||||
for (const std::unique_ptr<const Symbol>& s : en.symbols()->fOwnedSymbols) {
|
||||
@ -529,7 +528,7 @@ void Dehydrator::write(const ProgramElement& e) {
|
||||
break;
|
||||
case ProgramElement::Kind::kFunction: {
|
||||
const FunctionDefinition& f = e.as<FunctionDefinition>();
|
||||
this->writeU8(Rehydrator::kFunctionDefinition_Command);
|
||||
this->writeCommand(Rehydrator::kFunctionDefinition_Command);
|
||||
this->writeU16(this->symbolId(&f.fDeclaration));
|
||||
this->write(f.fBody.get());
|
||||
this->writeU8(f.fReferencedIntrinsics.size());
|
||||
@ -544,7 +543,7 @@ void Dehydrator::write(const ProgramElement& e) {
|
||||
}
|
||||
case ProgramElement::Kind::kInterfaceBlock: {
|
||||
const InterfaceBlock& i = e.as<InterfaceBlock>();
|
||||
this->writeU8(Rehydrator::kInterfaceBlock_Command);
|
||||
this->writeCommand(Rehydrator::kInterfaceBlock_Command);
|
||||
this->write(*i.fVariable);
|
||||
this->write(i.fTypeName);
|
||||
this->write(i.fInstanceName);
|
||||
@ -562,7 +561,7 @@ void Dehydrator::write(const ProgramElement& e) {
|
||||
break;
|
||||
case ProgramElement::Kind::kGlobalVar: {
|
||||
const GlobalVarDeclaration& v = e.as<GlobalVarDeclaration>();
|
||||
this->writeU8(Rehydrator::kVarDeclarations_Command);
|
||||
this->writeCommand(Rehydrator::kVarDeclarations_Command);
|
||||
this->write(v.fDecl.get());
|
||||
break;
|
||||
}
|
||||
@ -570,7 +569,7 @@ void Dehydrator::write(const ProgramElement& e) {
|
||||
}
|
||||
|
||||
void Dehydrator::write(const std::vector<std::unique_ptr<ProgramElement>>& elements) {
|
||||
this->writeU8(Rehydrator::kElements_Command);
|
||||
this->writeCommand(Rehydrator::kElements_Command);
|
||||
this->writeU8(elements.size());
|
||||
for (const auto& e : elements) {
|
||||
this->write(*e);
|
||||
@ -578,9 +577,24 @@ void Dehydrator::write(const std::vector<std::unique_ptr<ProgramElement>>& eleme
|
||||
}
|
||||
|
||||
void Dehydrator::finish(OutputStream& out) {
|
||||
String stringBuffer = fStringBuffer.str();
|
||||
String commandBuffer = fBody.str();
|
||||
|
||||
out.write16(fStringBuffer.str().size());
|
||||
out.writeString(fStringBuffer.str());
|
||||
out.writeString(fBody.str());
|
||||
fStringBufferStart = 2;
|
||||
out.writeString(stringBuffer);
|
||||
fCommandStart = fStringBufferStart + stringBuffer.size();
|
||||
out.writeString(commandBuffer);
|
||||
}
|
||||
|
||||
const char* Dehydrator::prefixAtOffset(size_t byte) {
|
||||
if (byte >= fCommandStart) {
|
||||
return fCommandBreaks.contains(byte - fCommandStart) ? "\n" : "";
|
||||
}
|
||||
if (byte >= fStringBufferStart) {
|
||||
return fStringBreaks.contains(byte - fStringBufferStart) ? "\n" : "";
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -10,6 +10,7 @@
|
||||
|
||||
#ifdef SKSL_STANDALONE
|
||||
|
||||
#include "include/private/SkTHash.h"
|
||||
#include "src/sksl/SkSLOutputStream.h"
|
||||
#include "src/sksl/SkSLStringStream.h"
|
||||
#include "src/sksl/ir/SkSLModifiers.h"
|
||||
@ -49,12 +50,20 @@ public:
|
||||
|
||||
void finish(OutputStream& out);
|
||||
|
||||
// Inserts line breaks at meaningful offsets.
|
||||
const char* prefixAtOffset(size_t byte);
|
||||
|
||||
private:
|
||||
void writeS8(int32_t i) {
|
||||
SkASSERT(i >= -128 && i <= 127);
|
||||
fBody.write8(i);
|
||||
}
|
||||
|
||||
void writeCommand(int32_t c) {
|
||||
fCommandBreaks.add(fBody.bytesWritten());
|
||||
fBody.write8(c);
|
||||
}
|
||||
|
||||
void writeU8(int32_t i) {
|
||||
SkASSERT(i >= 0 && i <= 255);
|
||||
fBody.write8(i);
|
||||
@ -118,6 +127,10 @@ private:
|
||||
std::unordered_map<String, int> fStrings;
|
||||
|
||||
std::vector<std::unordered_map<const Symbol*, int>> fSymbolMap;
|
||||
SkTHashSet<size_t> fStringBreaks;
|
||||
SkTHashSet<size_t> fCommandBreaks;
|
||||
size_t fStringBufferStart;
|
||||
size_t fCommandStart;
|
||||
|
||||
friend class AutoDehydratorSymbolTable;
|
||||
};
|
||||
|
@ -332,13 +332,13 @@ int main(int argc, const char** argv) {
|
||||
SkSL::StringStream buffer;
|
||||
dehydrator.finish(buffer);
|
||||
const SkSL::String& data = buffer.str();
|
||||
out.printf("static constexpr size_t SKSL_INCLUDE_%s_LENGTH = %d;\n", baseName.c_str(),
|
||||
(int) data.length());
|
||||
out.printf("static uint8_t SKSL_INCLUDE_%s[%d] = {", baseName.c_str(), (int) data.length());
|
||||
out.printf("static uint8_t SKSL_INCLUDE_%s[] = {", baseName.c_str());
|
||||
for (size_t i = 0; i < data.length(); ++i) {
|
||||
out.printf("%d,", (uint8_t) data[i]);
|
||||
out.printf("%s%d,", dehydrator.prefixAtOffset(i), uint8_t(data[i]));
|
||||
}
|
||||
out.printf("};\n");
|
||||
out.printf("static constexpr size_t SKSL_INCLUDE_%s_LENGTH = sizeof(SKSL_INCLUDE_%s);\n",
|
||||
baseName.c_str(), baseName.c_str());
|
||||
if (!out.close()) {
|
||||
printf("error writing '%s'\n", argv[2]);
|
||||
exit(4);
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
namespace SkSL {
|
||||
|
||||
void OutputStream::writeString(String s) {
|
||||
void OutputStream::writeString(const String& s) {
|
||||
this->write(s.c_str(), s.size());
|
||||
}
|
||||
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
|
||||
virtual void write(const void* s, size_t size) = 0;
|
||||
|
||||
void writeString(String s);
|
||||
void writeString(const String& s);
|
||||
|
||||
void printf(const char format[], ...) SKSL_PRINTF_LIKE(2, 3);
|
||||
|
||||
|
@ -29,6 +29,10 @@ public:
|
||||
fBuffer.append((const char*) s, size);
|
||||
}
|
||||
|
||||
size_t bytesWritten() const {
|
||||
return fBuffer.size();
|
||||
}
|
||||
|
||||
const String& str() const {
|
||||
return fBuffer;
|
||||
}
|
||||
@ -62,6 +66,10 @@ public:
|
||||
fStream.write(s, size);
|
||||
}
|
||||
|
||||
size_t bytesWritten() const {
|
||||
return fStream.bytesWritten();
|
||||
}
|
||||
|
||||
const String& str() const {
|
||||
if (!fString.size()) {
|
||||
sk_sp<SkData> data = fStream.detachAsData();
|
||||
|
@ -1,2 +1,386 @@
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_fp_LENGTH = 1545;
|
||||
static uint8_t SKSL_INCLUDE_sksl_fp[1545] = {98,1,14,71,114,67,108,105,112,69,100,103,101,84,121,112,101,12,80,77,67,111,110,118,101,114,115,105,111,110,12,115,107,95,70,114,97,103,67,111,111,114,100,6,102,108,111,97,116,52,3,105,110,116,13,115,107,95,83,97,109,112,108,101,77,97,115,107,15,103,108,95,76,97,115,116,70,114,97,103,68,97,116,97,16,103,108,95,76,97,115,116,70,114,97,103,67,111,108,111,114,5,104,97,108,102,52,19,103,108,95,76,97,115,116,70,114,97,103,67,111,108,111,114,65,82,77,24,103,108,95,83,101,99,111,110,100,97,114,121,70,114,97,103,67,111,108,111,114,69,88,84,11,115,107,95,79,117,116,67,111,108,111,114,8,115,107,95,87,105,100,116,104,4,104,97,108,102,9,115,107,95,72,101,105,103,104,116,2,102,112,17,102,114,97,103,109,101,110,116,80,114,111,99,101,115,115,111,114,6,115,97,109,112,108,101,9,116,114,97,110,115,102,111,114,109,8,102,108,111,97,116,51,120,51,6,99,111,111,114,100,115,6,102,108,111,97,116,50,5,105,110,112,117,116,9,116,114,97,110,115,102,114,111,109,7,107,70,105,108,108,66,87,7,107,70,105,108,108,65,65,14,107,73,110,118,101,114,115,101,70,105,108,108,66,87,14,107,73,110,118,101,114,115,101,70,105,108,108,65,65,5,107,76,97,115,116,9,107,84,111,80,114,101,109,117,108,11,107,84,111,85,110,112,114,101,109,117,108,16,107,80,77,67,111,110,118,101,114,115,105,111,110,67,110,116,42,68,0,14,1,0,2,0,14,2,0,17,0,46,3,0,29,5,15,0,2,30,0,43,4,0,43,0,0,0,5,0,43,6,0,50,0,1,46,7,0,29,5,20,0,4,54,0,40,5,0,0,0,8,0,40,4,0,1,46,9,0,29,5,15,39,0,68,0,40,8,0,0,46,10,0,29,5,15,39,0,84,0,43,11,0,101,0,0,46,12,0,29,5,15,39,0,107,0,40,11,0,0,46,13,0,29,5,15,39,0,127,0,40,11,0,0,46,14,0,29,5,20,39,4,152,0,40,11,0,0,46,15,0,29,5,27,39,0,164,0,43,16,0,173,0,0,46,17,0,29,5,28,39,0,178,0,40,16,0,0,46,18,0,9,188,0,43,19,0,191,0,3,22,20,0,9,209,0,1,18,0,40,11,0,46,21,0,9,188,0,40,19,0,3,46,22,0,9,216,0,43,23,0,226,0,3,45,24,0,2,40,20,0,22,25,0,9,209,0,2,21,0,22,0,40,11,0,40,25,0,46,26,0,9,188,0,40,19,0,3,46,27,0,9,235,0,43,28,0,242,0,3,45,29,0,3,40,20,0,40,25,0,22,30,0,9,209,0,2,26,0,27,0,40,11,0,40,30,0,46,31,0,9,188,0,40,19,0,3,46,32,0,9,249,0,40,11,0,3,45,33,0,4,40,20,0,40,25,0,40,30,0,22,34,0,9,209,0,2,31,0,32,0,40,11,0,40,34,0,46,35,0,9,188,0,40,19,0,3,46,36,0,9,249,0,40,11,0,3,46,37,0,9,216,0,40,23,0,3,45,38,0,5,40,20,0,40,25,0,40,30,0,40,34,0,22,39,0,9,209,0,3,35,0,36,0,37,0,40,11,0,40,39,0,46,40,0,9,188,0,40,19,0,3,46,41,0,9,249,0,40,11,0,3,46,42,0,9,235,0,40,28,0,3,45,43,0,6,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,22,44,0,9,209,0,3,40,0,41,0,42,0,40,11,0,40,44,0,31,45,0,40,19,0,46,46,0,9,188,0,40,45,0,3,45,47,0,7,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,22,48,0,9,209,0,1,46,0,40,11,0,40,48,0,31,49,0,40,19,0,46,50,0,9,188,0,40,49,0,3,46,51,0,9,216,0,40,23,0,3,45,52,0,8,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,40,48,0,22,53,0,9,209,0,2,50,0,51,0,40,11,0,40,53,0,31,54,0,40,19,0,46,55,0,9,188,0,40,54,0,3,46,56,0,9,235,0,40,28,0,3,45,57,0,9,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,40,48,0,40,53,0,22,58,0,9,209,0,2,55,0,56,0,40,11,0,40,58,0,31,59,0,40,19,0,46,60,0,9,188,0,40,59,0,3,46,61,0,9,249,0,40,11,0,3,45,62,0,10,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,40,48,0,40,53,0,40,58,0,22,63,0,9,209,0,2,60,0,61,0,40,11,0,40,63,0,31,64,0,40,19,0,46,65,0,9,188,0,40,64,0,3,46,66,0,9,249,0,40,11,0,3,46,67,0,9,255,0,40,23,0,3,45,68,0,11,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,40,48,0,40,53,0,40,58,0,40,63,0,22,69,0,9,209,0,3,65,0,66,0,67,0,40,11,0,40,69,0,31,70,0,40,19,0,46,71,0,9,188,0,40,70,0,3,46,72,0,9,249,0,40,11,0,3,46,73,0,9,235,0,40,28,0,3,45,74,0,12,40,20,0,40,25,0,40,30,0,40,34,0,40,39,0,40,44,0,40,48,0,40,53,0,40,58,0,40,63,0,40,69,0,22,75,0,9,209,0,3,71,0,72,0,73,0,40,11,0,40,75,0,12,0,0,0,1,0,7,0,8,0,6,0,9,0,66,0,2,0,12,0,10,0,4,0,11,0,12,11,13,2,0,42,5,0,46,76,0,29,8,1,9,1,40,1,0,0,46,77,0,29,8,1,17,1,40,1,0,0,46,78,0,29,8,1,25,1,40,1,0,0,46,79,0,29,8,1,40,1,40,1,0,0,46,80,0,29,8,1,55,1,40,1,0,0,5,0,1,0,0,0,3,0,2,0,4,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,13,17,0,42,3,0,46,81,0,29,8,1,61,1,40,2,0,0,46,82,0,29,8,1,71,1,40,2,0,0,46,83,0,29,8,1,83,1,40,2,0,0,3,0,2,0,0,0,1,0,0,0,0,0,1,0,0,0,2,0,0,0,48,47,3,0,40,4,0,0,50,48,47,7,0,40,6,0,1,27,1,0,0,0,50,48,47,9,0,40,4,0,1,27,1,0,0,0,50,48,47,10,0,40,11,0,0,50,48,47,12,0,40,11,0,0,50,48,47,13,0,40,11,0,0,50,48,47,14,0,40,11,0,0,50,48,47,15,0,40,16,0,0,50,48,47,17,0,40,16,0,0,50,};
|
||||
static uint8_t SKSL_INCLUDE_sksl_fp[] = {98,1,
|
||||
14,71,114,67,108,105,112,69,100,103,101,84,121,112,101,
|
||||
12,80,77,67,111,110,118,101,114,115,105,111,110,
|
||||
12,115,107,95,70,114,97,103,67,111,111,114,100,
|
||||
6,102,108,111,97,116,52,
|
||||
3,105,110,116,
|
||||
13,115,107,95,83,97,109,112,108,101,77,97,115,107,
|
||||
15,103,108,95,76,97,115,116,70,114,97,103,68,97,116,97,
|
||||
16,103,108,95,76,97,115,116,70,114,97,103,67,111,108,111,114,
|
||||
5,104,97,108,102,52,
|
||||
19,103,108,95,76,97,115,116,70,114,97,103,67,111,108,111,114,65,82,77,
|
||||
24,103,108,95,83,101,99,111,110,100,97,114,121,70,114,97,103,67,111,108,111,114,69,88,84,
|
||||
11,115,107,95,79,117,116,67,111,108,111,114,
|
||||
8,115,107,95,87,105,100,116,104,
|
||||
4,104,97,108,102,
|
||||
9,115,107,95,72,101,105,103,104,116,
|
||||
2,102,112,
|
||||
17,102,114,97,103,109,101,110,116,80,114,111,99,101,115,115,111,114,
|
||||
6,115,97,109,112,108,101,
|
||||
9,116,114,97,110,115,102,111,114,109,
|
||||
8,102,108,111,97,116,51,120,51,
|
||||
6,99,111,111,114,100,115,
|
||||
6,102,108,111,97,116,50,
|
||||
5,105,110,112,117,116,
|
||||
9,116,114,97,110,115,102,114,111,109,
|
||||
7,107,70,105,108,108,66,87,
|
||||
7,107,70,105,108,108,65,65,
|
||||
14,107,73,110,118,101,114,115,101,70,105,108,108,66,87,
|
||||
14,107,73,110,118,101,114,115,101,70,105,108,108,65,65,
|
||||
5,107,76,97,115,116,
|
||||
9,107,84,111,80,114,101,109,117,108,
|
||||
11,107,84,111,85,110,112,114,101,109,117,108,
|
||||
16,107,80,77,67,111,110,118,101,114,115,105,111,110,67,110,116,
|
||||
42,68,0,
|
||||
14,1,0,2,0,
|
||||
14,2,0,17,0,
|
||||
46,3,0,
|
||||
29,
|
||||
5,15,0,2,30,0,
|
||||
43,4,0,43,0,0,
|
||||
0,5,0,
|
||||
43,6,0,50,0,1,
|
||||
46,7,0,
|
||||
29,
|
||||
5,20,0,4,54,0,
|
||||
40,5,0,0,
|
||||
0,8,0,
|
||||
40,4,0,1,
|
||||
46,9,0,
|
||||
29,
|
||||
5,15,39,0,68,0,
|
||||
40,8,0,0,
|
||||
46,10,0,
|
||||
29,
|
||||
5,15,39,0,84,0,
|
||||
43,11,0,101,0,0,
|
||||
46,12,0,
|
||||
29,
|
||||
5,15,39,0,107,0,
|
||||
40,11,0,0,
|
||||
46,13,0,
|
||||
29,
|
||||
5,15,39,0,127,0,
|
||||
40,11,0,0,
|
||||
46,14,0,
|
||||
29,
|
||||
5,20,39,4,152,0,
|
||||
40,11,0,0,
|
||||
46,15,0,
|
||||
29,
|
||||
5,27,39,0,164,0,
|
||||
43,16,0,173,0,0,
|
||||
46,17,0,
|
||||
29,
|
||||
5,28,39,0,178,0,
|
||||
40,16,0,0,
|
||||
46,18,0,
|
||||
9,188,0,
|
||||
43,19,0,191,0,3,
|
||||
22,20,0,
|
||||
9,209,0,1,18,0,
|
||||
40,11,0,
|
||||
46,21,0,
|
||||
9,188,0,
|
||||
40,19,0,3,
|
||||
46,22,0,
|
||||
9,216,0,
|
||||
43,23,0,226,0,3,
|
||||
45,24,0,2,
|
||||
40,20,0,
|
||||
22,25,0,
|
||||
9,209,0,2,21,0,22,0,
|
||||
40,11,0,
|
||||
40,25,0,
|
||||
46,26,0,
|
||||
9,188,0,
|
||||
40,19,0,3,
|
||||
46,27,0,
|
||||
9,235,0,
|
||||
43,28,0,242,0,3,
|
||||
45,29,0,3,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
22,30,0,
|
||||
9,209,0,2,26,0,27,0,
|
||||
40,11,0,
|
||||
40,30,0,
|
||||
46,31,0,
|
||||
9,188,0,
|
||||
40,19,0,3,
|
||||
46,32,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
45,33,0,4,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
22,34,0,
|
||||
9,209,0,2,31,0,32,0,
|
||||
40,11,0,
|
||||
40,34,0,
|
||||
46,35,0,
|
||||
9,188,0,
|
||||
40,19,0,3,
|
||||
46,36,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
46,37,0,
|
||||
9,216,0,
|
||||
40,23,0,3,
|
||||
45,38,0,5,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
22,39,0,
|
||||
9,209,0,3,35,0,36,0,37,0,
|
||||
40,11,0,
|
||||
40,39,0,
|
||||
46,40,0,
|
||||
9,188,0,
|
||||
40,19,0,3,
|
||||
46,41,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
46,42,0,
|
||||
9,235,0,
|
||||
40,28,0,3,
|
||||
45,43,0,6,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
22,44,0,
|
||||
9,209,0,3,40,0,41,0,42,0,
|
||||
40,11,0,
|
||||
40,44,0,
|
||||
31,45,0,
|
||||
40,19,0,
|
||||
46,46,0,
|
||||
9,188,0,
|
||||
40,45,0,3,
|
||||
45,47,0,7,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
22,48,0,
|
||||
9,209,0,1,46,0,
|
||||
40,11,0,
|
||||
40,48,0,
|
||||
31,49,0,
|
||||
40,19,0,
|
||||
46,50,0,
|
||||
9,188,0,
|
||||
40,49,0,3,
|
||||
46,51,0,
|
||||
9,216,0,
|
||||
40,23,0,3,
|
||||
45,52,0,8,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
40,48,0,
|
||||
22,53,0,
|
||||
9,209,0,2,50,0,51,0,
|
||||
40,11,0,
|
||||
40,53,0,
|
||||
31,54,0,
|
||||
40,19,0,
|
||||
46,55,0,
|
||||
9,188,0,
|
||||
40,54,0,3,
|
||||
46,56,0,
|
||||
9,235,0,
|
||||
40,28,0,3,
|
||||
45,57,0,9,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
40,48,0,
|
||||
40,53,0,
|
||||
22,58,0,
|
||||
9,209,0,2,55,0,56,0,
|
||||
40,11,0,
|
||||
40,58,0,
|
||||
31,59,0,
|
||||
40,19,0,
|
||||
46,60,0,
|
||||
9,188,0,
|
||||
40,59,0,3,
|
||||
46,61,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
45,62,0,10,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
40,48,0,
|
||||
40,53,0,
|
||||
40,58,0,
|
||||
22,63,0,
|
||||
9,209,0,2,60,0,61,0,
|
||||
40,11,0,
|
||||
40,63,0,
|
||||
31,64,0,
|
||||
40,19,0,
|
||||
46,65,0,
|
||||
9,188,0,
|
||||
40,64,0,3,
|
||||
46,66,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
46,67,0,
|
||||
9,255,0,
|
||||
40,23,0,3,
|
||||
45,68,0,11,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
40,48,0,
|
||||
40,53,0,
|
||||
40,58,0,
|
||||
40,63,0,
|
||||
22,69,0,
|
||||
9,209,0,3,65,0,66,0,67,0,
|
||||
40,11,0,
|
||||
40,69,0,
|
||||
31,70,0,
|
||||
40,19,0,
|
||||
46,71,0,
|
||||
9,188,0,
|
||||
40,70,0,3,
|
||||
46,72,0,
|
||||
9,249,0,
|
||||
40,11,0,3,
|
||||
46,73,0,
|
||||
9,235,0,
|
||||
40,28,0,3,
|
||||
45,74,0,12,
|
||||
40,20,0,
|
||||
40,25,0,
|
||||
40,30,0,
|
||||
40,34,0,
|
||||
40,39,0,
|
||||
40,44,0,
|
||||
40,48,0,
|
||||
40,53,0,
|
||||
40,58,0,
|
||||
40,63,0,
|
||||
40,69,0,
|
||||
22,75,0,
|
||||
9,209,0,3,71,0,72,0,73,0,
|
||||
40,11,0,
|
||||
40,75,0,12,0,
|
||||
0,0,
|
||||
1,0,
|
||||
7,0,
|
||||
8,0,
|
||||
6,0,
|
||||
9,0,
|
||||
66,0,
|
||||
2,0,
|
||||
12,0,
|
||||
10,0,
|
||||
4,0,
|
||||
11,0,
|
||||
12,11,
|
||||
13,2,0,
|
||||
42,5,0,
|
||||
46,76,0,
|
||||
29,
|
||||
8,1,9,1,
|
||||
40,1,0,0,
|
||||
46,77,0,
|
||||
29,
|
||||
8,1,17,1,
|
||||
40,1,0,0,
|
||||
46,78,0,
|
||||
29,
|
||||
8,1,25,1,
|
||||
40,1,0,0,
|
||||
46,79,0,
|
||||
29,
|
||||
8,1,40,1,
|
||||
40,1,0,0,
|
||||
46,80,0,
|
||||
29,
|
||||
8,1,55,1,
|
||||
40,1,0,0,5,0,
|
||||
1,0,
|
||||
0,0,
|
||||
3,0,
|
||||
2,0,
|
||||
4,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,3,0,0,0,
|
||||
13,17,0,
|
||||
42,3,0,
|
||||
46,81,0,
|
||||
29,
|
||||
8,1,61,1,
|
||||
40,2,0,0,
|
||||
46,82,0,
|
||||
29,
|
||||
8,1,71,1,
|
||||
40,2,0,0,
|
||||
46,83,0,
|
||||
29,
|
||||
8,1,83,1,
|
||||
40,2,0,0,3,0,
|
||||
2,0,
|
||||
0,0,
|
||||
1,0,0,0,0,0,1,0,0,0,2,0,0,0,
|
||||
48,
|
||||
47,3,0,
|
||||
40,4,0,0,
|
||||
50,
|
||||
48,
|
||||
47,7,0,
|
||||
40,6,0,1,
|
||||
27,1,0,0,0,
|
||||
50,
|
||||
48,
|
||||
47,9,0,
|
||||
40,4,0,1,
|
||||
27,1,0,0,0,
|
||||
50,
|
||||
48,
|
||||
47,10,0,
|
||||
40,11,0,0,
|
||||
50,
|
||||
48,
|
||||
47,12,0,
|
||||
40,11,0,0,
|
||||
50,
|
||||
48,
|
||||
47,13,0,
|
||||
40,11,0,0,
|
||||
50,
|
||||
48,
|
||||
47,14,0,
|
||||
40,11,0,0,
|
||||
50,
|
||||
48,
|
||||
47,15,0,
|
||||
40,16,0,0,
|
||||
50,
|
||||
48,
|
||||
47,17,0,
|
||||
40,16,0,0,
|
||||
50,};
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_fp_LENGTH = sizeof(SKSL_INCLUDE_sksl_fp);
|
||||
|
@ -1,2 +1,93 @@
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_frag_LENGTH = 393;
|
||||
static uint8_t SKSL_INCLUDE_sksl_frag[393] = {142,0,12,115,107,95,70,114,97,103,67,111,111,114,100,6,102,108,111,97,116,52,12,115,107,95,67,108,111,99,107,119,105,115,101,4,98,111,111,108,3,105,110,116,13,115,107,95,83,97,109,112,108,101,77,97,115,107,24,103,108,95,83,101,99,111,110,100,97,114,121,70,114,97,103,67,111,108,111,114,69,88,84,5,104,97,108,102,52,0,12,115,107,95,70,114,97,103,67,111,108,111,114,16,115,107,95,76,97,115,116,70,114,97,103,67,111,108,111,114,8,115,107,95,87,105,100,116,104,4,104,97,108,102,9,115,107,95,72,101,105,103,104,116,42,9,0,46,1,0,29,5,15,0,2,2,0,43,2,0,15,0,0,46,3,0,29,5,17,0,2,22,0,43,4,0,35,0,0,0,5,0,43,6,0,40,0,1,46,7,0,29,5,20,0,4,44,0,40,5,0,0,46,8,0,29,5,15,39,4,58,0,43,9,0,83,0,0,46,10,0,29,28,0,0,0,0,0,255,255,0,255,17,39,255,255,255,255,255,89,0,89,0,0,0,4,90,0,40,9,0,0,46,11,0,29,5,24,39,0,103,0,40,9,0,0,46,12,0,29,5,27,39,0,120,0,43,13,0,129,0,0,46,14,0,29,5,28,39,0,134,0,40,13,0,0,8,0,4,0,1,0,5,0,0,0,8,0,6,0,3,0,7,0,12,8,48,47,1,0,40,2,0,0,50,48,47,3,0,40,4,0,0,50,48,47,7,0,40,6,0,1,27,1,0,0,0,50,48,47,8,0,40,9,0,0,50,48,47,10,0,40,9,0,0,50,48,47,11,0,40,9,0,0,50,48,47,12,0,40,13,0,0,50,48,47,14,0,40,13,0,0,50,};
|
||||
static uint8_t SKSL_INCLUDE_sksl_frag[] = {142,0,
|
||||
12,115,107,95,70,114,97,103,67,111,111,114,100,
|
||||
6,102,108,111,97,116,52,
|
||||
12,115,107,95,67,108,111,99,107,119,105,115,101,
|
||||
4,98,111,111,108,
|
||||
3,105,110,116,
|
||||
13,115,107,95,83,97,109,112,108,101,77,97,115,107,
|
||||
24,103,108,95,83,101,99,111,110,100,97,114,121,70,114,97,103,67,111,108,111,114,69,88,84,
|
||||
5,104,97,108,102,52,
|
||||
0,
|
||||
12,115,107,95,70,114,97,103,67,111,108,111,114,
|
||||
16,115,107,95,76,97,115,116,70,114,97,103,67,111,108,111,114,
|
||||
8,115,107,95,87,105,100,116,104,
|
||||
4,104,97,108,102,
|
||||
9,115,107,95,72,101,105,103,104,116,
|
||||
42,9,0,
|
||||
46,1,0,
|
||||
29,
|
||||
5,15,0,2,2,0,
|
||||
43,2,0,15,0,0,
|
||||
46,3,0,
|
||||
29,
|
||||
5,17,0,2,22,0,
|
||||
43,4,0,35,0,0,
|
||||
0,5,0,
|
||||
43,6,0,40,0,1,
|
||||
46,7,0,
|
||||
29,
|
||||
5,20,0,4,44,0,
|
||||
40,5,0,0,
|
||||
46,8,0,
|
||||
29,
|
||||
5,15,39,4,58,0,
|
||||
43,9,0,83,0,0,
|
||||
46,10,0,
|
||||
29,
|
||||
28,0,0,0,0,0,255,255,0,255,17,39,255,255,255,255,255,89,0,89,0,0,0,4,90,0,
|
||||
40,9,0,0,
|
||||
46,11,0,
|
||||
29,
|
||||
5,24,39,0,103,0,
|
||||
40,9,0,0,
|
||||
46,12,0,
|
||||
29,
|
||||
5,27,39,0,120,0,
|
||||
43,13,0,129,0,0,
|
||||
46,14,0,
|
||||
29,
|
||||
5,28,39,0,134,0,
|
||||
40,13,0,0,8,0,
|
||||
4,0,
|
||||
1,0,
|
||||
5,0,
|
||||
0,0,
|
||||
8,0,
|
||||
6,0,
|
||||
3,0,
|
||||
7,0,
|
||||
12,8,
|
||||
48,
|
||||
47,1,0,
|
||||
40,2,0,0,
|
||||
50,
|
||||
48,
|
||||
47,3,0,
|
||||
40,4,0,0,
|
||||
50,
|
||||
48,
|
||||
47,7,0,
|
||||
40,6,0,1,
|
||||
27,1,0,0,0,
|
||||
50,
|
||||
48,
|
||||
47,8,0,
|
||||
40,9,0,0,
|
||||
50,
|
||||
48,
|
||||
47,10,0,
|
||||
40,9,0,0,
|
||||
50,
|
||||
48,
|
||||
47,11,0,
|
||||
40,9,0,0,
|
||||
50,
|
||||
48,
|
||||
47,12,0,
|
||||
40,13,0,0,
|
||||
50,
|
||||
48,
|
||||
47,14,0,
|
||||
40,13,0,0,
|
||||
50,};
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_frag_LENGTH = sizeof(SKSL_INCLUDE_sksl_frag);
|
||||
|
@ -1,2 +1,87 @@
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_geom_LENGTH = 401;
|
||||
static uint8_t SKSL_INCLUDE_sksl_geom[401] = {150,0,12,115,107,95,80,101,114,86,101,114,116,101,120,11,115,107,95,80,111,115,105,116,105,111,110,6,102,108,111,97,116,52,12,115,107,95,80,111,105,110,116,83,105,122,101,5,102,108,111,97,116,5,115,107,95,105,110,15,115,107,95,73,110,118,111,99,97,116,105,111,110,73,68,3,105,110,116,6,115,116,114,101,97,109,16,69,109,105,116,83,116,114,101,97,109,86,101,114,116,101,120,4,118,111,105,100,18,69,110,100,83,116,114,101,97,109,80,114,105,109,105,116,105,118,101,10,69,109,105,116,86,101,114,116,101,120,12,69,110,100,80,114,105,109,105,116,105,118,101,0,42,13,0,37,1,0,2,0,2,29,5,0,0,0,15,0,43,2,0,27,0,29,5,1,0,0,34,0,43,3,0,47,0,46,4,0,29,5,18,39,2,53,0,0,5,0,40,1,0,255,0,37,6,0,2,0,2,29,5,0,0,0,15,0,40,2,0,29,5,1,0,0,34,0,40,3,0,46,7,0,29,5,23,39,4,2,0,40,6,0,0,16,7,0,0,16,7,0,1,46,8,0,29,5,8,0,2,59,0,43,9,0,75,0,0,46,10,0,9,79,0,40,9,0,3,22,11,0,30,8,0,16,0,0,86,0,1,10,0,43,12,0,103,0,46,13,0,9,79,0,40,9,0,3,22,14,0,30,8,0,16,0,0,108,0,1,13,0,40,12,0,22,15,0,30,8,0,16,0,0,127,0,0,40,12,0,22,16,0,30,8,0,16,0,0,138,0,0,40,12,0,8,0,8,0,11,0,12,0,10,0,6,0,5,0,4,0,1,0,12,3,26,40,4,0,2,0,53,0,1,50,26,40,7,0,2,0,151,0,0,48,47,8,0,40,9,0,0,50,};
|
||||
static uint8_t SKSL_INCLUDE_sksl_geom[] = {150,0,
|
||||
12,115,107,95,80,101,114,86,101,114,116,101,120,
|
||||
11,115,107,95,80,111,115,105,116,105,111,110,
|
||||
6,102,108,111,97,116,52,
|
||||
12,115,107,95,80,111,105,110,116,83,105,122,101,
|
||||
5,102,108,111,97,116,
|
||||
5,115,107,95,105,110,
|
||||
15,115,107,95,73,110,118,111,99,97,116,105,111,110,73,68,
|
||||
3,105,110,116,
|
||||
6,115,116,114,101,97,109,
|
||||
16,69,109,105,116,83,116,114,101,97,109,86,101,114,116,101,120,
|
||||
4,118,111,105,100,
|
||||
18,69,110,100,83,116,114,101,97,109,80,114,105,109,105,116,105,118,101,
|
||||
10,69,109,105,116,86,101,114,116,101,120,
|
||||
12,69,110,100,80,114,105,109,105,116,105,118,101,
|
||||
0,
|
||||
42,13,0,
|
||||
37,1,0,2,0,2,
|
||||
29,
|
||||
5,0,0,0,15,0,
|
||||
43,2,0,27,0,
|
||||
29,
|
||||
5,1,0,0,34,0,
|
||||
43,3,0,47,0,
|
||||
46,4,0,
|
||||
29,
|
||||
5,18,39,2,53,0,
|
||||
0,5,0,
|
||||
40,1,0,255,0,
|
||||
37,6,0,2,0,2,
|
||||
29,
|
||||
5,0,0,0,15,0,
|
||||
40,2,0,
|
||||
29,
|
||||
5,1,0,0,34,0,
|
||||
40,3,0,
|
||||
46,7,0,
|
||||
29,
|
||||
5,23,39,4,2,0,
|
||||
40,6,0,0,
|
||||
16,7,0,0,
|
||||
16,7,0,1,
|
||||
46,8,0,
|
||||
29,
|
||||
5,8,0,2,59,0,
|
||||
43,9,0,75,0,0,
|
||||
46,10,0,
|
||||
9,79,0,
|
||||
40,9,0,3,
|
||||
22,11,0,
|
||||
30,
|
||||
8,0,16,0,0,86,0,1,10,0,
|
||||
43,12,0,103,0,
|
||||
46,13,0,
|
||||
9,79,0,
|
||||
40,9,0,3,
|
||||
22,14,0,
|
||||
30,
|
||||
8,0,16,0,0,108,0,1,13,0,
|
||||
40,12,0,
|
||||
22,15,0,
|
||||
30,
|
||||
8,0,16,0,0,127,0,0,
|
||||
40,12,0,
|
||||
22,16,0,
|
||||
30,
|
||||
8,0,16,0,0,138,0,0,
|
||||
40,12,0,8,0,
|
||||
8,0,
|
||||
11,0,
|
||||
12,0,
|
||||
10,0,
|
||||
6,0,
|
||||
5,0,
|
||||
4,0,
|
||||
1,0,
|
||||
12,3,
|
||||
26,
|
||||
40,4,0,2,0,53,0,1,
|
||||
50,
|
||||
26,
|
||||
40,7,0,2,0,151,0,0,
|
||||
48,
|
||||
47,8,0,
|
||||
40,9,0,0,
|
||||
50,};
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_geom_LENGTH = sizeof(SKSL_INCLUDE_sksl_geom);
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,2 +1,55 @@
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_pipeline_LENGTH = 246;
|
||||
static uint8_t SKSL_INCLUDE_sksl_pipeline[246] = {87,0,12,115,107,95,70,114,97,103,67,111,111,114,100,6,102,108,111,97,116,52,2,102,112,17,102,114,97,103,109,101,110,116,80,114,111,99,101,115,115,111,114,6,115,97,109,112,108,101,5,104,97,108,102,52,6,99,111,111,114,100,115,6,102,108,111,97,116,50,9,116,114,97,110,115,102,111,114,109,8,102,108,111,97,116,51,120,51,42,11,0,46,1,0,29,5,15,0,0,2,0,43,2,0,15,0,0,46,3,0,9,22,0,43,4,0,25,0,3,22,5,0,9,43,0,1,3,0,43,6,0,50,0,46,7,0,9,22,0,40,4,0,3,46,8,0,9,56,0,43,9,0,63,0,3,45,10,0,2,40,5,0,22,11,0,9,43,0,2,7,0,8,0,40,6,0,40,11,0,46,12,0,9,22,0,40,4,0,3,46,13,0,9,70,0,43,14,0,80,0,3,45,15,0,3,40,5,0,40,11,0,22,16,0,9,43,0,2,12,0,13,0,40,6,0,40,16,0,2,0,9,0,0,0,12,1,48,47,1,0,40,2,0,0,50,};
|
||||
static uint8_t SKSL_INCLUDE_sksl_pipeline[] = {87,0,
|
||||
12,115,107,95,70,114,97,103,67,111,111,114,100,
|
||||
6,102,108,111,97,116,52,
|
||||
2,102,112,
|
||||
17,102,114,97,103,109,101,110,116,80,114,111,99,101,115,115,111,114,
|
||||
6,115,97,109,112,108,101,
|
||||
5,104,97,108,102,52,
|
||||
6,99,111,111,114,100,115,
|
||||
6,102,108,111,97,116,50,
|
||||
9,116,114,97,110,115,102,111,114,109,
|
||||
8,102,108,111,97,116,51,120,51,
|
||||
42,11,0,
|
||||
46,1,0,
|
||||
29,
|
||||
5,15,0,0,2,0,
|
||||
43,2,0,15,0,0,
|
||||
46,3,0,
|
||||
9,22,0,
|
||||
43,4,0,25,0,3,
|
||||
22,5,0,
|
||||
9,43,0,1,3,0,
|
||||
43,6,0,50,0,
|
||||
46,7,0,
|
||||
9,22,0,
|
||||
40,4,0,3,
|
||||
46,8,0,
|
||||
9,56,0,
|
||||
43,9,0,63,0,3,
|
||||
45,10,0,2,
|
||||
40,5,0,
|
||||
22,11,0,
|
||||
9,43,0,2,7,0,8,0,
|
||||
40,6,0,
|
||||
40,11,0,
|
||||
46,12,0,
|
||||
9,22,0,
|
||||
40,4,0,3,
|
||||
46,13,0,
|
||||
9,70,0,
|
||||
43,14,0,80,0,3,
|
||||
45,15,0,3,
|
||||
40,5,0,
|
||||
40,11,0,
|
||||
22,16,0,
|
||||
9,43,0,2,12,0,13,0,
|
||||
40,6,0,
|
||||
40,16,0,2,0,
|
||||
9,0,
|
||||
0,0,
|
||||
12,1,
|
||||
48,
|
||||
47,1,0,
|
||||
40,2,0,0,
|
||||
50,};
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_pipeline_LENGTH = sizeof(SKSL_INCLUDE_sksl_pipeline);
|
||||
|
@ -1,2 +1,48 @@
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_vert_LENGTH = 206;
|
||||
static uint8_t SKSL_INCLUDE_sksl_vert[206] = {82,0,12,115,107,95,80,101,114,86,101,114,116,101,120,11,115,107,95,80,111,115,105,116,105,111,110,6,102,108,111,97,116,52,12,115,107,95,80,111,105,110,116,83,105,122,101,5,102,108,111,97,116,11,115,107,95,86,101,114,116,101,120,73,68,3,105,110,116,13,115,107,95,73,110,115,116,97,110,99,101,73,68,0,42,6,0,37,1,0,2,0,2,29,5,0,0,0,15,0,43,2,0,27,0,29,5,1,0,0,34,0,43,3,0,47,0,46,4,0,29,8,4,2,0,40,1,0,0,16,4,0,0,16,4,0,1,46,5,0,29,5,42,0,2,53,0,43,6,0,65,0,0,46,7,0,29,5,43,0,2,69,0,40,6,0,0,4,0,5,0,3,0,2,0,4,0,12,3,26,40,4,0,2,0,83,0,0,48,47,5,0,40,6,0,0,50,48,47,7,0,40,6,0,0,50,};
|
||||
static uint8_t SKSL_INCLUDE_sksl_vert[] = {82,0,
|
||||
12,115,107,95,80,101,114,86,101,114,116,101,120,
|
||||
11,115,107,95,80,111,115,105,116,105,111,110,
|
||||
6,102,108,111,97,116,52,
|
||||
12,115,107,95,80,111,105,110,116,83,105,122,101,
|
||||
5,102,108,111,97,116,
|
||||
11,115,107,95,86,101,114,116,101,120,73,68,
|
||||
3,105,110,116,
|
||||
13,115,107,95,73,110,115,116,97,110,99,101,73,68,
|
||||
0,
|
||||
42,6,0,
|
||||
37,1,0,2,0,2,
|
||||
29,
|
||||
5,0,0,0,15,0,
|
||||
43,2,0,27,0,
|
||||
29,
|
||||
5,1,0,0,34,0,
|
||||
43,3,0,47,0,
|
||||
46,4,0,
|
||||
29,
|
||||
8,4,2,0,
|
||||
40,1,0,0,
|
||||
16,4,0,0,
|
||||
16,4,0,1,
|
||||
46,5,0,
|
||||
29,
|
||||
5,42,0,2,53,0,
|
||||
43,6,0,65,0,0,
|
||||
46,7,0,
|
||||
29,
|
||||
5,43,0,2,69,0,
|
||||
40,6,0,0,4,0,
|
||||
5,0,
|
||||
3,0,
|
||||
2,0,
|
||||
4,0,
|
||||
12,3,
|
||||
26,
|
||||
40,4,0,2,0,83,0,0,
|
||||
48,
|
||||
47,5,0,
|
||||
40,6,0,0,
|
||||
50,
|
||||
48,
|
||||
47,7,0,
|
||||
40,6,0,0,
|
||||
50,};
|
||||
static constexpr size_t SKSL_INCLUDE_sksl_vert_LENGTH = sizeof(SKSL_INCLUDE_sksl_vert);
|
||||
|
Loading…
Reference in New Issue
Block a user