|
@@ -671,39 +671,6 @@ uint32_t TypeTranslator::getACSBufferCounter() {
|
|
|
decorations);
|
|
|
}
|
|
|
|
|
|
-uint32_t TypeTranslator::getGlPerVertexStruct(
|
|
|
- uint32_t clipArraySize, uint32_t cullArraySize, llvm::StringRef name,
|
|
|
- const llvm::SmallVector<std::string, 4> &fieldSemantics) {
|
|
|
- const uint32_t f32Type = theBuilder.getFloat32Type();
|
|
|
- const uint32_t v4f32Type = theBuilder.getVecType(f32Type, 4);
|
|
|
- const uint32_t clipType = theBuilder.getArrayType(
|
|
|
- f32Type, theBuilder.getConstantUint32(clipArraySize));
|
|
|
- const uint32_t cullType = theBuilder.getArrayType(
|
|
|
- f32Type, theBuilder.getConstantUint32(cullArraySize));
|
|
|
-
|
|
|
- auto &ctx = *theBuilder.getSPIRVContext();
|
|
|
- llvm::SmallVector<const Decoration *, 1> decorations;
|
|
|
-
|
|
|
- decorations.push_back(Decoration::getBuiltIn(ctx, spv::BuiltIn::Position, 0));
|
|
|
- decorations.push_back(
|
|
|
- Decoration::getBuiltIn(ctx, spv::BuiltIn::PointSize, 1));
|
|
|
- decorations.push_back(
|
|
|
- Decoration::getBuiltIn(ctx, spv::BuiltIn::ClipDistance, 2));
|
|
|
- decorations.push_back(
|
|
|
- Decoration::getBuiltIn(ctx, spv::BuiltIn::CullDistance, 3));
|
|
|
- decorations.push_back(Decoration::getBlock(ctx));
|
|
|
-
|
|
|
- if (spirvOptions.enableReflect) {
|
|
|
- for (uint32_t i = 0; i < 4; ++i)
|
|
|
- if (!fieldSemantics[i].empty())
|
|
|
- decorations.push_back(
|
|
|
- Decoration::getHlslSemanticGOOGLE(ctx, fieldSemantics[i], i));
|
|
|
- }
|
|
|
-
|
|
|
- return theBuilder.getStructType({v4f32Type, f32Type, clipType, cullType},
|
|
|
- name, {}, decorations);
|
|
|
-}
|
|
|
-
|
|
|
bool TypeTranslator::isScalarType(QualType type, QualType *scalarType) {
|
|
|
bool isScalar = false;
|
|
|
QualType ty = {};
|