Implement GL_NV_shader_subgroup_partitioned

This commit is contained in:
Jeff Bolz 2018-03-29 22:52:17 -05:00
parent 6b1ede4124
commit 2abe9a4d34
15 changed files with 4659 additions and 9 deletions

View File

@ -51,4 +51,7 @@ const char* const E_SPV_NV_stereo_view_rendering = "SPV_NV_stereo_view_rendering
//SPV_NVX_multiview_per_view_attributes
const char* const E_SPV_NVX_multiview_per_view_attributes = "SPV_NVX_multiview_per_view_attributes";
//SPV_NV_shader_subgroup_partitioned
const char* const E_SPV_NV_shader_subgroup_partitioned = "SPV_NV_shader_subgroup_partitioned";
#endif // #ifndef GLSLextNV_H

121
SPIRV/GlslangToSpv.cpp Normal file → Executable file
View File

@ -4666,7 +4666,13 @@ spv::Id TGlslangToSpvTraverser::createUnaryOperation(glslang::TOperator op, OpDe
libCall = spv::CubeFaceCoordAMD;
break;
#endif
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartition:
builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned);
builder.addCapability(spv::CapabilityGroupNonUniformPartitionedNV);
unaryOp = spv::OpGroupNonUniformPartitionNV;
break;
#endif
default:
return 0;
}
@ -5629,6 +5635,32 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
builder.addCapability(spv::CapabilityGroupNonUniform);
builder.addCapability(spv::CapabilityGroupNonUniformQuad);
break;
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
case glslang::EOpSubgroupPartitionedMax:
case glslang::EOpSubgroupPartitionedAnd:
case glslang::EOpSubgroupPartitionedOr:
case glslang::EOpSubgroupPartitionedXor:
case glslang::EOpSubgroupPartitionedInclusiveAdd:
case glslang::EOpSubgroupPartitionedInclusiveMul:
case glslang::EOpSubgroupPartitionedInclusiveMin:
case glslang::EOpSubgroupPartitionedInclusiveMax:
case glslang::EOpSubgroupPartitionedInclusiveAnd:
case glslang::EOpSubgroupPartitionedInclusiveOr:
case glslang::EOpSubgroupPartitionedInclusiveXor:
case glslang::EOpSubgroupPartitionedExclusiveAdd:
case glslang::EOpSubgroupPartitionedExclusiveMul:
case glslang::EOpSubgroupPartitionedExclusiveMin:
case glslang::EOpSubgroupPartitionedExclusiveMax:
case glslang::EOpSubgroupPartitionedExclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveXor:
builder.addExtension(spv::E_SPV_NV_shader_subgroup_partitioned);
builder.addCapability(spv::CapabilityGroupNonUniformPartitionedNV);
break;
#endif
default: assert(0 && "Unhandled subgroup operation!");
}
@ -5662,6 +5694,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveAdd:
case glslang::EOpSubgroupExclusiveAdd:
case glslang::EOpSubgroupClusteredAdd:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedInclusiveAdd:
case glslang::EOpSubgroupPartitionedExclusiveAdd:
#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFAdd;
} else {
@ -5672,6 +5709,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMul:
case glslang::EOpSubgroupExclusiveMul:
case glslang::EOpSubgroupClusteredMul:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedInclusiveMul:
case glslang::EOpSubgroupPartitionedExclusiveMul:
#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMul;
} else {
@ -5682,6 +5724,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMin:
case glslang::EOpSubgroupExclusiveMin:
case glslang::EOpSubgroupClusteredMin:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMin:
case glslang::EOpSubgroupPartitionedInclusiveMin:
case glslang::EOpSubgroupPartitionedExclusiveMin:
#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMin;
} else if (isUnsigned) {
@ -5694,6 +5741,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveMax:
case glslang::EOpSubgroupExclusiveMax:
case glslang::EOpSubgroupClusteredMax:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedMax:
case glslang::EOpSubgroupPartitionedInclusiveMax:
case glslang::EOpSubgroupPartitionedExclusiveMax:
#endif
if (isFloat) {
opCode = spv::OpGroupNonUniformFMax;
} else if (isUnsigned) {
@ -5706,6 +5758,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveAnd:
case glslang::EOpSubgroupExclusiveAnd:
case glslang::EOpSubgroupClusteredAnd:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAnd:
case glslang::EOpSubgroupPartitionedInclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveAnd:
#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalAnd;
} else {
@ -5716,6 +5773,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveOr:
case glslang::EOpSubgroupExclusiveOr:
case glslang::EOpSubgroupClusteredOr:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedOr:
case glslang::EOpSubgroupPartitionedInclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveOr:
#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalOr;
} else {
@ -5726,6 +5788,11 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupInclusiveXor:
case glslang::EOpSubgroupExclusiveXor:
case glslang::EOpSubgroupClusteredXor:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedXor:
case glslang::EOpSubgroupPartitionedInclusiveXor:
case glslang::EOpSubgroupPartitionedExclusiveXor:
#endif
if (isBool) {
opCode = spv::OpGroupNonUniformLogicalXor;
} else {
@ -5786,6 +5853,35 @@ spv::Id TGlslangToSpvTraverser::createSubgroupOperation(glslang::TOperator op, s
case glslang::EOpSubgroupClusteredXor:
spvGroupOperands.push_back(spv::GroupOperationClusteredReduce);
break;
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
case glslang::EOpSubgroupPartitionedMax:
case glslang::EOpSubgroupPartitionedAnd:
case glslang::EOpSubgroupPartitionedOr:
case glslang::EOpSubgroupPartitionedXor:
spvGroupOperands.push_back(spv::GroupOperationPartitionedReduceNV);
break;
case glslang::EOpSubgroupPartitionedInclusiveAdd:
case glslang::EOpSubgroupPartitionedInclusiveMul:
case glslang::EOpSubgroupPartitionedInclusiveMin:
case glslang::EOpSubgroupPartitionedInclusiveMax:
case glslang::EOpSubgroupPartitionedInclusiveAnd:
case glslang::EOpSubgroupPartitionedInclusiveOr:
case glslang::EOpSubgroupPartitionedInclusiveXor:
spvGroupOperands.push_back(spv::GroupOperationPartitionedInclusiveScanNV);
break;
case glslang::EOpSubgroupPartitionedExclusiveAdd:
case glslang::EOpSubgroupPartitionedExclusiveMul:
case glslang::EOpSubgroupPartitionedExclusiveMin:
case glslang::EOpSubgroupPartitionedExclusiveMax:
case glslang::EOpSubgroupPartitionedExclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveXor:
spvGroupOperands.push_back(spv::GroupOperationPartitionedExclusiveScanNV);
break;
#endif
}
// Push back the operands next.
@ -5974,6 +6070,29 @@ spv::Id TGlslangToSpvTraverser::createMiscOperation(glslang::TOperator op, spv::
case glslang::EOpSubgroupClusteredOr:
case glslang::EOpSubgroupClusteredXor:
case glslang::EOpSubgroupQuadBroadcast:
#ifdef NV_EXTENSIONS
case glslang::EOpSubgroupPartitionedAdd:
case glslang::EOpSubgroupPartitionedMul:
case glslang::EOpSubgroupPartitionedMin:
case glslang::EOpSubgroupPartitionedMax:
case glslang::EOpSubgroupPartitionedAnd:
case glslang::EOpSubgroupPartitionedOr:
case glslang::EOpSubgroupPartitionedXor:
case glslang::EOpSubgroupPartitionedInclusiveAdd:
case glslang::EOpSubgroupPartitionedInclusiveMul:
case glslang::EOpSubgroupPartitionedInclusiveMin:
case glslang::EOpSubgroupPartitionedInclusiveMax:
case glslang::EOpSubgroupPartitionedInclusiveAnd:
case glslang::EOpSubgroupPartitionedInclusiveOr:
case glslang::EOpSubgroupPartitionedInclusiveXor:
case glslang::EOpSubgroupPartitionedExclusiveAdd:
case glslang::EOpSubgroupPartitionedExclusiveMul:
case glslang::EOpSubgroupPartitionedExclusiveMin:
case glslang::EOpSubgroupPartitionedExclusiveMax:
case glslang::EOpSubgroupPartitionedExclusiveAnd:
case glslang::EOpSubgroupPartitionedExclusiveOr:
case glslang::EOpSubgroupPartitionedExclusiveXor:
#endif
return createSubgroupOperation(op, typeId, operands, typeProxy);
#ifdef AMD_EXTENSIONS

24
SPIRV/doc.cpp Normal file → Executable file
View File

@ -728,17 +728,22 @@ const char* ScopeString(int mem)
}
}
const int GroupOperationCeiling = 4;
const int GroupOperationCeiling = 9;
const char* GroupOperationString(int gop)
{
switch (gop)
{
case 0: return "Reduce";
case 1: return "InclusiveScan";
case 2: return "ExclusiveScan";
case 3: return "ClusteredReduce";
case GroupOperationReduce: return "Reduce";
case GroupOperationInclusiveScan: return "InclusiveScan";
case GroupOperationExclusiveScan: return "ExclusiveScan";
case GroupOperationClusteredReduce: return "ClusteredReduce";
#ifdef NV_EXTENSIONS
case GroupOperationPartitionedReduceNV: return "PartitionedReduceNV";
case GroupOperationPartitionedInclusiveScanNV: return "PartitionedInclusiveScanNV";
case GroupOperationPartitionedExclusiveScanNV: return "PartitionedExclusiveScanNV";
#endif
case GroupOperationCeiling:
default: return "Bad";
@ -876,6 +881,7 @@ const char* CapabilityString(int info)
case 5255: return "ShaderViewportMaskNV";
case 5259: return "ShaderStereoViewNV";
case 5260: return "PerViewAttributesNV";
case 5297: return "GroupNonUniformPartitionedNV";
#endif
case 5265: return "FragmentFullyCoveredEXT";
@ -1272,6 +1278,9 @@ const char* OpcodeString(int op)
case OpDecorateStringGOOGLE: return "OpDecorateStringGOOGLE";
case OpMemberDecorateStringGOOGLE: return "OpMemberDecorateStringGOOGLE";
#ifdef NV_EXTENSIONS
case 5296: return "OpGroupNonUniformPartitionNV";
#endif
case OpcodeCeiling:
default:
return "Bad";
@ -3138,6 +3147,11 @@ void Parameterize()
InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Coordinate'");
InstructionDesc[OpFragmentFetchAMD].operands.push(OperandId, "'Fragment Index'");
#endif
#ifdef NV_EXTENSIONS
InstructionDesc[OpGroupNonUniformPartitionNV].capabilities.push_back(CapabilityGroupNonUniformPartitionedNV);
InstructionDesc[OpGroupNonUniformPartitionNV].operands.push(OperandId, "X");
#endif
}
}; // end spv namespace

View File

@ -572,6 +572,9 @@ enum GroupOperation {
GroupOperationInclusiveScan = 1,
GroupOperationExclusiveScan = 2,
GroupOperationClusteredReduce = 3,
GroupOperationPartitionedReduceNV = 6,
GroupOperationPartitionedInclusiveScanNV = 7,
GroupOperationPartitionedExclusiveScanNV = 8,
GroupOperationMax = 0x7fffffff,
};
@ -688,6 +691,7 @@ enum Capability {
CapabilityShaderStereoViewNV = 5259,
CapabilityPerViewAttributesNV = 5260,
CapabilityFragmentFullyCoveredEXT = 5265,
CapabilityGroupNonUniformPartitionedNV = 5297,
CapabilitySubgroupShuffleINTEL = 5568,
CapabilitySubgroupBufferBlockIOINTEL = 5569,
CapabilitySubgroupImageBlockIOINTEL = 5570,
@ -1051,6 +1055,7 @@ enum Op {
OpGroupSMaxNonUniformAMD = 5007,
OpFragmentMaskFetchAMD = 5011,
OpFragmentFetchAMD = 5012,
OpGroupNonUniformPartitionNV = 5296,
OpSubgroupShuffleINTEL = 5571,
OpSubgroupShuffleDownINTEL = 5572,
OpSubgroupShuffleUpINTEL = 5573,

View File

@ -11,7 +11,7 @@ spv.specConstant.vert
Source GLSL 400
Name 4 "main"
Name 9 "arraySize"
Name 14 "foo(vf4[s2148];"
Name 14 "foo(vf4[s2468];"
Name 13 "p"
Name 17 "builtin_spec_constant("
Name 20 "color"
@ -102,10 +102,10 @@ spv.specConstant.vert
Store 20(color) 46
48: 10 Load 22(ucol)
Store 47(param) 48
49: 2 FunctionCall 14(foo(vf4[s2148];) 47(param)
49: 2 FunctionCall 14(foo(vf4[s2468];) 47(param)
Return
FunctionEnd
14(foo(vf4[s2148];): 2 Function None 12
14(foo(vf4[s2468];): 2 Function None 12
13(p): 11(ptr) FunctionParameter
15: Label
54: 24(ptr) AccessChain 53(dupUcol) 23

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,326 @@
spv.vulkan100.subgroupPartitioned.comp
ERROR: 0:19: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:21: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:22: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:23: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:24: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:26: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:27: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:28: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:29: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:31: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:32: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:33: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:34: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:36: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:37: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:38: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:39: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:41: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:42: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:43: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:44: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:46: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:47: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:48: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:49: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:51: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:52: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:53: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:54: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:56: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:57: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:58: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:59: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:61: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:62: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:63: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:64: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:66: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:67: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:68: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:69: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:71: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:72: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:73: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:74: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:76: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:77: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:78: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:79: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:81: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:82: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:83: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:84: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:86: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:87: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:88: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:89: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:91: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:92: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:93: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:94: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:96: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:97: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:98: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:99: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:101: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:102: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:103: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:104: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:106: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:107: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:108: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:109: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:111: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:112: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:113: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:114: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:116: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:117: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:118: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:119: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:121: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:122: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:123: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:124: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:126: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:127: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:128: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:129: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:131: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:132: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:133: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:134: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:136: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:137: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:138: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:139: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:141: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:142: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:143: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:144: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:146: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:147: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:148: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:149: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:151: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:152: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:153: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:154: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:156: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:157: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:158: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:159: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:161: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:162: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:163: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:164: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:166: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:167: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:168: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:169: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:171: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:172: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:173: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:174: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:176: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:177: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:178: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:179: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:181: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:182: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:183: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:184: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:186: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:187: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:188: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:189: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:191: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:192: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:193: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:194: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:196: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:197: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:198: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:199: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:201: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:202: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:203: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:204: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:206: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:207: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:208: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:209: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:211: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:212: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:213: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:214: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:216: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:217: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:218: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:219: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:221: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:222: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:223: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:224: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:226: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:227: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:228: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:229: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:231: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:232: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:233: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:234: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:236: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:237: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:238: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:239: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:241: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:242: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:243: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:244: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:246: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:247: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:248: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:249: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:251: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:252: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:253: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:254: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:256: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:257: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:258: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:259: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:261: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:262: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:263: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:264: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:266: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:267: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:268: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:269: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:271: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:272: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:273: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:274: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:276: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:277: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:278: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:279: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:281: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:282: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:283: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:284: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:286: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:287: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:288: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:289: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:291: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:292: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:293: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:294: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:296: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:297: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:298: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:299: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:301: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:302: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:303: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:304: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:306: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:307: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:308: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:309: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:311: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:312: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:313: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:314: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:316: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:317: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:318: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:319: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:321: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:322: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:323: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:324: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:326: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:327: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:328: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:329: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:331: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:332: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:333: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:334: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:336: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:337: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:338: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:339: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:341: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:342: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:343: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:344: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:346: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:347: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:348: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:349: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:351: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:352: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:353: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:354: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:356: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:357: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:358: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:359: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:361: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:362: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:363: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:364: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:366: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:367: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:368: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:369: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:371: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:372: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:373: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:374: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:376: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:377: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:378: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:379: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:381: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:382: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:383: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:384: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:386: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:387: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:388: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:389: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:391: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:392: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:393: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:394: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:396: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:397: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:398: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:399: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:401: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:402: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:403: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:404: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:406: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:407: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:408: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:409: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:411: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:412: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:413: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:414: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:416: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:417: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:418: 'subgroup op' : requires SPIR-V 1.3
ERROR: 0:419: 'subgroup op' : requires SPIR-V 1.3
ERROR: 321 compilation errors. No code generated.
SPIR-V is not generated for failed compile or link

420
Test/spv.subgroupPartitioned.comp Executable file
View File

@ -0,0 +1,420 @@
#version 450
#extension GL_NV_shader_subgroup_partitioned: enable
layout (local_size_x = 8) in;
layout(binding = 0) buffer Buffers
{
vec4 f4;
ivec4 i4;
uvec4 u4;
dvec4 d4;
} data[4];
void main()
{
uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;
uvec4 ballot = subgroupPartitionNV(invocation);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].f4);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].i4);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].u4);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].d4);
data[invocation].u4 = subgroupPartitionNV(bool(data[0].i4.x));
data[invocation].u4 = subgroupPartitionNV(bvec2(data[0].i4.xy));
data[invocation].u4 = subgroupPartitionNV(bvec3(data[0].i4.xyz));
data[invocation].u4 = subgroupPartitionNV(bvec4(data[0].i4));
data[invocation].f4.x = subgroupPartitionedAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].f4.x = subgroupPartitionedInclusiveAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedInclusiveOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedInclusiveXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].f4.x = subgroupPartitionedExclusiveAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedExclusiveOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedExclusiveXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
}

View File

@ -0,0 +1,420 @@
#version 450
#extension GL_NV_shader_subgroup_partitioned: enable
layout (local_size_x = 8) in;
layout(binding = 0) buffer Buffers
{
vec4 f4;
ivec4 i4;
uvec4 u4;
dvec4 d4;
} data[4];
void main()
{
uint invocation = (gl_SubgroupInvocationID + gl_SubgroupSize) % 4;
uvec4 ballot = subgroupPartitionNV(invocation);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].f4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].f4);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].i4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].i4);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].u4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].u4);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.x);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.xy);
data[invocation].u4 = subgroupPartitionNV(data[0].d4.xyz);
data[invocation].u4 = subgroupPartitionNV(data[0].d4);
data[invocation].u4 = subgroupPartitionNV(bool(data[0].i4.x));
data[invocation].u4 = subgroupPartitionNV(bvec2(data[0].i4.xy));
data[invocation].u4 = subgroupPartitionNV(bvec3(data[0].i4.xyz));
data[invocation].u4 = subgroupPartitionNV(bvec4(data[0].i4));
data[invocation].f4.x = subgroupPartitionedAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].f4.x = subgroupPartitionedInclusiveAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedInclusiveMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedInclusiveMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedInclusiveMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedInclusiveMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedInclusiveMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedInclusiveMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedInclusiveMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedInclusiveAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedInclusiveOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedInclusiveXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedInclusiveXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedInclusiveXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedInclusiveXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedInclusiveXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedInclusiveXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedInclusiveXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedInclusiveXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedInclusiveXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedInclusiveXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].f4.x = subgroupPartitionedExclusiveAddNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveAddNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveAddNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveAddNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveAddNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveAddNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveAddNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveAddNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveAddNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveAddNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveAddNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveAddNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveAddNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveAddNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveAddNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveAddNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMulNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMulNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMulNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMulNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMulNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMulNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMulNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMulNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMulNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMulNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMulNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMulNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMulNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMulNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMulNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMulNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMinNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMinNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMinNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMinNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMinNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMinNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMinNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMinNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMinNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMinNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMinNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMinNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMinNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMinNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMinNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMinNV(data[3].d4, ballot);
data[invocation].f4.x = subgroupPartitionedExclusiveMaxNV(data[0].f4.x, ballot);
data[invocation].f4.xy = subgroupPartitionedExclusiveMaxNV(data[1].f4.xy, ballot);
data[invocation].f4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].f4.xyz, ballot);
data[invocation].f4 = subgroupPartitionedExclusiveMaxNV(data[3].f4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveMaxNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveMaxNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveMaxNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveMaxNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveMaxNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveMaxNV(data[3].u4, ballot);
data[invocation].d4.x = subgroupPartitionedExclusiveMaxNV(data[0].d4.x, ballot);
data[invocation].d4.xy = subgroupPartitionedExclusiveMaxNV(data[1].d4.xy, ballot);
data[invocation].d4.xyz = subgroupPartitionedExclusiveMaxNV(data[2].d4.xyz, ballot);
data[invocation].d4 = subgroupPartitionedExclusiveMaxNV(data[3].d4, ballot);
data[invocation].i4.x = subgroupPartitionedExclusiveAndNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveAndNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveAndNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveAndNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveAndNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveAndNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveAndNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveAndNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveAndNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveAndNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedExclusiveOrNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveOrNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveOrNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveOrNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveOrNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveOrNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveOrNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveOrNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveOrNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveOrNV(lessThan(data[1].i4, ivec4(0)), ballot));
data[invocation].i4.x = subgroupPartitionedExclusiveXorNV(data[0].i4.x, ballot);
data[invocation].i4.xy = subgroupPartitionedExclusiveXorNV(data[1].i4.xy, ballot);
data[invocation].i4.xyz = subgroupPartitionedExclusiveXorNV(data[2].i4.xyz, ballot);
data[invocation].i4 = subgroupPartitionedExclusiveXorNV(data[3].i4, ballot);
data[invocation].u4.x = subgroupPartitionedExclusiveXorNV(data[0].u4.x, ballot);
data[invocation].u4.xy = subgroupPartitionedExclusiveXorNV(data[1].u4.xy, ballot);
data[invocation].u4.xyz = subgroupPartitionedExclusiveXorNV(data[2].u4.xyz, ballot);
data[invocation].u4 = subgroupPartitionedExclusiveXorNV(data[3].u4, ballot);
data[invocation].i4.x = int(subgroupPartitionedExclusiveXorNV(data[0].i4.x < 0, ballot));
data[invocation].i4.xy = ivec2(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4.xy, ivec2(0)), ballot));
data[invocation].i4.xyz = ivec3(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4.xyz, ivec3(0)), ballot));
data[invocation].i4 = ivec4(subgroupPartitionedExclusiveXorNV(lessThan(data[1].i4, ivec4(0)), ballot));
}

26
glslang/Include/intermediate.h Normal file → Executable file
View File

@ -527,6 +527,32 @@ enum TOperator {
EOpSubgroupQuadSwapHorizontal,
EOpSubgroupQuadSwapVertical,
EOpSubgroupQuadSwapDiagonal,
#ifdef NV_EXTENSIONS
EOpSubgroupPartition,
EOpSubgroupPartitionedAdd,
EOpSubgroupPartitionedMul,
EOpSubgroupPartitionedMin,
EOpSubgroupPartitionedMax,
EOpSubgroupPartitionedAnd,
EOpSubgroupPartitionedOr,
EOpSubgroupPartitionedXor,
EOpSubgroupPartitionedInclusiveAdd,
EOpSubgroupPartitionedInclusiveMul,
EOpSubgroupPartitionedInclusiveMin,
EOpSubgroupPartitionedInclusiveMax,
EOpSubgroupPartitionedInclusiveAnd,
EOpSubgroupPartitionedInclusiveOr,
EOpSubgroupPartitionedInclusiveXor,
EOpSubgroupPartitionedExclusiveAdd,
EOpSubgroupPartitionedExclusiveMul,
EOpSubgroupPartitionedExclusiveMin,
EOpSubgroupPartitionedExclusiveMax,
EOpSubgroupPartitionedExclusiveAnd,
EOpSubgroupPartitionedExclusiveOr,
EOpSubgroupPartitionedExclusiveXor,
#endif
EOpSubgroupGuardStop,
#ifdef AMD_EXTENSIONS

411
glslang/MachineIndependent/Initialize.cpp Normal file → Executable file
View File

@ -2236,6 +2236,298 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"bvec3 subgroupQuadSwapDiagonal(bvec3);\n"
"bvec4 subgroupQuadSwapDiagonal(bvec4);\n"
#ifdef NV_EXTENSIONS
"uvec4 subgroupPartitionNV(float);\n"
"uvec4 subgroupPartitionNV(vec2);\n"
"uvec4 subgroupPartitionNV(vec3);\n"
"uvec4 subgroupPartitionNV(vec4);\n"
"uvec4 subgroupPartitionNV(int);\n"
"uvec4 subgroupPartitionNV(ivec2);\n"
"uvec4 subgroupPartitionNV(ivec3);\n"
"uvec4 subgroupPartitionNV(ivec4);\n"
"uvec4 subgroupPartitionNV(uint);\n"
"uvec4 subgroupPartitionNV(uvec2);\n"
"uvec4 subgroupPartitionNV(uvec3);\n"
"uvec4 subgroupPartitionNV(uvec4);\n"
"uvec4 subgroupPartitionNV(bool);\n"
"uvec4 subgroupPartitionNV(bvec2);\n"
"uvec4 subgroupPartitionNV(bvec3);\n"
"uvec4 subgroupPartitionNV(bvec4);\n"
"float subgroupPartitionedAddNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedAddNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedAddNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedAddNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedAddNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedAddNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedAddNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedAddNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedAddNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedAddNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedAddNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedAddNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedMulNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedMulNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedMulNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedMulNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedMulNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedMulNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedMulNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedMulNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedMulNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedMulNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedMulNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedMulNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedMinNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedMinNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedMinNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedMinNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedMinNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedMinNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedMinNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedMinNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedMinNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedMinNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedMinNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedMinNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedMaxNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedMaxNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedMaxNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedMaxNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedMaxNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedMaxNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedMaxNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedMaxNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedMaxNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedMaxNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedMaxNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedMaxNV(uvec4, uvec4 ballot);\n"
"int subgroupPartitionedAndNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedAndNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedAndNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedAndNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedAndNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedAndNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedAndNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedAndNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedAndNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedAndNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedAndNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedAndNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedOrNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedOrNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedOrNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedOrNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedOrNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedOrNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedOrNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedOrNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedOrNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedOrNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedOrNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedOrNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedXorNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedXorNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedXorNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedXorNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedXorNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedXorNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedXorNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedXorNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedXorNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedXorNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedXorNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedXorNV(bvec4, uvec4 ballot);\n"
"float subgroupPartitionedInclusiveAddNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedInclusiveAddNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedInclusiveAddNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedInclusiveAddNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveAddNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveAddNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveAddNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveAddNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveAddNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveAddNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveAddNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveAddNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedInclusiveMulNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedInclusiveMulNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedInclusiveMulNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedInclusiveMulNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveMulNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveMulNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveMulNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveMulNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveMulNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveMulNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveMulNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveMulNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedInclusiveMinNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedInclusiveMinNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedInclusiveMinNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedInclusiveMinNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveMinNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveMinNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveMinNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveMinNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveMinNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveMinNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveMinNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveMinNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedInclusiveMaxNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedInclusiveMaxNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedInclusiveMaxNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedInclusiveMaxNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveMaxNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveMaxNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveMaxNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveMaxNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveMaxNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveMaxNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveMaxNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveMaxNV(uvec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveAndNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveAndNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveAndNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveAndNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveAndNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveAndNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveAndNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveAndNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedInclusiveAndNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedInclusiveAndNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedInclusiveAndNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedInclusiveAndNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveOrNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveOrNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveOrNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveOrNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveOrNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveOrNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveOrNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveOrNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedInclusiveOrNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedInclusiveOrNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedInclusiveOrNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedInclusiveOrNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedInclusiveXorNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedInclusiveXorNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedInclusiveXorNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedInclusiveXorNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedInclusiveXorNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedInclusiveXorNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedInclusiveXorNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedInclusiveXorNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedInclusiveXorNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedInclusiveXorNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedInclusiveXorNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedInclusiveXorNV(bvec4, uvec4 ballot);\n"
"float subgroupPartitionedExclusiveAddNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedExclusiveAddNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedExclusiveAddNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedExclusiveAddNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveAddNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveAddNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveAddNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveAddNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveAddNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveAddNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveAddNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveAddNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedExclusiveMulNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedExclusiveMulNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedExclusiveMulNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedExclusiveMulNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveMulNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveMulNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveMulNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveMulNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveMulNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveMulNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveMulNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveMulNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedExclusiveMinNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedExclusiveMinNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedExclusiveMinNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedExclusiveMinNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveMinNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveMinNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveMinNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveMinNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveMinNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveMinNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveMinNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveMinNV(uvec4, uvec4 ballot);\n"
"float subgroupPartitionedExclusiveMaxNV(float, uvec4 ballot);\n"
"vec2 subgroupPartitionedExclusiveMaxNV(vec2, uvec4 ballot);\n"
"vec3 subgroupPartitionedExclusiveMaxNV(vec3, uvec4 ballot);\n"
"vec4 subgroupPartitionedExclusiveMaxNV(vec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveMaxNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveMaxNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveMaxNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveMaxNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveMaxNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveMaxNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveMaxNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveMaxNV(uvec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveAndNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveAndNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveAndNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveAndNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveAndNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveAndNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveAndNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveAndNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedExclusiveAndNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedExclusiveAndNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedExclusiveAndNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedExclusiveAndNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveOrNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveOrNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveOrNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveOrNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveOrNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveOrNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveOrNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveOrNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedExclusiveOrNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedExclusiveOrNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedExclusiveOrNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedExclusiveOrNV(bvec4, uvec4 ballot);\n"
"int subgroupPartitionedExclusiveXorNV(int, uvec4 ballot);\n"
"ivec2 subgroupPartitionedExclusiveXorNV(ivec2, uvec4 ballot);\n"
"ivec3 subgroupPartitionedExclusiveXorNV(ivec3, uvec4 ballot);\n"
"ivec4 subgroupPartitionedExclusiveXorNV(ivec4, uvec4 ballot);\n"
"uint subgroupPartitionedExclusiveXorNV(uint, uvec4 ballot);\n"
"uvec2 subgroupPartitionedExclusiveXorNV(uvec2, uvec4 ballot);\n"
"uvec3 subgroupPartitionedExclusiveXorNV(uvec3, uvec4 ballot);\n"
"uvec4 subgroupPartitionedExclusiveXorNV(uvec4, uvec4 ballot);\n"
"bool subgroupPartitionedExclusiveXorNV(bool, uvec4 ballot);\n"
"bvec2 subgroupPartitionedExclusiveXorNV(bvec2, uvec4 ballot);\n"
"bvec3 subgroupPartitionedExclusiveXorNV(bvec3, uvec4 ballot);\n"
"bvec4 subgroupPartitionedExclusiveXorNV(bvec4, uvec4 ballot);\n"
#endif
"\n");
if (profile != EEsProfile && version >= 400) {
@ -2375,6 +2667,74 @@ void TBuiltIns::initialize(int version, EProfile profile, const SpvVersion& spvV
"dvec3 subgroupQuadSwapDiagonal(dvec3);\n"
"dvec4 subgroupQuadSwapDiagonal(dvec4);\n"
#ifdef NV_EXTENSIONS
"uvec4 subgroupPartitionNV(double);\n"
"uvec4 subgroupPartitionNV(dvec2);\n"
"uvec4 subgroupPartitionNV(dvec3);\n"
"uvec4 subgroupPartitionNV(dvec4);\n"
"double subgroupPartitionedAddNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedAddNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedAddNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedAddNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedMulNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedMulNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedMulNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedMulNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedMinNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedMinNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedMinNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedMinNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedMaxNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedMaxNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedMaxNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedMaxNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedInclusiveAddNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedInclusiveAddNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedInclusiveAddNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedInclusiveAddNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedInclusiveMulNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedInclusiveMulNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedInclusiveMulNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedInclusiveMulNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedInclusiveMinNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedInclusiveMinNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedInclusiveMinNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedInclusiveMinNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedInclusiveMaxNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedInclusiveMaxNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedInclusiveMaxNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedInclusiveMaxNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedExclusiveAddNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedExclusiveAddNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedExclusiveAddNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedExclusiveAddNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedExclusiveMulNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedExclusiveMulNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedExclusiveMulNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedExclusiveMulNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedExclusiveMinNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedExclusiveMinNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedExclusiveMinNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedExclusiveMinNV(dvec4, uvec4 ballot);\n"
"double subgroupPartitionedExclusiveMaxNV(double, uvec4 ballot);\n"
"dvec2 subgroupPartitionedExclusiveMaxNV(dvec2, uvec4 ballot);\n"
"dvec3 subgroupPartitionedExclusiveMaxNV(dvec3, uvec4 ballot);\n"
"dvec4 subgroupPartitionedExclusiveMaxNV(dvec4, uvec4 ballot);\n"
#endif
"\n");
}
@ -7571,6 +7931,32 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.setFunctionExtensions("subgroupQuadSwapHorizontal", 1, &E_GL_KHR_shader_subgroup_quad);
symbolTable.setFunctionExtensions("subgroupQuadSwapVertical", 1, &E_GL_KHR_shader_subgroup_quad);
symbolTable.setFunctionExtensions("subgroupQuadSwapDiagonal", 1, &E_GL_KHR_shader_subgroup_quad);
#ifdef NV_EXTENSIONS
symbolTable.setFunctionExtensions("subgroupPartitionNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedAddNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedMulNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedMinNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedAndNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedOrNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedXorNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedInclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAddNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMulNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMinNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveMaxNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveAndNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveOrNV", 1, &E_GL_NV_shader_subgroup_partitioned);
symbolTable.setFunctionExtensions("subgroupPartitionedExclusiveXorNV", 1, &E_GL_NV_shader_subgroup_partitioned);
#endif
}
if (profile == EEsProfile) {
@ -8107,6 +8493,31 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
symbolTable.relateToOperator("subgroupQuadSwapHorizontal", EOpSubgroupQuadSwapHorizontal);
symbolTable.relateToOperator("subgroupQuadSwapVertical", EOpSubgroupQuadSwapVertical);
symbolTable.relateToOperator("subgroupQuadSwapDiagonal", EOpSubgroupQuadSwapDiagonal);
#ifdef NV_EXTENSIONS
symbolTable.relateToOperator("subgroupPartitionNV", EOpSubgroupPartition);
symbolTable.relateToOperator("subgroupPartitionedAddNV", EOpSubgroupPartitionedAdd);
symbolTable.relateToOperator("subgroupPartitionedMulNV", EOpSubgroupPartitionedMul);
symbolTable.relateToOperator("subgroupPartitionedMinNV", EOpSubgroupPartitionedMin);
symbolTable.relateToOperator("subgroupPartitionedMaxNV", EOpSubgroupPartitionedMax);
symbolTable.relateToOperator("subgroupPartitionedAndNV", EOpSubgroupPartitionedAnd);
symbolTable.relateToOperator("subgroupPartitionedOrNV", EOpSubgroupPartitionedOr);
symbolTable.relateToOperator("subgroupPartitionedXorNV", EOpSubgroupPartitionedXor);
symbolTable.relateToOperator("subgroupPartitionedInclusiveAddNV", EOpSubgroupPartitionedInclusiveAdd);
symbolTable.relateToOperator("subgroupPartitionedInclusiveMulNV", EOpSubgroupPartitionedInclusiveMul);
symbolTable.relateToOperator("subgroupPartitionedInclusiveMinNV", EOpSubgroupPartitionedInclusiveMin);
symbolTable.relateToOperator("subgroupPartitionedInclusiveMaxNV", EOpSubgroupPartitionedInclusiveMax);
symbolTable.relateToOperator("subgroupPartitionedInclusiveAndNV", EOpSubgroupPartitionedInclusiveAnd);
symbolTable.relateToOperator("subgroupPartitionedInclusiveOrNV", EOpSubgroupPartitionedInclusiveOr);
symbolTable.relateToOperator("subgroupPartitionedInclusiveXorNV", EOpSubgroupPartitionedInclusiveXor);
symbolTable.relateToOperator("subgroupPartitionedExclusiveAddNV", EOpSubgroupPartitionedExclusiveAdd);
symbolTable.relateToOperator("subgroupPartitionedExclusiveMulNV", EOpSubgroupPartitionedExclusiveMul);
symbolTable.relateToOperator("subgroupPartitionedExclusiveMinNV", EOpSubgroupPartitionedExclusiveMin);
symbolTable.relateToOperator("subgroupPartitionedExclusiveMaxNV", EOpSubgroupPartitionedExclusiveMax);
symbolTable.relateToOperator("subgroupPartitionedExclusiveAndNV", EOpSubgroupPartitionedExclusiveAnd);
symbolTable.relateToOperator("subgroupPartitionedExclusiveOrNV", EOpSubgroupPartitionedExclusiveOr);
symbolTable.relateToOperator("subgroupPartitionedExclusiveXorNV", EOpSubgroupPartitionedExclusiveXor);
#endif
}
if (profile == EEsProfile) {

6
glslang/MachineIndependent/Versions.cpp Normal file → Executable file
View File

@ -226,6 +226,7 @@ void TParseVersions::initializeExtensionBehavior()
extensionBehavior[E_GL_NV_shader_atomic_int64] = EBhDisable;
extensionBehavior[E_GL_NV_conservative_raster_underestimation] = EBhDisable;
extensionBehavior[E_GL_NV_shader_noperspective_interpolation] = EBhDisable;
extensionBehavior[E_GL_NV_shader_subgroup_partitioned] = EBhDisable;
#endif
// AEP
@ -389,6 +390,7 @@ void TParseVersions::getPreamble(std::string& preamble)
"#define GL_NV_viewport_array2 1\n"
"#define GL_NV_shader_atomic_int64 1\n"
"#define GL_NV_conservative_raster_underestimation 1\n"
"#define GL_NV_shader_subgroup_partitioned 1\n"
#endif
"#define GL_KHX_shader_explicit_arithmetic_types 1\n"
"#define GL_KHX_shader_explicit_arithmetic_types_int8 1\n"
@ -750,6 +752,10 @@ void TParseVersions::updateExtensionBehavior(int line, const char* extension, co
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
else if (strcmp(extension, "GL_KHR_shader_subgroup_quad") == 0)
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
#ifdef NV_EXTENSIONS
else if (strcmp(extension, "GL_NV_shader_subgroup_partitioned") == 0)
updateExtensionBehavior(line, "GL_KHR_shader_subgroup_basic", behaviorString);
#endif
}
void TParseVersions::updateExtensionBehavior(const char* extension, TExtensionBehavior behavior)

1
glslang/MachineIndependent/Versions.h Normal file → Executable file
View File

@ -197,6 +197,7 @@ const char* const E_GL_NVX_multiview_per_view_attributes = "GL_NVX_multiv
const char* const E_GL_NV_shader_atomic_int64 = "GL_NV_shader_atomic_int64";
const char* const E_GL_NV_conservative_raster_underestimation = "GL_NV_conservative_raster_underestimation";
const char* const E_GL_NV_shader_noperspective_interpolation = "GL_NV_shader_noperspective_interpolation";
const char* const E_GL_NV_shader_subgroup_partitioned = "GL_NV_shader_subgroup_partitioned";
// Arrays of extensions for the above viewportEXTs duplications

View File

@ -599,6 +599,31 @@ bool TOutputTraverser::visitUnary(TVisit /* visit */, TIntermUnary* node)
case EOpSubgroupQuadSwapVertical: out.debug << "subgroupQuadSwapVertical"; break;
case EOpSubgroupQuadSwapDiagonal: out.debug << "subgroupQuadSwapDiagonal"; break;
#ifdef NV_EXTENSIONS
case EOpSubgroupPartition: out.debug << "subgroupPartitionNV"; break;
case EOpSubgroupPartitionedAdd: out.debug << "subgroupPartitionedAddNV"; break;
case EOpSubgroupPartitionedMul: out.debug << "subgroupPartitionedMulNV"; break;
case EOpSubgroupPartitionedMin: out.debug << "subgroupPartitionedMinNV"; break;
case EOpSubgroupPartitionedMax: out.debug << "subgroupPartitionedMaxNV"; break;
case EOpSubgroupPartitionedAnd: out.debug << "subgroupPartitionedAndNV"; break;
case EOpSubgroupPartitionedOr: out.debug << "subgroupPartitionedOrNV"; break;
case EOpSubgroupPartitionedXor: out.debug << "subgroupPartitionedXorNV"; break;
case EOpSubgroupPartitionedInclusiveAdd: out.debug << "subgroupPartitionedInclusiveAddNV"; break;
case EOpSubgroupPartitionedInclusiveMul: out.debug << "subgroupPartitionedInclusiveMulNV"; break;
case EOpSubgroupPartitionedInclusiveMin: out.debug << "subgroupPartitionedInclusiveMinNV"; break;
case EOpSubgroupPartitionedInclusiveMax: out.debug << "subgroupPartitionedInclusiveMaxNV"; break;
case EOpSubgroupPartitionedInclusiveAnd: out.debug << "subgroupPartitionedInclusiveAndNV"; break;
case EOpSubgroupPartitionedInclusiveOr: out.debug << "subgroupPartitionedInclusiveOrNV"; break;
case EOpSubgroupPartitionedInclusiveXor: out.debug << "subgroupPartitionedInclusiveXorNV"; break;
case EOpSubgroupPartitionedExclusiveAdd: out.debug << "subgroupPartitionedExclusiveAddNV"; break;
case EOpSubgroupPartitionedExclusiveMul: out.debug << "subgroupPartitionedExclusiveMulNV"; break;
case EOpSubgroupPartitionedExclusiveMin: out.debug << "subgroupPartitionedExclusiveMinNV"; break;
case EOpSubgroupPartitionedExclusiveMax: out.debug << "subgroupPartitionedExclusiveMaxNV"; break;
case EOpSubgroupPartitionedExclusiveAnd: out.debug << "subgroupPartitionedExclusiveAndNV"; break;
case EOpSubgroupPartitionedExclusiveOr: out.debug << "subgroupPartitionedExclusiveOrNV"; break;
case EOpSubgroupPartitionedExclusiveXor: out.debug << "subgroupPartitionedExclusiveXorNV"; break;
#endif
case EOpClip: out.debug << "clip"; break;
case EOpIsFinite: out.debug << "isfinite"; break;
case EOpLog10: out.debug << "log10"; break;

2
gtests/Spv.FromFile.cpp Normal file → Executable file
View File

@ -338,6 +338,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.precise.tese",
"spv.precise.tesc",
"spv.vulkan100.subgroupArithmetic.comp",
"spv.vulkan100.subgroupPartitioned.comp",
"spv.xfb.vert",
"spv.xfb2.vert",
"spv.xfb3.vert",
@ -368,6 +369,7 @@ INSTANTIATE_TEST_CASE_P(
"spv.subgroupBallot.comp",
"spv.subgroupClustered.comp",
"spv.subgroupClusteredNeg.comp",
"spv.subgroupPartitioned.comp",
"spv.subgroupShuffle.comp",
"spv.subgroupShuffleRelative.comp",
"spv.subgroupQuad.comp",