diff --git a/src/gfxstream/codegen/scripts/genvk.py b/src/gfxstream/codegen/scripts/genvk.py index 676c78c4f50..5a617cc17e8 100755 --- a/src/gfxstream/codegen/scripts/genvk.py +++ b/src/gfxstream/codegen/scripts/genvk.py @@ -40,6 +40,9 @@ from reg import Registry from validitygenerator import ValidityOutputGenerator from apiconventions import APIConventions +# gfxstream + cereal modules +from cerealgenerator import CerealGenerator + # Simple timer functions startTime = None @@ -949,6 +952,33 @@ def makeGenOpts(args): alignFuncParam = 36) ] + # Serializer for spec + genOpts['cereal'] = [ + CerealGenerator, + CGeneratorOptions( + conventions = conventions, + filename = "CMakeLists.txt", + directory = directory, + apiname = 'vulkan', + profile = None, + versions = featuresPat, + emitversions = featuresPat, + defaultExtensions = defaultExtensions, + addExtensions = None, + removeExtensions = None, + emitExtensions = emitExtensionsPat, + prefixText = prefixStrings + vkPrefixStrings, + genFuncPointers = True, + protectFile = protectFile, + protectFeature = False, + protectProto = '#ifndef', + protectProtoStr = 'VK_NO_PROTOTYPES', + apicall = 'VKAPI_ATTR ', + apientry = 'VKAPI_CALL ', + apientryp = 'VKAPI_PTR *', + alignFuncParam = 48) + ] + def genTarget(args): """Create an API generator and corresponding generator options based on