|
@@ -883,12 +883,17 @@ void SPIRVEmitter::doHLSLBufferDecl(const HLSLBufferDecl *bufferDecl) {
|
|
|
// Check and emit warnings for member intializers which are not
|
|
|
// supported in Vulkan
|
|
|
for (const auto *member : bufferDecl->decls()) {
|
|
|
- if (const auto *varMember = dyn_cast<VarDecl>(member))
|
|
|
+ if (const auto *varMember = dyn_cast<VarDecl>(member)) {
|
|
|
if (const auto *init = varMember->getInit())
|
|
|
emitWarning("%select{tbuffer|cbuffer}0 member initializer "
|
|
|
"ignored since no equivalent in Vulkan",
|
|
|
init->getExprLoc())
|
|
|
<< bufferDecl->isCBuffer() << init->getSourceRange();
|
|
|
+
|
|
|
+ for (const auto *annotation : varMember->getUnusualAnnotations())
|
|
|
+ if (const auto *packing = dyn_cast<hlsl::ConstantPacking>(annotation))
|
|
|
+ emitWarning("packoffset ignored since not supported", packing->Loc);
|
|
|
+ }
|
|
|
}
|
|
|
validateVKAttributes(bufferDecl);
|
|
|
(void)declIdMapper.createCTBuffer(bufferDecl);
|