|
@@ -7097,7 +7097,8 @@ uint32_t SPIRVEmitter::processWaveQuery(const CallExpr *callExpr,
|
|
|
featureManager.requestTargetEnv(SPV_ENV_VULKAN_1_1, "Wave Operation",
|
|
|
callExpr->getExprLoc());
|
|
|
theBuilder.requireCapability(getCapabilityForGroupNonUniform(opcode));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
const uint32_t retType =
|
|
|
typeTranslator.translateType(callExpr->getCallReturnType(astContext));
|
|
|
return theBuilder.createGroupNonUniformOp(opcode, retType, subgroupScope);
|
|
@@ -7114,7 +7115,8 @@ uint32_t SPIRVEmitter::processWaveVote(const CallExpr *callExpr,
|
|
|
callExpr->getExprLoc());
|
|
|
theBuilder.requireCapability(getCapabilityForGroupNonUniform(opcode));
|
|
|
const uint32_t predicate = doExpr(callExpr->getArg(0));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
const uint32_t retType =
|
|
|
typeTranslator.translateType(callExpr->getCallReturnType(astContext));
|
|
|
return theBuilder.createGroupNonUniformUnaryOp(opcode, retType, subgroupScope,
|
|
@@ -7203,7 +7205,8 @@ uint32_t SPIRVEmitter::processWaveCountBits(const CallExpr *callExpr,
|
|
|
spv::Op::OpGroupNonUniformBallotBitCount));
|
|
|
|
|
|
const uint32_t predicate = doExpr(callExpr->getArg(0));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
|
|
|
const uint32_t u32Type = theBuilder.getUint32Type();
|
|
|
const uint32_t v4u32Type = theBuilder.getVecType(u32Type, 4);
|
|
@@ -7237,7 +7240,8 @@ uint32_t SPIRVEmitter::processWaveReductionOrPrefix(
|
|
|
callExpr->getExprLoc());
|
|
|
theBuilder.requireCapability(getCapabilityForGroupNonUniform(opcode));
|
|
|
const uint32_t predicate = doExpr(callExpr->getArg(0));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
const uint32_t retType =
|
|
|
typeTranslator.translateType(callExpr->getCallReturnType(astContext));
|
|
|
return theBuilder.createGroupNonUniformUnaryOp(
|
|
@@ -7255,7 +7259,8 @@ uint32_t SPIRVEmitter::processWaveBroadcast(const CallExpr *callExpr) {
|
|
|
callExpr->getExprLoc());
|
|
|
theBuilder.requireCapability(spv::Capability::GroupNonUniformBallot);
|
|
|
const uint32_t value = doExpr(callExpr->getArg(0));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
const uint32_t retType =
|
|
|
typeTranslator.translateType(callExpr->getCallReturnType(astContext));
|
|
|
if (numArgs == 2)
|
|
@@ -7281,7 +7286,8 @@ uint32_t SPIRVEmitter::processWaveQuadWideShuffle(const CallExpr *callExpr,
|
|
|
theBuilder.requireCapability(spv::Capability::GroupNonUniformQuad);
|
|
|
|
|
|
const uint32_t value = doExpr(callExpr->getArg(0));
|
|
|
- const uint32_t subgroupScope = theBuilder.getConstantInt32(3);
|
|
|
+ const uint32_t subgroupScope =
|
|
|
+ theBuilder.getConstantInt32(static_cast<int32_t>(spv::Scope::Subgroup));
|
|
|
const uint32_t retType =
|
|
|
typeTranslator.translateType(callExpr->getCallReturnType(astContext));
|
|
|
|