GLSL->SPIR-V: Put precision decorations on imageLoad().
This commit is contained in:
@@ -3281,7 +3281,9 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
operands.push_back(spv::ImageOperandsSampleMask);
|
||||
operands.push_back(*(opIt++));
|
||||
}
|
||||
return builder.createOp(spv::OpImageRead, resultType(), operands);
|
||||
spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands);
|
||||
builder.setPrecision(result, precision);
|
||||
return result;
|
||||
}
|
||||
|
||||
operands.push_back(*(opIt++));
|
||||
@@ -3304,7 +3306,10 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
|
||||
}
|
||||
if (builder.getImageTypeFormat(builder.getImageType(operands.front())) == spv::ImageFormatUnknown)
|
||||
builder.addCapability(spv::CapabilityStorageImageReadWithoutFormat);
|
||||
return builder.createOp(spv::OpImageRead, resultType(), operands);
|
||||
|
||||
spv::Id result = builder.createOp(spv::OpImageRead, resultType(), operands);
|
||||
builder.setPrecision(result, precision);
|
||||
return result;
|
||||
#ifdef AMD_EXTENSIONS
|
||||
} else if (node->getOp() == glslang::EOpImageStore || node->getOp() == glslang::EOpImageStoreLod) {
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user