SPV: Fix #2293: keep relaxed precision on arg passed to relaxed param
When arguments are copied to make space for a writable formal parameter, and the formal parameter is relaxed precision, make the copy also relaxed precision.
This commit is contained in:
@@ -5336,6 +5336,8 @@ spv::Id TGlslangToSpvTraverser::handleUserFunctionCall(const glslang::TIntermAgg
|
||||
// need space to hold the copy
|
||||
arg = builder.createVariable(spv::StorageClassFunction,
|
||||
builder.getContainedTypeId(function->getParamType(a)), "param");
|
||||
if (function->isReducedPrecisionParam(a))
|
||||
builder.setPrecision(arg, spv::DecorationRelaxedPrecision);
|
||||
if (qualifiers[a] == glslang::EvqIn || qualifiers[a] == glslang::EvqInOut) {
|
||||
// need to copy the input into output space
|
||||
builder.setAccessChain(lValues[lValueCount]);
|
||||
|
||||
Reference in New Issue
Block a user