/hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/scripts/cereal/ |
D | decoder.py | 139 def emit_param_decl_for_reading(param, cgen): argument 141 cgen.stmt( 142 cgen.makeRichCTypeDecl(param.getForNonConstAccess())) 144 cgen.stmt( 145 cgen.makeRichCTypeDecl(param)) 147 def emit_unmarshal(typeInfo, param, cgen, output = False, destroy = False, noUnbox = False): argument 150 cgen, 160 lenAccess = cgen.generalLengthAccess(param) 161 lenAccessGuard = cgen.generalLengthAccessGuard(param) 163 cgen.stmt("boxed_%s_preserve = %s" % (param.paramName, param.paramName)) [all …]
|
D | encoder.py | 112 cgen, argument 117 return cgen.makeCallExpr( \ 122 def emit_custom_pre_validate(typeInfo, api, cgen): argument 129 cgen) 132 cgen.stmt("VALIDATE_VOID(%s)" % callExpr) 134 cgen.stmt("VALIDATE_RET(%s, %s, %s)" % \ 139 def emit_custom_resource_preprocess(typeInfo, api, cgen): argument 141 cgen.stmt( \ 146 cgen, suffix="_pre")) 148 def emit_custom_resource_postprocess(typeInfo, api, cgen): argument [all …]
|
D | subdecode.py | 32 def emit_param_decl_for_reading(param, cgen): argument 34 cgen.stmt( 35 cgen.makeRichCTypeDecl(param.getForNonConstAccess())) 37 cgen.stmt( 38 cgen.makeRichCTypeDecl(param)) 41 lenAccess = cgen.generalLengthAccess(param) 47 cgen.stmt("%s%s stack_%s[%s]" % ( 51 def emit_unmarshal(typeInfo, param, cgen, output=False, destroy=False, noUnbox=False): argument 54 cgen, 64 lenAccess = cgen.generalLengthAccess(param) [all …]
|
D | decodersnapshot.py | 110 def extract_deps_vkAllocateMemory(param, access, lenExpr, api, cgen): argument 111 …cgen.stmt("const VkMemoryDedicatedAllocateInfo* dedicatedAllocateInfo = vk_find_struct<VkMemoryDed… 112 cgen.beginIf("dedicatedAllocateInfo"); 113 cgen.beginIf("dedicatedAllocateInfo->image") 114 …cgen.stmt("mReconstruction.addHandleDependency((const uint64_t*)%s, %s, (uint64_t)(uintptr_t)%s)" … 116 cgen.endIf() 117 cgen.beginIf("dedicatedAllocateInfo->buffer") 118 …cgen.stmt("mReconstruction.addHandleDependency((const uint64_t*)%s, %s, (uint64_t)(uintptr_t)%s)" … 120 cgen.endIf() 121 cgen.endIf() [all …]
|
D | marshaling.py | 41 cgen, argument 52 self.cgen = cgen 64 …self.exprAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputVarName, asPtr … 65 …self.exprValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputVarName, a… 66 …self.exprPrimitiveValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputV… 67 … self.lenAccessor = lambda t: self.cgen.generalLengthAccess(t, parentVarName = self.inputVarName) 68 self.lenAccessorGuard = lambda t: self.cgen.generalLengthAccessGuard( 70 … self.filterVarAccessor = lambda t: self.cgen.filterVarAccess(t, parentVarName = self.inputVarName) 93 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 100 self.cgen.stmt( [all …]
|
D | reservedmarshaling.py | 37 cgen, argument 53 self.cgen = cgen 68 …self.exprAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputVarName, asPtr … 69 …self.exprValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputVarName, a… 70 …self.exprPrimitiveValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.inputV… 71 … self.lenAccessor = lambda t: self.cgen.generalLengthAccess(t, parentVarName = self.inputVarName) 72 self.lenAccessorGuard = lambda t: self.cgen.generalLengthAccessGuard( 74 … self.filterVarAccessor = lambda t: self.cgen.filterVarAccess(t, parentVarName = self.inputVarName) 100 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 103 self.cgen.stmt("*%s += %s" % (self.ptrVar, sizeExpr)) [all …]
|
D | deepcopy.py | 24 def __init__(self, cgen, inputVars, poolVarName, rootVarName, prefix, skipValues=False): argument 25 self.cgen = cgen 33 return lambda t: self.cgen.generalAccess(t, parentVarName = varName, asPtr = asPtr) 36 return lambda t: self.cgen.generalLengthAccess(t, parentVarName = varName) 39 return lambda t: self.cgen.generalLengthAccessGuard(t, parentVarName=varName) 60 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 72 sizeof = self.cgen.sizeofExpr( \ 90 self.cgen.line("// TODO: Unsupported : %s" % 91 self.cgen.makeCTypeDecl(vulkanType)) 106 self.cgen.beginIf(lenAccessorGuardLhs) [all …]
|
D | counting.py | 27 …def __init__(self, cgen, featureBitsVar, toCountVar, countVar, rootTypeVar, prefix, forApiOutput=F… argument 28 self.cgen = cgen 36 …self.exprAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.toCountVar, asPtr = … 37 …self.exprValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.toCountVar, asP… 38 …self.exprPrimitiveValueAccessor = lambda t: self.cgen.generalAccess(t, parentVarName = self.toCoun… 40 … self.lenAccessor = lambda t: self.cgen.generalLengthAccess(t, parentVarName = self.toCountVar) 41 …self.lenAccessorGuard = lambda t: self.cgen.generalLengthAccessGuard(t, parentVarName = self.toCou… 42 … self.filterVarAccessor = lambda t: self.cgen.filterVarAccess(t, parentVarName = self.toCountVar) 63 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 66 self.cgen.stmt("*%s += %s" % (self.countVar, sizeExpr)) [all …]
|
D | functable.py | 213 self.cgen = CodeGen() 221 cgen = self.cgen 222 self.module.appendImpl(cgen.swapCode()) 238 cgen = self.cgen 285 cgen.funcCall( 303 cgen.funcCall( 324 cgen.stmt("%s = %s ? %s : %s" % 330 cgen.stmt("VK_FROM_HANDLE(%s, %s, %s)" % 357 … cgen.stmt("std::vector<%s> %s(%s)" % (param.typeName, internalArray, countParamName)) 361 cgen.stmt("std::vector<std::vector<%s>> %s" % (param.typeName, internalArray)) [all …]
|
D | extensionstructs.py | 83 def structTypeImpl(cgen): argument 84 cgen.stmt( 87 cgen.stmt("return asStructType") 93 def forEachExtensionReturnSize(ext, _, cgen): argument 94 cgen.stmt("return sizeof(%s)" % ext.name) 96 def forEachExtensionReturnSizeProtectedByFeature(ext, _, cgen): argument 99 cgen.stmt("return sizeof(%s)" % ext.name) 101 cgen.beginIf("%s & %s" % ("streamFeatures", streamFeature)) 102 cgen.stmt("return sizeof(%s)" % ext.name) 103 cgen.endIf() [all …]
|
D | handlemap.py | 24 def __init__(self, cgen, inputVar, handlemapVarName, prefix, isHandleFunc): argument 25 self.cgen = cgen 31 return lambda t: self.cgen.generalAccess(t, parentVarName = varName, asPtr = asPtr) 34 return lambda t: self.cgen.generalLengthAccess(t, parentVarName = varName) 37 return lambda t: self.cgen.generalLengthAccessGuard(t, parentVarName=varName) 52 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 72 self.cgen.line("// TODO: Unsupported : %s" % 73 self.cgen.makeCTypeDecl(vulkanType)) 82 self.cgen.beginIf(lenAccessGuard) 85 self.cgen.beginIf(access) [all …]
|
D | testing.py | 32 def __init__(self, cgen, inputVars, onFailCompareVar, prefix): argument 33 self.cgen = cgen 39 return lambda t: self.cgen.generalAccess(t, parentVarName = varName, asPtr = asPtr) 42 return lambda t: self.cgen.generalLengthAccess(t, parentVarName = varName) 45 return lambda t: self.cgen.generalLengthAccessGuard(t, parentVarName=varName) 74 self.cgen.makeCTypeDecl(vulkanType, useParamName=False)) 92 self.cgen.stmt("if (!(%s)) { %s(\"%s (Error: %s)\"); }" % 117 self.cgen.beginIf("%s && %s" % (accessLhs, accessRhs)) 126 self.cgen.endIf() 143 self.cgen.beginIf(bothNotNullExpr) [all …]
|
D | transform.py | 23 def deviceMemoryTransform(resourceTrackerVarName, structOrApiInfo, getExpr, getLen, cgen, variant="… argument 78 cgen.stmt("%s->deviceMemoryTransform_tohost(%s)" % \ 81 cgen.stmt("%s->deviceMemoryTransform_fromhost(%s)" % \ 84 def directTransform(resourceTrackerVarName, vulkanType, getExpr, getLen, cgen, variant="tohost"): argument 93 cgen.stmt("%s->transformImpl_%s_%s(%s, %s)" % (resourceTrackerVarName, 96 def genTransformsForVulkanType(resourceTrackerVarName, structOrApiInfo, getExpr, getLen, cgen, vari… argument 102 getExpr, getLen, cgen, variant=variant) 105 def __init__(self, cgen, inputVar, resourceTrackerVarName, prefix, variant): argument 106 self.cgen = cgen 112 return lambda t: self.cgen.generalAccess(t, parentVarName = varName, asPtr = asPtr) [all …]
|
D | dispatch.py | 189 def emit_feature_check_decl(cgen, tag, featureToCheck): argument 190 cgen.line(""" 203 def syncFeatureQuiet(self, cgen, feature): argument 211 def syncFeature(self, cgen, feature): argument 214 cgen.leftline("#endif") 219 cgen.leftline("#endif") 221 cgen.leftline("#ifdef %s" % feature) 224 def makeDlsymCall(self, cgen, apiname, typedecl): argument 225 cgen.stmt( \ 229 def makeGetInstanceProcAddrCall(self, cgen, dispatch, instance, apiname, typedecl): argument [all …]
|
D | unbox.py | 65 def funcDefGenerator(cgen): argument 66 cgen.stmt("BoxedHandleUnwrapMapping unboxMapping") 67 cgen.stmt("%s* res = (%s*)pool->alloc(sizeof(const %s))" % (name, name, name)) 68 cgen.stmt("deepcopy_%s(pool, %s, %s)" % (name, self.toUnboxVar, "res")) 69 cgen.stmt("handlemap_%s(%s, %s)" % (name, "&unboxMapping", "res")) 70 cgen.stmt("return res")
|
/hardware/google/gfxstream/codegen/vulkan/vulkan-docs-next/scripts/cereal/common/ |
D | codegen.py | 965 …def emitForEachStructExtension(self, cgen, retType, triggerVar, forEachFunc, autoBreak=True, defau… argument 966 def readStructType(structTypeName, structVarName, cgen): argument 967 cgen.stmt("uint32_t %s = (uint32_t)%s(%s)" % \ 974 def doDefaultReturn(cgen): argument 976 cgen.stmt("return") 978 cgen.stmt("return (%s)0" % retType.typeName) 980 cgen.beginIf("!%s" % triggerVar.paramName) 982 doDefaultReturn(cgen) 984 nullEmit(cgen) 985 cgen.endIf() [all …]
|