Adapt uniform[fv] and similar to accept typed array args

This commit is contained in:
Igor Matuszewski 2018-03-22 20:38:26 +01:00
parent c1c74ed96c
commit 20f21cb5f8
4 changed files with 414 additions and 379 deletions

View file

@ -418,11 +418,15 @@ class CGMethodCall(CGThing):
template = info.template
declType = info.declType
argName = "arg%d" % distinguishingIndex
testCode = instantiateJSToNativeConversionTemplate(
template,
{"val": distinguishingArg},
declType,
"arg%d" % distinguishingIndex)
argName)
if type_needs_auto_root(type):
testCode.append(CGGeneric("auto_root!(in(cx) let %s = %s);" % (argName, argName)))
# Indent by 4, since we need to indent further than our "do" statement
caseBody.append(CGIndenter(testCode, 4))