|
@@ -1305,30 +1305,30 @@ def verifyPackingDirectXInlineConstants(thefile, compilerPath, silent):
|
|
|
predicates = []
|
|
|
|
|
|
# Inline constant buffer reflection data validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["count"] == 1)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["index"] == 1)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["space"] == 0)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["usage"] == "Read")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["sizeInBytes"] == 60)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["id"] == "Root_Constants")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["count"] == 1)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["index"] == 1)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["space"] == 0)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["usage"] == "Read")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["sizeInBytes"] == 60)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["id"] == "Root_Constants")
|
|
|
|
|
|
# Inline constant structure members validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantByteOffset"] == 0)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantByteSize"] == 16)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantId"] == "varFloat4")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["qualifiedName"] == "/Root_Constants/varFloat4")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeDimensions"] == [])
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeKind"] == "Predefined")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeName"] == "?float4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantByteOffset"] == 0)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantByteSize"] == 16)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantId"] == "varFloat4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["qualifiedName"] == "/Root_Constants/varFloat4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeDimensions"] == [])
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeKind"] == "Predefined")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeName"] == "?float4")
|
|
|
|
|
|
# Inline constant structure members validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantByteOffset"] == 16)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantByteSize"] == 44)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantId"] == "mat3x3")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["qualifiedName"] == "/Root_Constants/mat3x3")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeDimensions"] == [])
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeKind"] == "Predefined")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeName"] == "?float3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantByteOffset"] == 16)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantByteSize"] == 44)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantId"] == "mat3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["qualifiedName"] == "/Root_Constants/mat3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeDimensions"] == [])
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeKind"] == "Predefined")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeName"] == "?float3x3")
|
|
|
|
|
|
if not silent: print (fg.CYAN+ style.BRIGHT+ "inline constant layouts verification..."+ style.RESET_ALL)
|
|
|
ok = testfuncs.verifyAllPredicates(predicates, j)
|
|
@@ -1341,30 +1341,30 @@ def verifyPackingMetalInlineConstants(thefile, compilerPath, silent):
|
|
|
predicates = []
|
|
|
|
|
|
# Inline constant buffer reflection data validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["count"] == 1)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["index"] == 1)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["space"] == 0)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["usage"] == "Read")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["sizeInBytes"] == 64)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["bufferForInlineConstants"]["id"] == "Root_Constants")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["count"] == 1)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["index"] == 1)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["space"] == 0)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["usage"] == "Read")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["sizeInBytes"] == 64)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["bufferForRootConstants"]["id"] == "Root_Constants")
|
|
|
|
|
|
# Inline constant structure members validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantByteOffset"] == 0)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantByteSize"] == 16)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["constantId"] == "varFloat4")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["qualifiedName"] == "/Root_Constants/varFloat4")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeDimensions"] == [])
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeKind"] == "Predefined")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][0]["typeName"] == "?float4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantByteOffset"] == 0)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantByteSize"] == 16)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["constantId"] == "varFloat4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["qualifiedName"] == "/Root_Constants/varFloat4")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeDimensions"] == [])
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeKind"] == "Predefined")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][0]["typeName"] == "?float4")
|
|
|
|
|
|
# Inline constant structure members validation
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantByteOffset"] == 16)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantByteSize"] == 44)
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["constantId"] == "mat3x3")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["qualifiedName"] == "/Root_Constants/mat3x3")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeDimensions"] == [])
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeKind"] == "Predefined")
|
|
|
- predicates.append(lambda: j["InlineConstantBuffer"]["inputsForInlineConstants"][1]["typeName"] == "?float3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantByteOffset"] == 16)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantByteSize"] == 44)
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["constantId"] == "mat3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["qualifiedName"] == "/Root_Constants/mat3x3")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeDimensions"] == [])
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeKind"] == "Predefined")
|
|
|
+ predicates.append(lambda: j["RootConstantBuffer"]["inputsForRootConstants"][1]["typeName"] == "?float3x3")
|
|
|
|
|
|
if not silent: print (fg.CYAN+ style.BRIGHT+ "inline constant layouts verification..."+ style.RESET_ALL)
|
|
|
ok = testfuncs.verifyAllPredicates(predicates, j)
|