Add AST tests for mesh and task shaders

with subgroup touch testing (error and non-error cases)

Add missing symbolTable.relateToOperator("subgroupMemoryBarrierShared") call for
Mesh/Task shaders so they don't assert in ParseHelper.cpp
This commit is contained in:
Daniel Koch 2019-05-30 01:08:41 -04:00
parent 51760c88ca
commit 3418cb4c98
6 changed files with 2784 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,945 @@
glsl.460.subgroup.task
ERROR: 0:6: 'gl_SubgroupSize' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:7: 'gl_SubgroupInvocationID' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:8: 'subgroupBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:9: 'subgroupMemoryBarrier' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:10: 'subgroupMemoryBarrierBuffer' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:11: 'subgroupMemoryBarrierImage' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:12: 'subgroupElect' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:13: 'gl_NumSubgroups' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:14: 'gl_SubgroupID' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:15: 'subgroupMemoryBarrierShared' : required extension not requested: GL_KHR_shader_subgroup_basic
ERROR: 0:17: 'subgroupAll' : required extension not requested: GL_KHR_shader_subgroup_vote
ERROR: 0:18: 'subgroupAny' : required extension not requested: GL_KHR_shader_subgroup_vote
ERROR: 0:19: 'subgroupAllEqual' : required extension not requested: GL_KHR_shader_subgroup_vote
ERROR: 0:21: 'gl_SubgroupEqMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:22: 'gl_SubgroupGeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:23: 'gl_SubgroupGtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:24: 'gl_SubgroupLeMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:25: 'gl_SubgroupLtMask' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:26: 'subgroupBroadcast' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:27: 'subgroupBroadcastFirst' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:28: 'subgroupBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:29: 'subgroupInverseBallot' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:30: 'subgroupBallotBitExtract' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:31: 'subgroupBallotBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:32: 'subgroupBallotInclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:33: 'subgroupBallotExclusiveBitCount' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:34: 'subgroupBallotFindLSB' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:35: 'subgroupBallotFindMSB' : required extension not requested: GL_KHR_shader_subgroup_ballot
ERROR: 0:37: 'subgroupShuffle' : required extension not requested: GL_KHR_shader_subgroup_shuffle
ERROR: 0:38: 'subgroupShuffleXor' : required extension not requested: GL_KHR_shader_subgroup_shuffle
ERROR: 0:39: 'subgroupShuffleUp' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative
ERROR: 0:40: 'subgroupShuffleDown' : required extension not requested: GL_KHR_shader_subgroup_shuffle_relative
ERROR: 0:42: 'subgroupAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:43: 'subgroupMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:44: 'subgroupMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:45: 'subgroupMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:46: 'subgroupAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:47: 'subgroupOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:48: 'subgroupXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:49: 'subgroupInclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:50: 'subgroupInclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:51: 'subgroupInclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:52: 'subgroupInclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:53: 'subgroupInclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:54: 'subgroupInclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:55: 'subgroupInclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:56: 'subgroupExclusiveAdd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:57: 'subgroupExclusiveMul' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:58: 'subgroupExclusiveMin' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:59: 'subgroupExclusiveMax' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:60: 'subgroupExclusiveAnd' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:61: 'subgroupExclusiveOr' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:62: 'subgroupExclusiveXor' : required extension not requested: GL_KHR_shader_subgroup_arithmetic
ERROR: 0:64: 'subgroupClusteredAdd' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:65: 'subgroupClusteredMul' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:66: 'subgroupClusteredMin' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:67: 'subgroupClusteredMax' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:68: 'subgroupClusteredAnd' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:69: 'subgroupClusteredOr' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:70: 'subgroupClusteredXor' : required extension not requested: GL_KHR_shader_subgroup_clustered
ERROR: 0:72: 'subgroupQuadBroadcast' : required extension not requested: GL_KHR_shader_subgroup_quad
ERROR: 0:73: 'subgroupQuadSwapHorizontal' : required extension not requested: GL_KHR_shader_subgroup_quad
ERROR: 0:74: 'subgroupQuadSwapVertical' : required extension not requested: GL_KHR_shader_subgroup_quad
ERROR: 0:75: 'subgroupQuadSwapDiagonal' : required extension not requested: GL_KHR_shader_subgroup_quad
ERROR: 0:77: 'subgroupPartitionNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:78: 'subgroupPartitionedAddNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:79: 'subgroupPartitionedMulNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:80: 'subgroupPartitionedMinNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:81: 'subgroupPartitionedMaxNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:82: 'subgroupPartitionedAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:83: 'subgroupPartitionedOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:84: 'subgroupPartitionedXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:85: 'subgroupPartitionedInclusiveAddNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:86: 'subgroupPartitionedInclusiveMulNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:87: 'subgroupPartitionedInclusiveMinNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:88: 'subgroupPartitionedInclusiveMaxNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:89: 'subgroupPartitionedInclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:90: 'subgroupPartitionedInclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:91: 'subgroupPartitionedInclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:92: 'subgroupPartitionedExclusiveAddNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:93: 'subgroupPartitionedExclusiveMulNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:94: 'subgroupPartitionedExclusiveMinNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:95: 'subgroupPartitionedExclusiveMaxNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:96: 'subgroupPartitionedExclusiveAndNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:97: 'subgroupPartitionedExclusiveOrNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 0:98: 'subgroupPartitionedExclusiveXorNV' : required extension not requested: GL_NV_shader_subgroup_partitioned
ERROR: 86 compilation errors. No code generated.
Shader version: 460
Requested GL_KHR_shader_subgroup_arithmetic
Requested GL_KHR_shader_subgroup_ballot
Requested GL_KHR_shader_subgroup_basic
Requested GL_KHR_shader_subgroup_clustered
Requested GL_KHR_shader_subgroup_quad
Requested GL_KHR_shader_subgroup_shuffle
Requested GL_KHR_shader_subgroup_shuffle_relative
Requested GL_KHR_shader_subgroup_vote
Requested GL_NV_mesh_shader
Requested GL_NV_shader_subgroup_partitioned
local_size = (32, 1, 1)
ERROR: node is still EOpNull!
0:3 Function Definition: undeclared_errors(vf4; ( global 4-component vector of float)
0:3 Function Parameters:
0:3 'f4' ( in 4-component vector of float)
0:? Sequence
0:6 'gl_SubgroupSize' ( in uint unknown built-in variable)
0:7 'gl_SubgroupInvocationID' ( in uint unknown built-in variable)
0:8 subgroupBarrier ( global void)
0:9 subgroupMemoryBarrier ( global void)
0:10 subgroupMemoryBarrierBuffer ( global void)
0:11 subgroupMemoryBarrierImage ( global void)
0:12 subgroupElect ( global bool)
0:13 'gl_NumSubgroups' ( in uint unknown built-in variable)
0:14 'gl_SubgroupID' ( in uint unknown built-in variable)
0:15 subgroupMemoryBarrierShared ( global void)
0:17 subgroupAll ( global bool)
0:17 Constant:
0:17 true (const bool)
0:18 subgroupAny ( global bool)
0:18 Constant:
0:18 false (const bool)
0:19 subgroupAllEqual ( global bool)
0:19 'f4' ( in 4-component vector of float)
0:21 'gl_SubgroupEqMask' ( in 4-component vector of uint unknown built-in variable)
0:22 'gl_SubgroupGeMask' ( in 4-component vector of uint unknown built-in variable)
0:23 'gl_SubgroupGtMask' ( in 4-component vector of uint unknown built-in variable)
0:24 'gl_SubgroupLeMask' ( in 4-component vector of uint unknown built-in variable)
0:25 'gl_SubgroupLtMask' ( in 4-component vector of uint unknown built-in variable)
0:26 subgroupBroadcast ( global 4-component vector of float)
0:26 'f4' ( in 4-component vector of float)
0:26 Constant:
0:26 0 (const uint)
0:27 subgroupBroadcastFirst ( global 4-component vector of float)
0:27 'f4' ( in 4-component vector of float)
0:28 Sequence
0:28 move second child to first child ( temp 4-component vector of uint)
0:28 'ballot' ( temp 4-component vector of uint)
0:28 subgroupBallot ( global 4-component vector of uint)
0:28 Constant:
0:28 false (const bool)
0:29 subgroupInverseBallot ( global bool)
0:29 Constant:
0:29 1 (const uint)
0:29 1 (const uint)
0:29 1 (const uint)
0:29 1 (const uint)
0:30 subgroupBallotBitExtract ( global bool)
0:30 'ballot' ( temp 4-component vector of uint)
0:30 Constant:
0:30 0 (const uint)
0:31 subgroupBallotBitCount ( global uint)
0:31 'ballot' ( temp 4-component vector of uint)
0:32 subgroupBallotInclusiveBitCount ( global uint)
0:32 'ballot' ( temp 4-component vector of uint)
0:33 subgroupBallotExclusiveBitCount ( global uint)
0:33 'ballot' ( temp 4-component vector of uint)
0:34 subgroupBallotFindLSB ( global uint)
0:34 'ballot' ( temp 4-component vector of uint)
0:35 subgroupBallotFindMSB ( global uint)
0:35 'ballot' ( temp 4-component vector of uint)
0:37 subgroupShuffle ( global 4-component vector of float)
0:37 'f4' ( in 4-component vector of float)
0:37 Constant:
0:37 0 (const uint)
0:38 subgroupShuffleXor ( global 4-component vector of float)
0:38 'f4' ( in 4-component vector of float)
0:38 Constant:
0:38 1 (const uint)
0:39 subgroupShuffleUp ( global 4-component vector of float)
0:39 'f4' ( in 4-component vector of float)
0:39 Constant:
0:39 1 (const uint)
0:40 subgroupShuffleDown ( global 4-component vector of float)
0:40 'f4' ( in 4-component vector of float)
0:40 Constant:
0:40 1 (const uint)
0:42 move second child to first child ( temp 4-component vector of float)
0:42 'result' ( temp 4-component vector of float)
0:42 subgroupAdd ( global 4-component vector of float)
0:42 'f4' ( in 4-component vector of float)
0:43 subgroupMul ( global 4-component vector of float)
0:43 'f4' ( in 4-component vector of float)
0:44 subgroupMin ( global 4-component vector of float)
0:44 'f4' ( in 4-component vector of float)
0:45 subgroupMax ( global 4-component vector of float)
0:45 'f4' ( in 4-component vector of float)
0:46 subgroupAnd ( global 4-component vector of uint)
0:46 'ballot' ( temp 4-component vector of uint)
0:47 subgroupOr ( global 4-component vector of uint)
0:47 'ballot' ( temp 4-component vector of uint)
0:48 subgroupXor ( global 4-component vector of uint)
0:48 'ballot' ( temp 4-component vector of uint)
0:49 subgroupInclusiveAdd ( global 4-component vector of float)
0:49 'f4' ( in 4-component vector of float)
0:50 subgroupInclusiveMul ( global 4-component vector of float)
0:50 'f4' ( in 4-component vector of float)
0:51 subgroupInclusiveMin ( global 4-component vector of float)
0:51 'f4' ( in 4-component vector of float)
0:52 subgroupInclusiveMax ( global 4-component vector of float)
0:52 'f4' ( in 4-component vector of float)
0:53 subgroupInclusiveAnd ( global 4-component vector of uint)
0:53 'ballot' ( temp 4-component vector of uint)
0:54 subgroupInclusiveOr ( global 4-component vector of uint)
0:54 'ballot' ( temp 4-component vector of uint)
0:55 subgroupInclusiveXor ( global 4-component vector of uint)
0:55 'ballot' ( temp 4-component vector of uint)
0:56 subgroupExclusiveAdd ( global 4-component vector of float)
0:56 'f4' ( in 4-component vector of float)
0:57 subgroupExclusiveMul ( global 4-component vector of float)
0:57 'f4' ( in 4-component vector of float)
0:58 subgroupExclusiveMin ( global 4-component vector of float)
0:58 'f4' ( in 4-component vector of float)
0:59 subgroupExclusiveMax ( global 4-component vector of float)
0:59 'f4' ( in 4-component vector of float)
0:60 subgroupExclusiveAnd ( global 4-component vector of uint)
0:60 'ballot' ( temp 4-component vector of uint)
0:61 subgroupExclusiveOr ( global 4-component vector of uint)
0:61 'ballot' ( temp 4-component vector of uint)
0:62 subgroupExclusiveXor ( global 4-component vector of uint)
0:62 'ballot' ( temp 4-component vector of uint)
0:64 subgroupClusteredAdd ( global 4-component vector of float)
0:64 'f4' ( in 4-component vector of float)
0:64 Constant:
0:64 2 (const uint)
0:65 subgroupClusteredMul ( global 4-component vector of float)
0:65 'f4' ( in 4-component vector of float)
0:65 Constant:
0:65 2 (const uint)
0:66 subgroupClusteredMin ( global 4-component vector of float)
0:66 'f4' ( in 4-component vector of float)
0:66 Constant:
0:66 2 (const uint)
0:67 subgroupClusteredMax ( global 4-component vector of float)
0:67 'f4' ( in 4-component vector of float)
0:67 Constant:
0:67 2 (const uint)
0:68 subgroupClusteredAnd ( global 4-component vector of uint)
0:68 'ballot' ( temp 4-component vector of uint)
0:68 Constant:
0:68 2 (const uint)
0:69 subgroupClusteredOr ( global 4-component vector of uint)
0:69 'ballot' ( temp 4-component vector of uint)
0:69 Constant:
0:69 2 (const uint)
0:70 subgroupClusteredXor ( global 4-component vector of uint)
0:70 'ballot' ( temp 4-component vector of uint)
0:70 Constant:
0:70 2 (const uint)
0:72 subgroupQuadBroadcast ( global 4-component vector of float)
0:72 'f4' ( in 4-component vector of float)
0:72 Constant:
0:72 0 (const uint)
0:73 subgroupQuadSwapHorizontal ( global 4-component vector of float)
0:73 'f4' ( in 4-component vector of float)
0:74 subgroupQuadSwapVertical ( global 4-component vector of float)
0:74 'f4' ( in 4-component vector of float)
0:75 subgroupQuadSwapDiagonal ( global 4-component vector of float)
0:75 'f4' ( in 4-component vector of float)
0:77 Sequence
0:77 move second child to first child ( temp 4-component vector of uint)
0:77 'parti' ( temp 4-component vector of uint)
0:77 subgroupPartitionNV ( global 4-component vector of uint)
0:77 'f4' ( in 4-component vector of float)
0:78 ERROR: Bad aggregation op
( global 4-component vector of float)
0:78 'f4' ( in 4-component vector of float)
0:78 'parti' ( temp 4-component vector of uint)
0:79 ERROR: Bad aggregation op
( global 4-component vector of float)
0:79 'f4' ( in 4-component vector of float)
0:79 'parti' ( temp 4-component vector of uint)
0:80 ERROR: Bad aggregation op
( global 4-component vector of float)
0:80 'f4' ( in 4-component vector of float)
0:80 'parti' ( temp 4-component vector of uint)
0:81 ERROR: Bad aggregation op
( global 4-component vector of float)
0:81 'f4' ( in 4-component vector of float)
0:81 'parti' ( temp 4-component vector of uint)
0:82 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:82 'ballot' ( temp 4-component vector of uint)
0:82 'parti' ( temp 4-component vector of uint)
0:83 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:83 'ballot' ( temp 4-component vector of uint)
0:83 'parti' ( temp 4-component vector of uint)
0:84 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:84 'ballot' ( temp 4-component vector of uint)
0:84 'parti' ( temp 4-component vector of uint)
0:85 ERROR: Bad aggregation op
( global 4-component vector of float)
0:85 'f4' ( in 4-component vector of float)
0:85 'parti' ( temp 4-component vector of uint)
0:86 ERROR: Bad aggregation op
( global 4-component vector of float)
0:86 'f4' ( in 4-component vector of float)
0:86 'parti' ( temp 4-component vector of uint)
0:87 ERROR: Bad aggregation op
( global 4-component vector of float)
0:87 'f4' ( in 4-component vector of float)
0:87 'parti' ( temp 4-component vector of uint)
0:88 ERROR: Bad aggregation op
( global 4-component vector of float)
0:88 'f4' ( in 4-component vector of float)
0:88 'parti' ( temp 4-component vector of uint)
0:89 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:89 'ballot' ( temp 4-component vector of uint)
0:89 'parti' ( temp 4-component vector of uint)
0:90 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:90 'ballot' ( temp 4-component vector of uint)
0:90 'parti' ( temp 4-component vector of uint)
0:91 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:91 'ballot' ( temp 4-component vector of uint)
0:91 'parti' ( temp 4-component vector of uint)
0:92 ERROR: Bad aggregation op
( global 4-component vector of float)
0:92 'f4' ( in 4-component vector of float)
0:92 'parti' ( temp 4-component vector of uint)
0:93 ERROR: Bad aggregation op
( global 4-component vector of float)
0:93 'f4' ( in 4-component vector of float)
0:93 'parti' ( temp 4-component vector of uint)
0:94 ERROR: Bad aggregation op
( global 4-component vector of float)
0:94 'f4' ( in 4-component vector of float)
0:94 'parti' ( temp 4-component vector of uint)
0:95 ERROR: Bad aggregation op
( global 4-component vector of float)
0:95 'f4' ( in 4-component vector of float)
0:95 'parti' ( temp 4-component vector of uint)
0:96 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:96 'ballot' ( temp 4-component vector of uint)
0:96 'parti' ( temp 4-component vector of uint)
0:97 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:97 'ballot' ( temp 4-component vector of uint)
0:97 'parti' ( temp 4-component vector of uint)
0:98 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:98 'ballot' ( temp 4-component vector of uint)
0:98 'parti' ( temp 4-component vector of uint)
0:100 Branch: Return with expression
0:100 'result' ( temp 4-component vector of float)
0:127 Function Definition: main( ( global void)
0:127 Function Parameters:
0:129 Sequence
0:129 Sequence
0:129 move second child to first child ( temp uint)
0:129 'iid' ( temp uint)
0:129 direct index ( temp uint)
0:129 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
0:129 Constant:
0:129 0 (const int)
0:130 Sequence
0:130 move second child to first child ( temp uint)
0:130 'gid' ( temp uint)
0:130 direct index ( temp uint)
0:130 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID)
0:130 Constant:
0:130 0 (const int)
0:131 Sequence
0:131 move second child to first child ( temp uint)
0:131 'viewID' ( temp uint)
0:131 indirect index ( temp uint MeshViewIndicesNV)
0:131 'gl_MeshViewIndicesNV' ( in 4-element array of uint MeshViewIndicesNV)
0:131 mod ( temp uint)
0:131 'gl_MeshViewCountNV' ( in uint MeshViewCountNV)
0:131 Constant:
0:131 4 (const uint)
0:134 Sequence
0:134 Sequence
0:134 move second child to first child ( temp uint)
0:134 'i' ( temp uint)
0:134 Constant:
0:134 0 (const uint)
0:134 Loop with condition tested first
0:134 Loop Condition
0:134 Compare Less Than ( temp bool)
0:134 'i' ( temp uint)
0:134 Constant:
0:134 10 (const uint)
0:134 Loop Body
0:135 Sequence
0:135 move second child to first child ( temp 4-component vector of float)
0:135 indirect index ( temp 4-component vector of float)
0:135 'mem' ( shared 10-element array of 4-component vector of float)
0:135 'i' ( temp uint)
0:135 Construct vec4 ( temp 4-component vector of float)
0:135 Convert uint to float ( temp float)
0:135 add ( temp uint)
0:135 'i' ( temp uint)
0:135 uni_value: direct index for structure (layout( column_major shared) uniform uint)
0:135 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
0:135 Constant:
0:135 0 (const uint)
0:134 Loop Terminal Expression
0:134 Pre-Increment ( temp uint)
0:134 'i' ( temp uint)
0:137 imageStore ( global void)
0:137 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:137 Construct ivec2 ( temp 2-component vector of int)
0:137 Convert uint to int ( temp int)
0:137 'iid' ( temp uint)
0:137 indirect index ( temp 4-component vector of float)
0:137 'mem' ( shared 10-element array of 4-component vector of float)
0:137 'gid' ( temp uint)
0:138 imageStore ( global void)
0:138 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:138 Construct ivec2 ( temp 2-component vector of int)
0:138 Convert uint to int ( temp int)
0:138 'iid' ( temp uint)
0:138 indirect index ( temp 4-component vector of float)
0:138 'mem' ( shared 10-element array of 4-component vector of float)
0:138 add ( temp uint)
0:138 'gid' ( temp uint)
0:138 Constant:
0:138 1 (const uint)
0:140 MemoryBarrierShared ( global void)
0:140 Barrier ( global void)
0:144 move second child to first child ( temp 2-component vector of float)
0:144 dummy: direct index for structure (layout( std430 offset=0) taskNV out 2-component vector of float)
0:144 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:144 Constant:
0:144 0 (const int)
0:144 Constant:
0:144 30.000000
0:144 31.000000
0:145 move second child to first child ( temp 2-component vector of float)
0:145 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:145 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:145 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:145 Constant:
0:145 1 (const int)
0:145 Constant:
0:145 0 (const int)
0:145 Constant:
0:145 32.000000
0:145 33.000000
0:146 move second child to first child ( temp 2-component vector of float)
0:146 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:146 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:146 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:146 Constant:
0:146 1 (const int)
0:146 Constant:
0:146 1 (const int)
0:146 Constant:
0:146 34.000000
0:146 35.000000
0:147 move second child to first child ( temp 2-component vector of float)
0:147 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:147 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:147 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:147 Constant:
0:147 1 (const int)
0:147 Constant:
0:147 2 (const int)
0:147 indirect index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:147 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:147 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:147 Constant:
0:147 1 (const int)
0:147 mod ( temp uint)
0:147 'gid' ( temp uint)
0:147 Constant:
0:147 2 (const uint)
0:148 move second child to first child ( temp uint)
0:148 viewID: direct index for structure (layout( std430 offset=32) taskNV out uint)
0:148 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:148 Constant:
0:148 2 (const int)
0:148 'viewID' ( temp uint)
0:150 MemoryBarrierShared ( global void)
0:150 Barrier ( global void)
0:153 move second child to first child ( temp uint)
0:153 'gl_TaskCountNV' ( out uint TaskCountNV)
0:153 Constant:
0:153 3 (const uint)
0:157 Function Definition: basic_works( ( global void)
0:157 Function Parameters:
0:159 Sequence
0:159 'gl_SubgroupSize' ( in uint unknown built-in variable)
0:160 'gl_SubgroupInvocationID' ( in uint unknown built-in variable)
0:161 subgroupBarrier ( global void)
0:162 subgroupMemoryBarrier ( global void)
0:163 subgroupMemoryBarrierBuffer ( global void)
0:164 subgroupMemoryBarrierImage ( global void)
0:165 subgroupElect ( global bool)
0:166 'gl_NumSubgroups' ( in uint unknown built-in variable)
0:167 'gl_SubgroupID' ( in uint unknown built-in variable)
0:168 subgroupMemoryBarrierShared ( global void)
0:172 Function Definition: ballot_works(vf4; ( global void)
0:172 Function Parameters:
0:172 'f4' ( in 4-component vector of float)
0:173 Sequence
0:173 'gl_SubgroupEqMask' ( in 4-component vector of uint unknown built-in variable)
0:174 'gl_SubgroupGeMask' ( in 4-component vector of uint unknown built-in variable)
0:175 'gl_SubgroupGtMask' ( in 4-component vector of uint unknown built-in variable)
0:176 'gl_SubgroupLeMask' ( in 4-component vector of uint unknown built-in variable)
0:177 'gl_SubgroupLtMask' ( in 4-component vector of uint unknown built-in variable)
0:178 subgroupBroadcast ( global 4-component vector of float)
0:178 'f4' ( in 4-component vector of float)
0:178 Constant:
0:178 0 (const uint)
0:179 subgroupBroadcastFirst ( global 4-component vector of float)
0:179 'f4' ( in 4-component vector of float)
0:180 Sequence
0:180 move second child to first child ( temp 4-component vector of uint)
0:180 'ballot' ( temp 4-component vector of uint)
0:180 subgroupBallot ( global 4-component vector of uint)
0:180 Constant:
0:180 false (const bool)
0:181 subgroupInverseBallot ( global bool)
0:181 Constant:
0:181 1 (const uint)
0:181 1 (const uint)
0:181 1 (const uint)
0:181 1 (const uint)
0:182 subgroupBallotBitExtract ( global bool)
0:182 'ballot' ( temp 4-component vector of uint)
0:182 Constant:
0:182 0 (const uint)
0:183 subgroupBallotBitCount ( global uint)
0:183 'ballot' ( temp 4-component vector of uint)
0:184 subgroupBallotInclusiveBitCount ( global uint)
0:184 'ballot' ( temp 4-component vector of uint)
0:185 subgroupBallotExclusiveBitCount ( global uint)
0:185 'ballot' ( temp 4-component vector of uint)
0:186 subgroupBallotFindLSB ( global uint)
0:186 'ballot' ( temp 4-component vector of uint)
0:187 subgroupBallotFindMSB ( global uint)
0:187 'ballot' ( temp 4-component vector of uint)
0:191 Function Definition: vote_works(vf4; ( global void)
0:191 Function Parameters:
0:191 'f4' ( in 4-component vector of float)
0:193 Sequence
0:193 subgroupAll ( global bool)
0:193 Constant:
0:193 true (const bool)
0:194 subgroupAny ( global bool)
0:194 Constant:
0:194 false (const bool)
0:195 subgroupAllEqual ( global bool)
0:195 'f4' ( in 4-component vector of float)
0:200 Function Definition: shuffle_works(vf4; ( global void)
0:200 Function Parameters:
0:200 'f4' ( in 4-component vector of float)
0:202 Sequence
0:202 subgroupShuffle ( global 4-component vector of float)
0:202 'f4' ( in 4-component vector of float)
0:202 Constant:
0:202 0 (const uint)
0:203 subgroupShuffleXor ( global 4-component vector of float)
0:203 'f4' ( in 4-component vector of float)
0:203 Constant:
0:203 1 (const uint)
0:204 subgroupShuffleUp ( global 4-component vector of float)
0:204 'f4' ( in 4-component vector of float)
0:204 Constant:
0:204 1 (const uint)
0:205 subgroupShuffleDown ( global 4-component vector of float)
0:205 'f4' ( in 4-component vector of float)
0:205 Constant:
0:205 1 (const uint)
0:209 Function Definition: arith_works(vf4; ( global void)
0:209 Function Parameters:
0:209 'f4' ( in 4-component vector of float)
0:? Sequence
0:212 subgroupAdd ( global 4-component vector of float)
0:212 'f4' ( in 4-component vector of float)
0:213 subgroupMul ( global 4-component vector of float)
0:213 'f4' ( in 4-component vector of float)
0:214 subgroupMin ( global 4-component vector of float)
0:214 'f4' ( in 4-component vector of float)
0:215 subgroupMax ( global 4-component vector of float)
0:215 'f4' ( in 4-component vector of float)
0:216 subgroupAnd ( global 4-component vector of uint)
0:216 'ballot' ( temp 4-component vector of uint)
0:217 subgroupOr ( global 4-component vector of uint)
0:217 'ballot' ( temp 4-component vector of uint)
0:218 subgroupXor ( global 4-component vector of uint)
0:218 'ballot' ( temp 4-component vector of uint)
0:219 subgroupInclusiveAdd ( global 4-component vector of float)
0:219 'f4' ( in 4-component vector of float)
0:220 subgroupInclusiveMul ( global 4-component vector of float)
0:220 'f4' ( in 4-component vector of float)
0:221 subgroupInclusiveMin ( global 4-component vector of float)
0:221 'f4' ( in 4-component vector of float)
0:222 subgroupInclusiveMax ( global 4-component vector of float)
0:222 'f4' ( in 4-component vector of float)
0:223 subgroupInclusiveAnd ( global 4-component vector of uint)
0:223 'ballot' ( temp 4-component vector of uint)
0:224 subgroupInclusiveOr ( global 4-component vector of uint)
0:224 'ballot' ( temp 4-component vector of uint)
0:225 subgroupInclusiveXor ( global 4-component vector of uint)
0:225 'ballot' ( temp 4-component vector of uint)
0:226 subgroupExclusiveAdd ( global 4-component vector of float)
0:226 'f4' ( in 4-component vector of float)
0:227 subgroupExclusiveMul ( global 4-component vector of float)
0:227 'f4' ( in 4-component vector of float)
0:228 subgroupExclusiveMin ( global 4-component vector of float)
0:228 'f4' ( in 4-component vector of float)
0:229 subgroupExclusiveMax ( global 4-component vector of float)
0:229 'f4' ( in 4-component vector of float)
0:230 subgroupExclusiveAnd ( global 4-component vector of uint)
0:230 'ballot' ( temp 4-component vector of uint)
0:231 subgroupExclusiveOr ( global 4-component vector of uint)
0:231 'ballot' ( temp 4-component vector of uint)
0:232 subgroupExclusiveXor ( global 4-component vector of uint)
0:232 'ballot' ( temp 4-component vector of uint)
0:236 Function Definition: clustered_works(vf4; ( global void)
0:236 Function Parameters:
0:236 'f4' ( in 4-component vector of float)
0:238 Sequence
0:238 Sequence
0:238 move second child to first child ( temp 4-component vector of uint)
0:238 'ballot' ( temp 4-component vector of uint)
0:238 Constant:
0:238 85 (const uint)
0:238 0 (const uint)
0:238 0 (const uint)
0:238 0 (const uint)
0:239 subgroupClusteredAdd ( global 4-component vector of float)
0:239 'f4' ( in 4-component vector of float)
0:239 Constant:
0:239 2 (const uint)
0:240 subgroupClusteredMul ( global 4-component vector of float)
0:240 'f4' ( in 4-component vector of float)
0:240 Constant:
0:240 2 (const uint)
0:241 subgroupClusteredMin ( global 4-component vector of float)
0:241 'f4' ( in 4-component vector of float)
0:241 Constant:
0:241 2 (const uint)
0:242 subgroupClusteredMax ( global 4-component vector of float)
0:242 'f4' ( in 4-component vector of float)
0:242 Constant:
0:242 2 (const uint)
0:243 subgroupClusteredAnd ( global 4-component vector of uint)
0:243 'ballot' ( temp 4-component vector of uint)
0:243 Constant:
0:243 2 (const uint)
0:244 subgroupClusteredOr ( global 4-component vector of uint)
0:244 'ballot' ( temp 4-component vector of uint)
0:244 Constant:
0:244 2 (const uint)
0:245 subgroupClusteredXor ( global 4-component vector of uint)
0:245 'ballot' ( temp 4-component vector of uint)
0:245 Constant:
0:245 2 (const uint)
0:249 Function Definition: quad_works(vf4; ( global void)
0:249 Function Parameters:
0:249 'f4' ( in 4-component vector of float)
0:251 Sequence
0:251 subgroupQuadBroadcast ( global 4-component vector of float)
0:251 'f4' ( in 4-component vector of float)
0:251 Constant:
0:251 0 (const uint)
0:252 subgroupQuadSwapHorizontal ( global 4-component vector of float)
0:252 'f4' ( in 4-component vector of float)
0:253 subgroupQuadSwapVertical ( global 4-component vector of float)
0:253 'f4' ( in 4-component vector of float)
0:254 subgroupQuadSwapDiagonal ( global 4-component vector of float)
0:254 'f4' ( in 4-component vector of float)
0:258 Function Definition: partitioned_works(vf4; ( global void)
0:258 Function Parameters:
0:258 'f4' ( in 4-component vector of float)
0:260 Sequence
0:260 Sequence
0:260 move second child to first child ( temp 4-component vector of uint)
0:260 'parti' ( temp 4-component vector of uint)
0:260 subgroupPartitionNV ( global 4-component vector of uint)
0:260 'f4' ( in 4-component vector of float)
0:261 Sequence
0:261 move second child to first child ( temp 4-component vector of uint)
0:261 'ballot' ( temp 4-component vector of uint)
0:261 Constant:
0:261 85 (const uint)
0:261 0 (const uint)
0:261 0 (const uint)
0:261 0 (const uint)
0:262 ERROR: Bad aggregation op
( global 4-component vector of float)
0:262 'f4' ( in 4-component vector of float)
0:262 'parti' ( temp 4-component vector of uint)
0:263 ERROR: Bad aggregation op
( global 4-component vector of float)
0:263 'f4' ( in 4-component vector of float)
0:263 'parti' ( temp 4-component vector of uint)
0:264 ERROR: Bad aggregation op
( global 4-component vector of float)
0:264 'f4' ( in 4-component vector of float)
0:264 'parti' ( temp 4-component vector of uint)
0:265 ERROR: Bad aggregation op
( global 4-component vector of float)
0:265 'f4' ( in 4-component vector of float)
0:265 'parti' ( temp 4-component vector of uint)
0:266 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:266 'ballot' ( temp 4-component vector of uint)
0:266 'parti' ( temp 4-component vector of uint)
0:267 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:267 'ballot' ( temp 4-component vector of uint)
0:267 'parti' ( temp 4-component vector of uint)
0:268 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:268 'ballot' ( temp 4-component vector of uint)
0:268 'parti' ( temp 4-component vector of uint)
0:269 ERROR: Bad aggregation op
( global 4-component vector of float)
0:269 'f4' ( in 4-component vector of float)
0:269 'parti' ( temp 4-component vector of uint)
0:270 ERROR: Bad aggregation op
( global 4-component vector of float)
0:270 'f4' ( in 4-component vector of float)
0:270 'parti' ( temp 4-component vector of uint)
0:271 ERROR: Bad aggregation op
( global 4-component vector of float)
0:271 'f4' ( in 4-component vector of float)
0:271 'parti' ( temp 4-component vector of uint)
0:272 ERROR: Bad aggregation op
( global 4-component vector of float)
0:272 'f4' ( in 4-component vector of float)
0:272 'parti' ( temp 4-component vector of uint)
0:273 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:273 'ballot' ( temp 4-component vector of uint)
0:273 'parti' ( temp 4-component vector of uint)
0:274 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:274 'ballot' ( temp 4-component vector of uint)
0:274 'parti' ( temp 4-component vector of uint)
0:275 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:275 'ballot' ( temp 4-component vector of uint)
0:275 'parti' ( temp 4-component vector of uint)
0:276 ERROR: Bad aggregation op
( global 4-component vector of float)
0:276 'f4' ( in 4-component vector of float)
0:276 'parti' ( temp 4-component vector of uint)
0:277 ERROR: Bad aggregation op
( global 4-component vector of float)
0:277 'f4' ( in 4-component vector of float)
0:277 'parti' ( temp 4-component vector of uint)
0:278 ERROR: Bad aggregation op
( global 4-component vector of float)
0:278 'f4' ( in 4-component vector of float)
0:278 'parti' ( temp 4-component vector of uint)
0:279 ERROR: Bad aggregation op
( global 4-component vector of float)
0:279 'f4' ( in 4-component vector of float)
0:279 'parti' ( temp 4-component vector of uint)
0:280 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:280 'ballot' ( temp 4-component vector of uint)
0:280 'parti' ( temp 4-component vector of uint)
0:281 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:281 'ballot' ( temp 4-component vector of uint)
0:281 'parti' ( temp 4-component vector of uint)
0:282 ERROR: Bad aggregation op
( global 4-component vector of uint)
0:282 'ballot' ( temp 4-component vector of uint)
0:282 'parti' ( temp 4-component vector of uint)
0:? Linker Objects
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
0:? 32 (const uint)
0:? 1 (const uint)
0:? 1 (const uint)
0:? 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
0:? 'mem' ( shared 10-element array of 4-component vector of float)
0:? 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
Linked task stage:
Shader version: 460
Requested GL_KHR_shader_subgroup_arithmetic
Requested GL_KHR_shader_subgroup_ballot
Requested GL_KHR_shader_subgroup_basic
Requested GL_KHR_shader_subgroup_clustered
Requested GL_KHR_shader_subgroup_quad
Requested GL_KHR_shader_subgroup_shuffle
Requested GL_KHR_shader_subgroup_shuffle_relative
Requested GL_KHR_shader_subgroup_vote
Requested GL_NV_mesh_shader
Requested GL_NV_shader_subgroup_partitioned
local_size = (32, 1, 1)
ERROR: node is still EOpNull!
0:127 Function Definition: main( ( global void)
0:127 Function Parameters:
0:129 Sequence
0:129 Sequence
0:129 move second child to first child ( temp uint)
0:129 'iid' ( temp uint)
0:129 direct index ( temp uint)
0:129 'gl_LocalInvocationID' ( in 3-component vector of uint LocalInvocationID)
0:129 Constant:
0:129 0 (const int)
0:130 Sequence
0:130 move second child to first child ( temp uint)
0:130 'gid' ( temp uint)
0:130 direct index ( temp uint)
0:130 'gl_WorkGroupID' ( in 3-component vector of uint WorkGroupID)
0:130 Constant:
0:130 0 (const int)
0:131 Sequence
0:131 move second child to first child ( temp uint)
0:131 'viewID' ( temp uint)
0:131 indirect index ( temp uint MeshViewIndicesNV)
0:131 'gl_MeshViewIndicesNV' ( in 4-element array of uint MeshViewIndicesNV)
0:131 mod ( temp uint)
0:131 'gl_MeshViewCountNV' ( in uint MeshViewCountNV)
0:131 Constant:
0:131 4 (const uint)
0:134 Sequence
0:134 Sequence
0:134 move second child to first child ( temp uint)
0:134 'i' ( temp uint)
0:134 Constant:
0:134 0 (const uint)
0:134 Loop with condition tested first
0:134 Loop Condition
0:134 Compare Less Than ( temp bool)
0:134 'i' ( temp uint)
0:134 Constant:
0:134 10 (const uint)
0:134 Loop Body
0:135 Sequence
0:135 move second child to first child ( temp 4-component vector of float)
0:135 indirect index ( temp 4-component vector of float)
0:135 'mem' ( shared 10-element array of 4-component vector of float)
0:135 'i' ( temp uint)
0:135 Construct vec4 ( temp 4-component vector of float)
0:135 Convert uint to float ( temp float)
0:135 add ( temp uint)
0:135 'i' ( temp uint)
0:135 uni_value: direct index for structure (layout( column_major shared) uniform uint)
0:135 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
0:135 Constant:
0:135 0 (const uint)
0:134 Loop Terminal Expression
0:134 Pre-Increment ( temp uint)
0:134 'i' ( temp uint)
0:137 imageStore ( global void)
0:137 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:137 Construct ivec2 ( temp 2-component vector of int)
0:137 Convert uint to int ( temp int)
0:137 'iid' ( temp uint)
0:137 indirect index ( temp 4-component vector of float)
0:137 'mem' ( shared 10-element array of 4-component vector of float)
0:137 'gid' ( temp uint)
0:138 imageStore ( global void)
0:138 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:138 Construct ivec2 ( temp 2-component vector of int)
0:138 Convert uint to int ( temp int)
0:138 'iid' ( temp uint)
0:138 indirect index ( temp 4-component vector of float)
0:138 'mem' ( shared 10-element array of 4-component vector of float)
0:138 add ( temp uint)
0:138 'gid' ( temp uint)
0:138 Constant:
0:138 1 (const uint)
0:140 MemoryBarrierShared ( global void)
0:140 Barrier ( global void)
0:144 move second child to first child ( temp 2-component vector of float)
0:144 dummy: direct index for structure (layout( std430 offset=0) taskNV out 2-component vector of float)
0:144 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:144 Constant:
0:144 0 (const int)
0:144 Constant:
0:144 30.000000
0:144 31.000000
0:145 move second child to first child ( temp 2-component vector of float)
0:145 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:145 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:145 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:145 Constant:
0:145 1 (const int)
0:145 Constant:
0:145 0 (const int)
0:145 Constant:
0:145 32.000000
0:145 33.000000
0:146 move second child to first child ( temp 2-component vector of float)
0:146 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:146 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:146 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:146 Constant:
0:146 1 (const int)
0:146 Constant:
0:146 1 (const int)
0:146 Constant:
0:146 34.000000
0:146 35.000000
0:147 move second child to first child ( temp 2-component vector of float)
0:147 direct index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:147 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:147 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:147 Constant:
0:147 1 (const int)
0:147 Constant:
0:147 2 (const int)
0:147 indirect index (layout( std430 offset=8) taskNV temp 2-component vector of float)
0:147 submesh: direct index for structure (layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float)
0:147 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:147 Constant:
0:147 1 (const int)
0:147 mod ( temp uint)
0:147 'gid' ( temp uint)
0:147 Constant:
0:147 2 (const uint)
0:148 move second child to first child ( temp uint)
0:148 viewID: direct index for structure (layout( std430 offset=32) taskNV out uint)
0:148 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})
0:148 Constant:
0:148 2 (const int)
0:148 'viewID' ( temp uint)
0:150 MemoryBarrierShared ( global void)
0:150 Barrier ( global void)
0:153 move second child to first child ( temp uint)
0:153 'gl_TaskCountNV' ( out uint TaskCountNV)
0:153 Constant:
0:153 3 (const uint)
0:? Linker Objects
0:? 'gl_WorkGroupSize' ( const 3-component vector of uint WorkGroupSize)
0:? 32 (const uint)
0:? 1 (const uint)
0:? 1 (const uint)
0:? 'uni_image' (layout( binding=0) writeonly uniform image2D)
0:? 'anon@0' (layout( column_major shared) uniform block{layout( column_major shared) uniform uint uni_value})
0:? 'mem' ( shared 10-element array of 4-component vector of float)
0:? 'mytask' (layout( std430) taskNV out block{layout( std430 offset=0) taskNV out 2-component vector of float dummy, layout( std430 offset=8) taskNV out 3-element array of 2-component vector of float submesh, layout( std430 offset=32) taskNV out uint viewID})

293
Test/glsl.460.subgroup.mesh Normal file
View File

@ -0,0 +1,293 @@
#version 460
vec4 undeclared_errors(vec4 f4)
{
vec4 result;
gl_SubgroupSize; // ERROR, extension not enabled (basic)
gl_SubgroupInvocationID; // ERROR, extension not enabled (basic)
subgroupBarrier(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrier(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrierBuffer(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrierImage(); // ERROR, extension not enabled (basic)
subgroupElect(); // ERROR, extension not enabled (basic)
gl_NumSubgroups; // ERROR, extension not enabled (basic)
gl_SubgroupID; // ERROR, extension not enabled (basic)
subgroupMemoryBarrierShared(); // ERROR, extension not enabled (basic)
subgroupAll(true); // ERROR extension not enabled (vote)
subgroupAny(false); // ERROR extension not enabled (vote)
subgroupAllEqual(f4); // ERROR extension not enabled (vote)
gl_SubgroupEqMask; // ERROR extension not enabled (ballot)
gl_SubgroupGeMask; // ERROR extension not enabled (ballot)
gl_SubgroupGtMask; // ERROR extension not enabled (ballot)
gl_SubgroupLeMask; // ERROR extension not enabled (ballot)
gl_SubgroupLtMask; // ERROR extension not enabled (ballot)
subgroupBroadcast(f4, 0); // ERROR extension not enabled (ballot)
subgroupBroadcastFirst(f4); // ERROR extension not enabled (ballot)
uvec4 ballot = subgroupBallot(false); // ERROR extension not enabled (ballot)
subgroupInverseBallot(uvec4(0x1)); // ERROR extension not enabled (ballot)
subgroupBallotBitExtract(ballot, 0); // ERROR extension not enabled (ballot)
subgroupBallotBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotInclusiveBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotExclusiveBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotFindLSB(ballot); // ERROR extension not enabled (ballot)
subgroupBallotFindMSB(ballot); // ERROR extension not enabled (ballot)
subgroupShuffle(f4, 0); // ERROR extension not enabled (shuffle)
subgroupShuffleXor(f4, 0x1); // ERROR extension not enabled (shuffle)
subgroupShuffleUp(f4, 1); // ERROR extension not enabled (shuffle_relative)
subgroupShuffleDown(f4, 1); // ERROR extension not enabled (shuffle_relative)
result = subgroupAdd(f4); // ERROR, extension not enabled (arith)
subgroupMul(f4); // ERROR, extension not enabled (arith)
subgroupMin(f4); // ERROR, extension not enabled (arith)
subgroupMax(f4); // ERROR, extension not enabled (arith)
subgroupAnd(ballot); // ERROR, extension not enabled (arith)
subgroupOr(ballot); // ERROR, extension not enabled (arith)
subgroupXor(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveAdd(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMul(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMin(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMax(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveAnd(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveOr(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveXor(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveAdd(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMul(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMin(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMax(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveAnd(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveOr(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveXor(ballot); // ERROR, extension not enabled (arith)
subgroupClusteredAdd(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMul(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMin(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMax(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredAnd(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredOr(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredXor(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupQuadBroadcast(f4, 0); // ERROR, extension not enabled (quad)
subgroupQuadSwapHorizontal(f4); // ERROR, extension not enabled (quad)
subgroupQuadSwapVertical(f4); // ERROR, extension not enabled (quad)
subgroupQuadSwapDiagonal(f4); // ERROR, extension not enabled (quad)
uvec4 parti = subgroupPartitionNV(f4); // ERROR, extension not enabled (partitioned)
subgroupPartitionedAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
return result;
}
#define MAX_VER 81
#define MAX_PRIM 32
#define BARRIER() \
memoryBarrierShared(); \
barrier();
#extension GL_NV_mesh_shader : enable
layout(local_size_x = 32) in;
layout(max_vertices=MAX_VER) out;
layout(max_primitives=MAX_PRIM) out;
layout(triangles) out;
// test use of builtins in mesh shaders:
void main()
{
uint iid = gl_LocalInvocationID.x;
uint gid = gl_WorkGroupID.x;
gl_MeshVerticesNV[iid].gl_Position = vec4(1.0);
gl_MeshVerticesNV[iid].gl_PointSize = 2.0;
gl_MeshVerticesNV[iid].gl_ClipDistance[3] = 3.0;
gl_MeshVerticesNV[iid].gl_CullDistance[2] = 4.0;
BARRIER();
gl_MeshVerticesNV[iid+1].gl_Position = gl_MeshVerticesNV[iid].gl_Position;
gl_MeshVerticesNV[iid+1].gl_PointSize = gl_MeshVerticesNV[iid].gl_PointSize;
gl_MeshVerticesNV[iid+1].gl_ClipDistance[3] = gl_MeshVerticesNV[iid].gl_ClipDistance[3];
gl_MeshVerticesNV[iid+1].gl_CullDistance[2] = gl_MeshVerticesNV[iid].gl_CullDistance[2];
BARRIER();
gl_MeshPrimitivesNV[iid].gl_PrimitiveID = 6;
gl_MeshPrimitivesNV[iid].gl_Layer = 7;
gl_MeshPrimitivesNV[iid].gl_ViewportIndex = 8;
gl_MeshPrimitivesNV[iid].gl_ViewportMask[0] = 9;
BARRIER();
gl_MeshPrimitivesNV[iid+1].gl_PrimitiveID = gl_MeshPrimitivesNV[iid].gl_PrimitiveID;
gl_MeshPrimitivesNV[iid+1].gl_Layer = gl_MeshPrimitivesNV[iid].gl_Layer;
gl_MeshPrimitivesNV[iid+1].gl_ViewportIndex = gl_MeshPrimitivesNV[iid].gl_ViewportIndex;
gl_MeshPrimitivesNV[iid+1].gl_ViewportMask[0] = gl_MeshPrimitivesNV[iid].gl_ViewportMask[0];
BARRIER();
// check bound limits
gl_PrimitiveIndicesNV[0] = 257; // should truncate 257 -> 1
gl_PrimitiveIndicesNV[(MAX_PRIM * 3) - 1] = 2;
gl_PrimitiveIndicesNV[gid] = gl_PrimitiveIndicesNV[gid-1];
// writes 4 indices at offset gl_DrawID
writePackedPrimitiveIndices4x8NV(gl_DrawID, 0x01020304);
gl_PrimitiveCountNV = MAX_PRIM * 3;
BARRIER();
}
#extension GL_KHR_shader_subgroup_basic: enable
void basic_works (void)
{
gl_SubgroupSize;
gl_SubgroupInvocationID;
subgroupBarrier();
subgroupMemoryBarrier();
subgroupMemoryBarrierBuffer();
subgroupMemoryBarrierImage();
subgroupElect();
gl_NumSubgroups; // allowed in mesh
gl_SubgroupID; // allowed in mesh
subgroupMemoryBarrierShared(); // allowed in mesh
}
#extension GL_KHR_shader_subgroup_ballot: enable
void ballot_works(vec4 f4) {
gl_SubgroupEqMask;
gl_SubgroupGeMask;
gl_SubgroupGtMask;
gl_SubgroupLeMask;
gl_SubgroupLtMask;
subgroupBroadcast(f4, 0);
subgroupBroadcastFirst(f4);
uvec4 ballot = subgroupBallot(false);
subgroupInverseBallot(uvec4(0x1));
subgroupBallotBitExtract(ballot, 0);
subgroupBallotBitCount(ballot);
subgroupBallotInclusiveBitCount(ballot);
subgroupBallotExclusiveBitCount(ballot);
subgroupBallotFindLSB(ballot);
subgroupBallotFindMSB(ballot);
}
#extension GL_KHR_shader_subgroup_vote: enable
void vote_works(vec4 f4)
{
subgroupAll(true);
subgroupAny(false);
subgroupAllEqual(f4);
}
#extension GL_KHR_shader_subgroup_shuffle: enable
#extension GL_KHR_shader_subgroup_shuffle_relative: enable
void shuffle_works(vec4 f4)
{
subgroupShuffle(f4, 0);
subgroupShuffleXor(f4, 0x1);
subgroupShuffleUp(f4, 1);
subgroupShuffleDown(f4, 1);
}
#extension GL_KHR_shader_subgroup_arithmetic: enable
void arith_works(vec4 f4)
{
uvec4 ballot;
subgroupAdd(f4);
subgroupMul(f4);
subgroupMin(f4);
subgroupMax(f4);
subgroupAnd(ballot);
subgroupOr(ballot);
subgroupXor(ballot);
subgroupInclusiveAdd(f4);
subgroupInclusiveMul(f4);
subgroupInclusiveMin(f4);
subgroupInclusiveMax(f4);
subgroupInclusiveAnd(ballot);
subgroupInclusiveOr(ballot);
subgroupInclusiveXor(ballot);
subgroupExclusiveAdd(f4);
subgroupExclusiveMul(f4);
subgroupExclusiveMin(f4);
subgroupExclusiveMax(f4);
subgroupExclusiveAnd(ballot);
subgroupExclusiveOr(ballot);
subgroupExclusiveXor(ballot);
}
#extension GL_KHR_shader_subgroup_clustered: enable
void clustered_works(vec4 f4)
{
uvec4 ballot = uvec4(0x55,0,0,0);
subgroupClusteredAdd(f4, 2);
subgroupClusteredMul(f4, 2);
subgroupClusteredMin(f4, 2);
subgroupClusteredMax(f4, 2);
subgroupClusteredAnd(ballot, 2);
subgroupClusteredOr(ballot, 2);
subgroupClusteredXor(ballot, 2);
}
#extension GL_KHR_shader_subgroup_quad: enable
void quad_works(vec4 f4)
{
subgroupQuadBroadcast(f4, 0);
subgroupQuadSwapHorizontal(f4);
subgroupQuadSwapVertical(f4);
subgroupQuadSwapDiagonal(f4);
}
#extension GL_NV_shader_subgroup_partitioned: enable
void partitioned_works(vec4 f4)
{
uvec4 parti = subgroupPartitionNV(f4);
uvec4 ballot = uvec4(0x55,0,0,0);
subgroupPartitionedAddNV(f4, parti);
subgroupPartitionedMulNV(f4, parti);
subgroupPartitionedMinNV(f4, parti);
subgroupPartitionedMaxNV(f4, parti);
subgroupPartitionedAndNV(ballot, parti);
subgroupPartitionedOrNV(ballot, parti);
subgroupPartitionedXorNV(ballot, parti);
subgroupPartitionedInclusiveAddNV(f4, parti);
subgroupPartitionedInclusiveMulNV(f4, parti);
subgroupPartitionedInclusiveMinNV(f4, parti);
subgroupPartitionedInclusiveMaxNV(f4, parti);
subgroupPartitionedInclusiveAndNV(ballot, parti);
subgroupPartitionedInclusiveOrNV(ballot, parti);
subgroupPartitionedInclusiveXorNV(ballot, parti);
subgroupPartitionedExclusiveAddNV(f4, parti);
subgroupPartitionedExclusiveMulNV(f4, parti);
subgroupPartitionedExclusiveMinNV(f4, parti);
subgroupPartitionedExclusiveMaxNV(f4, parti);
subgroupPartitionedExclusiveAndNV(ballot, parti);
subgroupPartitionedExclusiveOrNV(ballot, parti);
subgroupPartitionedExclusiveXorNV(ballot, parti);
}

284
Test/glsl.460.subgroup.task Normal file
View File

@ -0,0 +1,284 @@
#version 460
vec4 undeclared_errors(vec4 f4)
{
vec4 result;
gl_SubgroupSize; // ERROR, extension not enabled (basic)
gl_SubgroupInvocationID; // ERROR, extension not enabled (basic)
subgroupBarrier(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrier(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrierBuffer(); // ERROR, extension not enabled (basic)
subgroupMemoryBarrierImage(); // ERROR, extension not enabled (basic)
subgroupElect(); // ERROR, extension not enabled (basic)
gl_NumSubgroups; // ERROR, extension not enabled (basic)
gl_SubgroupID; // ERROR, extension not enabled (basic)
subgroupMemoryBarrierShared(); // ERROR, extension not enabled (basic)
subgroupAll(true); // ERROR extension not enabled (vote)
subgroupAny(false); // ERROR extension not enabled (vote)
subgroupAllEqual(f4); // ERROR extension not enabled (vote)
gl_SubgroupEqMask; // ERROR extension not enabled (ballot)
gl_SubgroupGeMask; // ERROR extension not enabled (ballot)
gl_SubgroupGtMask; // ERROR extension not enabled (ballot)
gl_SubgroupLeMask; // ERROR extension not enabled (ballot)
gl_SubgroupLtMask; // ERROR extension not enabled (ballot)
subgroupBroadcast(f4, 0); // ERROR extension not enabled (ballot)
subgroupBroadcastFirst(f4); // ERROR extension not enabled (ballot)
uvec4 ballot = subgroupBallot(false); // ERROR extension not enabled (ballot)
subgroupInverseBallot(uvec4(0x1)); // ERROR extension not enabled (ballot)
subgroupBallotBitExtract(ballot, 0); // ERROR extension not enabled (ballot)
subgroupBallotBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotInclusiveBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotExclusiveBitCount(ballot); // ERROR extension not enabled (ballot)
subgroupBallotFindLSB(ballot); // ERROR extension not enabled (ballot)
subgroupBallotFindMSB(ballot); // ERROR extension not enabled (ballot)
subgroupShuffle(f4, 0); // ERROR extension not enabled (shuffle)
subgroupShuffleXor(f4, 0x1); // ERROR extension not enabled (shuffle)
subgroupShuffleUp(f4, 1); // ERROR extension not enabled (shuffle_relative)
subgroupShuffleDown(f4, 1); // ERROR extension not enabled (shuffle_relative)
result = subgroupAdd(f4); // ERROR, extension not enabled (arith)
subgroupMul(f4); // ERROR, extension not enabled (arith)
subgroupMin(f4); // ERROR, extension not enabled (arith)
subgroupMax(f4); // ERROR, extension not enabled (arith)
subgroupAnd(ballot); // ERROR, extension not enabled (arith)
subgroupOr(ballot); // ERROR, extension not enabled (arith)
subgroupXor(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveAdd(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMul(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMin(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveMax(f4); // ERROR, extension not enabled (arith)
subgroupInclusiveAnd(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveOr(ballot); // ERROR, extension not enabled (arith)
subgroupInclusiveXor(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveAdd(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMul(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMin(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveMax(f4); // ERROR, extension not enabled (arith)
subgroupExclusiveAnd(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveOr(ballot); // ERROR, extension not enabled (arith)
subgroupExclusiveXor(ballot); // ERROR, extension not enabled (arith)
subgroupClusteredAdd(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMul(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMin(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredMax(f4, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredAnd(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredOr(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupClusteredXor(ballot, 2); // ERROR, extension not enabled (clustered)
subgroupQuadBroadcast(f4, 0); // ERROR, extension not enabled (quad)
subgroupQuadSwapHorizontal(f4); // ERROR, extension not enabled (quad)
subgroupQuadSwapVertical(f4); // ERROR, extension not enabled (quad)
subgroupQuadSwapDiagonal(f4); // ERROR, extension not enabled (quad)
uvec4 parti = subgroupPartitionNV(f4); // ERROR, extension not enabled (partitioned)
subgroupPartitionedAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedInclusiveXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveAddNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMulNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMinNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveMaxNV(f4, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveAndNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveOrNV(ballot, parti); // ERROR, extension not enabled (partitioned)
subgroupPartitionedExclusiveXorNV(ballot, parti); // ERROR, extension not enabled (partitioned)
return result;
}
#define MAX_VIEWS gl_MaxMeshViewCountNV
#define BARRIER() \
memoryBarrierShared(); \
barrier();
#extension GL_NV_mesh_shader : enable
layout(local_size_x = 32) in;
// test use of shared memory in task shaders:
layout(binding=0) writeonly uniform image2D uni_image;
uniform block0 {
uint uni_value;
};
shared vec4 mem[10];
// test use of task memory in task shaders:
taskNV out Task {
vec2 dummy;
vec2 submesh[3];
uint viewID;
} mytask;
void main()
{
uint iid = gl_LocalInvocationID.x;
uint gid = gl_WorkGroupID.x;
uint viewID = gl_MeshViewIndicesNV[gl_MeshViewCountNV%MAX_VIEWS];
// 1. shared memory load and stores
for (uint i = 0; i < 10; ++i) {
mem[i] = vec4(i + uni_value);
}
imageStore(uni_image, ivec2(iid), mem[gid]);
imageStore(uni_image, ivec2(iid), mem[gid+1]);
BARRIER();
// 2. task memory stores
mytask.dummy = vec2(30.0, 31.0);
mytask.submesh[0] = vec2(32.0, 33.0);
mytask.submesh[1] = vec2(34.0, 35.0);
mytask.submesh[2] = mytask.submesh[gid%2];
mytask.viewID = viewID;
BARRIER();
// 3. set task count
gl_TaskCountNV = 3;
}
#extension GL_KHR_shader_subgroup_basic: enable
void basic_works (void)
{
gl_SubgroupSize;
gl_SubgroupInvocationID;
subgroupBarrier();
subgroupMemoryBarrier();
subgroupMemoryBarrierBuffer();
subgroupMemoryBarrierImage();
subgroupElect();
gl_NumSubgroups; // allowed in task
gl_SubgroupID; // allowed in task
subgroupMemoryBarrierShared(); // allowed in task
}
#extension GL_KHR_shader_subgroup_ballot: enable
void ballot_works(vec4 f4) {
gl_SubgroupEqMask;
gl_SubgroupGeMask;
gl_SubgroupGtMask;
gl_SubgroupLeMask;
gl_SubgroupLtMask;
subgroupBroadcast(f4, 0);
subgroupBroadcastFirst(f4);
uvec4 ballot = subgroupBallot(false);
subgroupInverseBallot(uvec4(0x1));
subgroupBallotBitExtract(ballot, 0);
subgroupBallotBitCount(ballot);
subgroupBallotInclusiveBitCount(ballot);
subgroupBallotExclusiveBitCount(ballot);
subgroupBallotFindLSB(ballot);
subgroupBallotFindMSB(ballot);
}
#extension GL_KHR_shader_subgroup_vote: enable
void vote_works(vec4 f4)
{
subgroupAll(true);
subgroupAny(false);
subgroupAllEqual(f4);
}
#extension GL_KHR_shader_subgroup_shuffle: enable
#extension GL_KHR_shader_subgroup_shuffle_relative: enable
void shuffle_works(vec4 f4)
{
subgroupShuffle(f4, 0);
subgroupShuffleXor(f4, 0x1);
subgroupShuffleUp(f4, 1);
subgroupShuffleDown(f4, 1);
}
#extension GL_KHR_shader_subgroup_arithmetic: enable
void arith_works(vec4 f4)
{
uvec4 ballot;
subgroupAdd(f4);
subgroupMul(f4);
subgroupMin(f4);
subgroupMax(f4);
subgroupAnd(ballot);
subgroupOr(ballot);
subgroupXor(ballot);
subgroupInclusiveAdd(f4);
subgroupInclusiveMul(f4);
subgroupInclusiveMin(f4);
subgroupInclusiveMax(f4);
subgroupInclusiveAnd(ballot);
subgroupInclusiveOr(ballot);
subgroupInclusiveXor(ballot);
subgroupExclusiveAdd(f4);
subgroupExclusiveMul(f4);
subgroupExclusiveMin(f4);
subgroupExclusiveMax(f4);
subgroupExclusiveAnd(ballot);
subgroupExclusiveOr(ballot);
subgroupExclusiveXor(ballot);
}
#extension GL_KHR_shader_subgroup_clustered: enable
void clustered_works(vec4 f4)
{
uvec4 ballot = uvec4(0x55,0,0,0);
subgroupClusteredAdd(f4, 2);
subgroupClusteredMul(f4, 2);
subgroupClusteredMin(f4, 2);
subgroupClusteredMax(f4, 2);
subgroupClusteredAnd(ballot, 2);
subgroupClusteredOr(ballot, 2);
subgroupClusteredXor(ballot, 2);
}
#extension GL_KHR_shader_subgroup_quad: enable
void quad_works(vec4 f4)
{
subgroupQuadBroadcast(f4, 0);
subgroupQuadSwapHorizontal(f4);
subgroupQuadSwapVertical(f4);
subgroupQuadSwapDiagonal(f4);
}
#extension GL_NV_shader_subgroup_partitioned: enable
void partitioned_works(vec4 f4)
{
uvec4 parti = subgroupPartitionNV(f4);
uvec4 ballot = uvec4(0x55,0,0,0);
subgroupPartitionedAddNV(f4, parti);
subgroupPartitionedMulNV(f4, parti);
subgroupPartitionedMinNV(f4, parti);
subgroupPartitionedMaxNV(f4, parti);
subgroupPartitionedAndNV(ballot, parti);
subgroupPartitionedOrNV(ballot, parti);
subgroupPartitionedXorNV(ballot, parti);
subgroupPartitionedInclusiveAddNV(f4, parti);
subgroupPartitionedInclusiveMulNV(f4, parti);
subgroupPartitionedInclusiveMinNV(f4, parti);
subgroupPartitionedInclusiveMaxNV(f4, parti);
subgroupPartitionedInclusiveAndNV(ballot, parti);
subgroupPartitionedInclusiveOrNV(ballot, parti);
subgroupPartitionedInclusiveXorNV(ballot, parti);
subgroupPartitionedExclusiveAddNV(f4, parti);
subgroupPartitionedExclusiveMulNV(f4, parti);
subgroupPartitionedExclusiveMinNV(f4, parti);
subgroupPartitionedExclusiveMaxNV(f4, parti);
subgroupPartitionedExclusiveAndNV(ballot, parti);
subgroupPartitionedExclusiveOrNV(ballot, parti);
subgroupPartitionedExclusiveXorNV(ballot, parti);
}

View File

@ -9554,6 +9554,7 @@ void TBuiltIns::identifyBuiltIns(int version, EProfile profile, const SpvVersion
if ((profile != EEsProfile && version >= 450) || (profile == EEsProfile && version >= 320)) {
symbolTable.relateToOperator("memoryBarrierShared", EOpMemoryBarrierShared);
symbolTable.relateToOperator("groupMemoryBarrier", EOpGroupMemoryBarrier);
symbolTable.relateToOperator("subgroupMemoryBarrierShared", EOpSubgroupMemoryBarrierShared);
}
break;
#endif

View File

@ -253,6 +253,8 @@ INSTANTIATE_TEST_CASE_P(
"glsl.450.subgroupShuffleRelative.comp",
"glsl.450.subgroupQuad.comp",
"glsl.450.subgroupVote.comp",
"glsl.460.subgroup.mesh",
"glsl.460.subgroup.task",
"glsl.es320.subgroup.frag",
"glsl.es320.subgroup.geom",
"glsl.es320.subgroup.tesc",