break;
}
- if (lvalue) {
+ if (lvalue)
arguments.push_back(builder.accessChainGetLValue());
- } else {
+ else
arguments.push_back(builder.accessChainLoad(convertGlslangToSpvType(glslangArguments[i]->getAsTyped()->getType())));
- }
}
}
// Check for image functions other than queries
if (node->isImage()) {
- if (node->getOp() == glslang::EOpImageLoad) {
- return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), arguments);
- }
- else if (node->getOp() == glslang::EOpImageStore) {
- builder.createNoResultOp(spv::OpImageWrite, arguments);
- return spv::NoResult;
- }
- else {
- // Process image atomic operations. GLSL "IMAGE_PARAMS" will involve in constructing an image texel
- // pointer and this pointer, as the first source operand, is required by SPIR-V atomic operations.
+ // Process image load/store
+ if (node->getOp() == glslang::EOpImageLoad ||
+ node->getOp() == glslang::EOpImageStore) {
+ std::vector<spv::Id> operands;
+ auto opIt = arguments.begin();
+ operands.push_back(*(opIt++));
+ operands.push_back(*(opIt++));
+ if (sampler.ms) {
+ // For MS, image operand mask has to be added to indicate the presence of "sample" operand.
+ spv::Id sample = *(opIt++);
+ for (; opIt != arguments.end(); ++opIt)
+ operands.push_back(*opIt);
+
+ operands.push_back(spv::ImageOperandsSampleMask);
+ operands.push_back(sample);
+ } else {
+ for (; opIt != arguments.end(); ++opIt)
+ operands.push_back(*opIt);
+ }
+
+ if (node->getOp() == glslang::EOpImageLoad)
+ return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
+ else {
+ builder.createNoResultOp(spv::OpImageWrite, operands);
+ return spv::NoResult;
+ }
+ } else {
+ // Process image atomic operations
+
+ // GLSL "IMAGE_PARAMS" will involve in constructing an image texel pointer and this pointer,
+ // as the first source operand, is required by SPIR-V atomic operations.
std::vector<spv::Id> imageParams;
auto opIt = arguments.begin();
imageParams.push_back(*(opIt++));
if (cracked.lod) {
params.lod = arguments[2];
++extraArgs;
- } else if (cracked.sample) {
- params.sample = arguments[2]; // For MS, sample should be specified
+ } else if (sampler.ms) {
+ params.sample = arguments[2]; // For MS, "sample" should be specified
++extraArgs;
}
if (cracked.grad) {
}
Id getImageType(Id resultId) const
{
- assert(isSampledImageType(getTypeId(resultId)));
- return module.getInstruction(getTypeId(resultId))->getIdOperand(0);
+ Id typeId = getTypeId(resultId);
+ assert(isImageType(typeId) || isSampledImageType(typeId));
+ return isSampledImageType(typeId) ? module.getInstruction(typeId)->getIdOperand(0) : typeId;
}
bool isArrayedImageType(Id typeId) const
{
InstructionDesc[OpImageRead].operands.push(OperandId, "'Image'");
InstructionDesc[OpImageRead].operands.push(OperandId, "'Coordinate'");
+ InstructionDesc[OpImageRead].operands.push(OperandOptionalImage, "");
InstructionDesc[OpImageWrite].operands.push(OperandId, "'Image'");
InstructionDesc[OpImageWrite].operands.push(OperandId, "'Coordinate'");
InstructionDesc[OpImageWrite].operands.push(OperandId, "'Texel'");
+ InstructionDesc[OpImageWrite].operands.push(OperandOptionalImage, "");
InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Sampled Image'");
InstructionDesc[OpImageSampleImplicitLod].operands.push(OperandId, "'Coordinate'");
TBD functionality: Is atomic_uint an opaque handle in the uniform storage class, or an addresses in the atomic storage class?\r
// Module Version 99\r
// Generated by (magic number): 51a00bb\r
-// Id's are bound by 74\r
+// Id's are bound by 64\r
\r
Source ESSL 310\r
Capability Shader\r
Name 10 "func(au1;"\r
Name 9 "c"\r
Name 12 "atoms("\r
- Name 21 "counter"\r
- Name 22 "param"\r
- Name 25 "val"\r
- Name 29 "countArr"\r
- Name 38 "origi"\r
- Name 40 "atomi"\r
- Name 44 "origu"\r
- Name 46 "atomu"\r
- Name 48 "value"\r
- Name 71 "arrX"\r
- Name 72 "arrY"\r
- Name 73 "arrZ"\r
- Decorate 21(counter) Binding 0\r
- Decorate 29(countArr) Binding 0\r
- Decorate 71(arrX) NoStaticUse\r
- Decorate 72(arrY) NoStaticUse\r
- Decorate 73(arrZ) NoStaticUse\r
+ Name 20 "counter"\r
+ Name 21 "param"\r
+ Name 24 "val"\r
+ Name 28 "countArr"\r
+ Name 35 "origi"\r
+ Name 37 "atomi"\r
+ Name 40 "origu"\r
+ Name 42 "atomu"\r
+ Name 44 "value"\r
+ Name 61 "arrX"\r
+ Name 62 "arrY"\r
+ Name 63 "arrZ"\r
+ Decorate 20(counter) Binding 0\r
+ Decorate 28(countArr) Binding 0\r
+ Decorate 61(arrX) NoStaticUse\r
+ Decorate 62(arrY) NoStaticUse\r
+ Decorate 63(arrZ) NoStaticUse\r
2: TypeVoid\r
3: TypeFunction 2\r
6: TypeInt 32 0\r
7: TypePointer Function 6(int)\r
8: TypeFunction 6(int) 7(ptr)\r
- 15: 6(int) Constant 1\r
- 16: 6(int) Constant 0\r
- 19: 6(int) Constant 256\r
- 20: TypePointer UniformConstant 6(int)\r
- 21(counter): 20(ptr) Variable UniformConstant\r
- 26: 6(int) Constant 4\r
- 27: TypeArray 6(int) 26\r
- 28: TypePointer UniformConstant 27\r
- 29(countArr): 28(ptr) Variable UniformConstant\r
- 30: TypeInt 32 1\r
- 31: 30(int) Constant 2\r
- 37: TypePointer Function 30(int)\r
- 39: TypePointer WorkgroupLocal 30(int)\r
- 40(atomi): 39(ptr) Variable WorkgroupLocal\r
- 42: 30(int) Constant 3\r
- 45: TypePointer WorkgroupLocal 6(int)\r
- 46(atomu): 45(ptr) Variable WorkgroupLocal\r
- 48(value): 20(ptr) Variable UniformConstant\r
- 52: 6(int) Constant 7\r
- 60: 30(int) Constant 7\r
- 66: 6(int) Constant 10\r
- 69: TypeArray 30(int) 15\r
- 70: TypePointer PrivateGlobal 69\r
- 71(arrX): 70(ptr) Variable PrivateGlobal\r
- 72(arrY): 70(ptr) Variable PrivateGlobal\r
- 73(arrZ): 70(ptr) Variable PrivateGlobal\r
+ 14: 6(int) Constant 1\r
+ 15: 6(int) Constant 0\r
+ 18: 6(int) Constant 256\r
+ 19: TypePointer AtomicCounter 6(int)\r
+ 20(counter): 19(ptr) Variable AtomicCounter\r
+ 25: 6(int) Constant 4\r
+ 26: TypeArray 6(int) 25\r
+ 27: TypePointer AtomicCounter 26\r
+ 28(countArr): 27(ptr) Variable AtomicCounter\r
+ 29: TypeInt 32 1\r
+ 30: 29(int) Constant 2\r
+ 34: TypePointer Function 29(int)\r
+ 36: TypePointer WorkgroupLocal 29(int)\r
+ 37(atomi): 36(ptr) Variable WorkgroupLocal\r
+ 38: 29(int) Constant 3\r
+ 41: TypePointer WorkgroupLocal 6(int)\r
+ 42(atomu): 41(ptr) Variable WorkgroupLocal\r
+ 43: TypePointer UniformConstant 6(int)\r
+ 44(value): 43(ptr) Variable UniformConstant\r
+ 47: 6(int) Constant 7\r
+ 52: 29(int) Constant 7\r
+ 56: 6(int) Constant 10\r
+ 59: TypeArray 29(int) 14\r
+ 60: TypePointer PrivateGlobal 59\r
+ 61(arrX): 60(ptr) Variable PrivateGlobal\r
+ 62(arrY): 60(ptr) Variable PrivateGlobal\r
+ 63(arrZ): 60(ptr) Variable PrivateGlobal\r
4(main): 2 Function None 3\r
5: Label\r
- 22(param): 7(ptr) Variable Function\r
- 25(val): 7(ptr) Variable Function\r
- MemoryBarrier 15 19\r
- 23: 6(int) Load 21(counter)\r
- Store 22(param) 23\r
- 24: 6(int) FunctionCall 10(func(au1;) 22(param)\r
- 32: 20(ptr) AccessChain 29(countArr) 31\r
- 33: 6(int) Load 32\r
- 34: 6(int) AtomicLoad 33 15 16\r
- Store 25(val) 34\r
- 35: 6(int) Load 21(counter)\r
- 36: 6(int) AtomicIDecrement 35 15 16\r
+ 21(param): 7(ptr) Variable Function\r
+ 24(val): 7(ptr) Variable Function\r
+ MemoryBarrier 14 18\r
+ 22: 6(int) Load 20(counter)\r
+ Store 21(param) 22\r
+ 23: 6(int) FunctionCall 10(func(au1;) 21(param)\r
+ 31: 19(ptr) AccessChain 28(countArr) 30\r
+ 32: 6(int) AtomicLoad 31 14 15\r
+ Store 24(val) 32\r
+ 33: 6(int) AtomicIDecrement 20(counter) 14 15\r
Return\r
FunctionEnd\r
10(func(au1;): 6(int) Function None 8\r
9(c): 7(ptr) FunctionParameter\r
11: Label\r
- 14: 6(int) Load 9(c)\r
- 17: 6(int) AtomicIIncrement 14 15 16\r
- ReturnValue 17\r
+ 16: 6(int) AtomicIIncrement 9(c) 14 15\r
+ ReturnValue 16\r
FunctionEnd\r
12(atoms(): 2 Function None 3\r
13: Label\r
- 38(origi): 37(ptr) Variable Function\r
- 44(origu): 7(ptr) Variable Function\r
- 41: 30(int) Load 40(atomi)\r
- 43: 30(int) AtomicIAdd 41 15 16 42\r
- Store 38(origi) 43\r
- 47: 6(int) Load 46(atomu)\r
- 49: 6(int) Load 48(value)\r
- 50: 6(int) AtomicAnd 47 15 16 49\r
- Store 44(origu) 50\r
- 51: 6(int) Load 46(atomu)\r
- 53: 6(int) AtomicOr 51 15 16 52\r
- Store 44(origu) 53\r
- 54: 6(int) Load 46(atomu)\r
- 55: 6(int) AtomicXor 54 15 16 52\r
- Store 44(origu) 55\r
- 56: 6(int) Load 46(atomu)\r
- 57: 6(int) Load 48(value)\r
- 58: 6(int) AtomicSMin 56 15 16 57\r
- Store 44(origu) 58\r
- 59: 30(int) Load 40(atomi)\r
- 61: 30(int) AtomicSMax 59 15 16 60\r
- Store 38(origi) 61\r
- 62: 30(int) Load 40(atomi)\r
- 63: 30(int) Load 38(origi)\r
- 64: 30(int) AtomicExchange 62 15 16 63\r
- Store 38(origi) 64\r
- 65: 6(int) Load 46(atomu)\r
- 67: 6(int) Load 48(value)\r
- 68: 6(int) AtomicCompareExchange 65 15 16 16 67 66\r
- Store 44(origu) 68\r
+ 35(origi): 34(ptr) Variable Function\r
+ 40(origu): 7(ptr) Variable Function\r
+ 39: 29(int) AtomicIAdd 37(atomi) 14 15 38\r
+ Store 35(origi) 39\r
+ 45: 6(int) Load 44(value)\r
+ 46: 6(int) AtomicAnd 42(atomu) 14 15 45\r
+ Store 40(origu) 46\r
+ 48: 6(int) AtomicOr 42(atomu) 14 15 47\r
+ Store 40(origu) 48\r
+ 49: 6(int) AtomicXor 42(atomu) 14 15 47\r
+ Store 40(origu) 49\r
+ 50: 6(int) Load 44(value)\r
+ 51: 6(int) AtomicUMin 42(atomu) 14 15 50\r
+ Store 40(origu) 51\r
+ 53: 29(int) AtomicSMax 37(atomi) 14 15 52\r
+ Store 35(origi) 53\r
+ 54: 29(int) Load 35(origi)\r
+ 55: 29(int) AtomicExchange 37(atomi) 14 15 54\r
+ Store 35(origi) 55\r
+ 57: 6(int) Load 44(value)\r
+ 58: 6(int) AtomicCompareExchange 42(atomu) 14 15 15 57 56\r
+ Store 40(origu) 58\r
Return\r
FunctionEnd\r
6: TypeInt 32 1\r
7: TypePointer Function 6(int)\r
9: 6(int) Constant 0\r
- 14: TypeBool\r
- 15: 14(bool) ConstantTrue\r
+ 13: TypeBool\r
+ 15: 13(bool) ConstantTrue\r
19: 6(int) Constant 10\r
23: 6(int) Constant 1\r
- 25: 14(bool) ConstantFalse\r
+ 25: 13(bool) ConstantFalse\r
26: TypePointer Input 6(int)\r
27(gl_VertexID): 26(ptr) Variable Input\r
28(gl_InstanceID): 26(ptr) Variable Input\r
Store 8(i) 9\r
Branch 10\r
10: Label\r
- 13: 14(bool) Phi 15 5 25 12\r
+ 14: 13(bool) Phi 15 5 25 12\r
LoopMerge 11 None\r
Branch 16\r
16: Label\r
SelectionMerge 12 None\r
- BranchConditional 13 12 17\r
+ BranchConditional 14 12 17\r
17: Label\r
18: 6(int) Load 8(i)\r
- 20: 14(bool) SLessThan 18 19\r
+ 20: 13(bool) SLessThan 18 19\r
SelectionMerge 21 None\r
BranchConditional 20 21 11\r
21: Label\r
6: TypeInt 32 1\r
7: TypePointer Function 6(int)\r
9: 6(int) Constant 0\r
- 14: TypeBool\r
- 15: 14(bool) ConstantTrue\r
+ 13: TypeBool\r
+ 15: 13(bool) ConstantTrue\r
19: 6(int) Constant 1\r
21: 6(int) Constant 19\r
26: 6(int) Constant 2\r
- 31: 14(bool) ConstantFalse\r
+ 31: 13(bool) ConstantFalse\r
35: 6(int) Constant 5\r
40: 6(int) Constant 3\r
43: 6(int) Constant 42\r
Store 8(i) 9\r
Branch 10\r
10: Label\r
- 13: 14(bool) Phi 15 5 31 28 31 38\r
+ 14: 13(bool) Phi 15 5 31 28 31 38\r
LoopMerge 11 None\r
Branch 16\r
16: Label\r
SelectionMerge 12 None\r
- BranchConditional 13 12 17\r
+ BranchConditional 14 12 17\r
17: Label\r
18: 6(int) Load 8(i)\r
20: 6(int) IAdd 18 19\r
Store 8(i) 20\r
- 22: 14(bool) SLessThan 20 21\r
+ 22: 13(bool) SLessThan 20 21\r
SelectionMerge 23 None\r
BranchConditional 22 23 11\r
23: Label\r
12: Label\r
Store 24(A) 9\r
25: 6(int) Load 8(i)\r
- 27: 14(bool) IEqual 25 26\r
+ 27: 13(bool) IEqual 25 26\r
SelectionMerge 29 None\r
BranchConditional 27 28 29\r
28: Label\r
Branch 29\r
29: Label\r
34: 6(int) Load 8(i)\r
- 36: 14(bool) IEqual 34 35\r
+ 36: 13(bool) IEqual 34 35\r
SelectionMerge 38 None\r
BranchConditional 36 37 38\r
37: Label\r
8: TypePointer Function 7(fvec4)\r
10: TypePointer Input 7(fvec4)\r
11(BaseColor): 10(ptr) Variable Input\r
- 17: TypeBool\r
- 18: 17(bool) ConstantTrue\r
+ 16: TypeBool\r
+ 18: 16(bool) ConstantTrue\r
23: TypePointer UniformConstant 6(float)\r
24(d): 23(ptr) Variable UniformConstant\r
28: TypePointer UniformConstant 7(fvec4)\r
29(bigColor): 28(ptr) Variable UniformConstant\r
- 33: 17(bool) ConstantFalse\r
+ 33: 16(bool) ConstantFalse\r
34: TypePointer Output 7(fvec4)\r
35(gl_FragColor): 34(ptr) Variable Output\r
4(main): 2 Function None 3\r
Store 9(color) 12\r
Branch 13\r
13: Label\r
- 16: 17(bool) Phi 18 5 33 15\r
+ 17: 16(bool) Phi 18 5 33 15\r
LoopMerge 14 None\r
Branch 19\r
19: Label\r
SelectionMerge 15 None\r
- BranchConditional 16 15 20\r
+ BranchConditional 17 15 20\r
20: Label\r
21: 7(fvec4) Load 9(color)\r
22: 6(float) CompositeExtract 21 0\r
25: 6(float) Load 24(d)\r
- 26: 17(bool) FOrdLessThan 22 25\r
+ 26: 16(bool) FOrdLessThan 22 25\r
SelectionMerge 27 None\r
BranchConditional 26 27 14\r
27: Label\r
--- /dev/null
+spv.image.frag\r
+Warning, version 450 is not yet complete; most version-specific features are present, but some are missing.\r
+\r
+\r
+Linked fragment stage:\r
+\r
+\r
+// Module Version 99\r
+// Generated by (magic number): 51a00bb\r
+// Id's are bound by 383\r
+\r
+ Source GLSL 450\r
+ Capability Shader\r
+ 1: ExtInstImport "GLSL.std.450"\r
+ MemoryModel Logical GLSL450\r
+ EntryPoint Fragment 4 "main"\r
+ ExecutionMode 4 OriginLowerLeft\r
+ Name 4 "main"\r
+ Name 9 "iv"\r
+ Name 15 "i1D"\r
+ Name 25 "i2D"\r
+ Name 36 "i3D"\r
+ Name 43 "iCube"\r
+ Name 53 "iCubeArray"\r
+ Name 60 "i2DRect"\r
+ Name 70 "i1DArray"\r
+ Name 80 "i2DArray"\r
+ Name 87 "iBuffer"\r
+ Name 97 "i2DMS"\r
+ Name 107 "i2DMSArray"\r
+ Name 128 "v"\r
+ Name 133 "ic1D"\r
+ Name 143 "ic2D"\r
+ Name 153 "ic3D"\r
+ Name 172 "ic4D"\r
+ Name 234 "ui"\r
+ Name 238 "ii1D"\r
+ Name 252 "ui2D"\r
+ Name 255 "value"\r
+ Name 370 "fragData"\r
+ Decorate 15(i1D) Binding 0\r
+ Decorate 25(i2D) Binding 1\r
+ Decorate 36(i3D) Binding 2\r
+ Decorate 43(iCube) Binding 3\r
+ Decorate 53(iCubeArray) Binding 4\r
+ Decorate 60(i2DRect) Binding 5\r
+ Decorate 70(i1DArray) Binding 6\r
+ Decorate 80(i2DArray) Binding 7\r
+ Decorate 87(iBuffer) Binding 8\r
+ Decorate 97(i2DMS) Binding 9\r
+ Decorate 107(i2DMSArray) Binding 10\r
+ Decorate 238(ii1D) Binding 11\r
+ Decorate 252(ui2D) Binding 12\r
+ 2: TypeVoid\r
+ 3: TypeFunction 2\r
+ 6: TypeInt 32 1\r
+ 7: TypeVector 6(int) 3\r
+ 8: TypePointer Function 7(ivec3)\r
+ 10: 6(int) Constant 0\r
+ 11: 7(ivec3) ConstantComposite 10 10 10\r
+ 12: TypeFloat 32\r
+ 13: TypeImage 12(float) 1D nonsampled format:Rgba32f\r
+ 14: TypePointer UniformConstant 13\r
+ 15(i1D): 14(ptr) Variable UniformConstant\r
+ 23: TypeImage 12(float) 2D nonsampled format:Rgba32f\r
+ 24: TypePointer UniformConstant 23\r
+ 25(i2D): 24(ptr) Variable UniformConstant\r
+ 27: TypeVector 6(int) 2\r
+ 34: TypeImage 12(float) 3D nonsampled format:Rgba32f\r
+ 35: TypePointer UniformConstant 34\r
+ 36(i3D): 35(ptr) Variable UniformConstant\r
+ 41: TypeImage 12(float) Cube nonsampled format:Rgba32f\r
+ 42: TypePointer UniformConstant 41\r
+ 43(iCube): 42(ptr) Variable UniformConstant\r
+ 51: TypeImage 12(float) Cube array nonsampled format:Rgba32f\r
+ 52: TypePointer UniformConstant 51\r
+ 53(iCubeArray): 52(ptr) Variable UniformConstant\r
+ 58: TypeImage 12(float) Rect nonsampled format:Rgba32f\r
+ 59: TypePointer UniformConstant 58\r
+ 60(i2DRect): 59(ptr) Variable UniformConstant\r
+ 68: TypeImage 12(float) 1D array nonsampled format:Rgba32f\r
+ 69: TypePointer UniformConstant 68\r
+ 70(i1DArray): 69(ptr) Variable UniformConstant\r
+ 78: TypeImage 12(float) 2D array nonsampled format:Rgba32f\r
+ 79: TypePointer UniformConstant 78\r
+ 80(i2DArray): 79(ptr) Variable UniformConstant\r
+ 85: TypeImage 12(float) Buffer nonsampled format:Rgba32f\r
+ 86: TypePointer UniformConstant 85\r
+ 87(iBuffer): 86(ptr) Variable UniformConstant\r
+ 95: TypeImage 12(float) 2D multi-sampled nonsampled format:Rgba32f\r
+ 96: TypePointer UniformConstant 95\r
+ 97(i2DMS): 96(ptr) Variable UniformConstant\r
+ 105: TypeImage 12(float) 2D array multi-sampled nonsampled format:Rgba32f\r
+ 106: TypePointer UniformConstant 105\r
+ 107(i2DMSArray): 106(ptr) Variable UniformConstant\r
+ 126: TypeVector 12(float) 4\r
+ 127: TypePointer Function 126(fvec4)\r
+ 129: 12(float) Constant 0\r
+ 130: 126(fvec4) ConstantComposite 129 129 129 129\r
+ 132: TypePointer UniformConstant 6(int)\r
+ 133(ic1D): 132(ptr) Variable UniformConstant\r
+ 142: TypePointer UniformConstant 27(ivec2)\r
+ 143(ic2D): 142(ptr) Variable UniformConstant\r
+ 152: TypePointer UniformConstant 7(ivec3)\r
+ 153(ic3D): 152(ptr) Variable UniformConstant\r
+ 170: TypeVector 6(int) 4\r
+ 171: TypePointer UniformConstant 170(ivec4)\r
+ 172(ic4D): 171(ptr) Variable UniformConstant\r
+ 214: 6(int) Constant 1\r
+ 220: 6(int) Constant 2\r
+ 224: 6(int) Constant 3\r
+ 230: 6(int) Constant 4\r
+ 232: TypeInt 32 0\r
+ 233: TypePointer Function 232(int)\r
+ 235: 232(int) Constant 0\r
+ 236: TypeImage 6(int) 1D nonsampled format:R32i\r
+ 237: TypePointer UniformConstant 236\r
+ 238(ii1D): 237(ptr) Variable UniformConstant\r
+ 240: 6(int) Constant 10\r
+ 241: TypePointer Image 6(int)\r
+ 243: 232(int) Constant 1\r
+ 250: TypeImage 232(int) 2D nonsampled format:R32ui\r
+ 251: TypePointer UniformConstant 250\r
+ 252(ui2D): 251(ptr) Variable UniformConstant\r
+ 254: TypePointer UniformConstant 232(int)\r
+ 255(value): 254(ptr) Variable UniformConstant\r
+ 257: TypePointer Image 232(int)\r
+ 263: 6(int) Constant 11\r
+ 278: 6(int) Constant 12\r
+ 293: 6(int) Constant 13\r
+ 308: 6(int) Constant 14\r
+ 323: 6(int) Constant 15\r
+ 338: 6(int) Constant 16\r
+ 353: 6(int) Constant 18\r
+ 354: 6(int) Constant 17\r
+ 363: 232(int) Constant 19\r
+ 369: TypePointer Output 126(fvec4)\r
+ 370(fragData): 369(ptr) Variable Output\r
+ 376: TypeBool\r
+ 4(main): 2 Function None 3\r
+ 5: Label\r
+ 9(iv): 8(ptr) Variable Function\r
+ 128(v): 127(ptr) Variable Function\r
+ 234(ui): 233(ptr) Variable Function\r
+ 371: 127(ptr) Variable Function\r
+ Store 9(iv) 11\r
+ 16: 13 Load 15(i1D)\r
+ 17: 6(int) ImageQuerySize 16\r
+ 18: 7(ivec3) Load 9(iv)\r
+ 19: 6(int) CompositeExtract 18 0\r
+ 20: 6(int) IAdd 19 17\r
+ 21: 7(ivec3) Load 9(iv)\r
+ 22: 7(ivec3) CompositeInsert 20 21 0\r
+ Store 9(iv) 22\r
+ 26: 23 Load 25(i2D)\r
+ 28: 27(ivec2) ImageQuerySize 26\r
+ 29: 7(ivec3) Load 9(iv)\r
+ 30: 27(ivec2) VectorShuffle 29 29 0 1\r
+ 31: 27(ivec2) IAdd 30 28\r
+ 32: 7(ivec3) Load 9(iv)\r
+ 33: 7(ivec3) VectorShuffle 32 31 3 4 2\r
+ Store 9(iv) 33\r
+ 37: 34 Load 36(i3D)\r
+ 38: 7(ivec3) ImageQuerySize 37\r
+ 39: 7(ivec3) Load 9(iv)\r
+ 40: 7(ivec3) IAdd 39 38\r
+ Store 9(iv) 40\r
+ 44: 41 Load 43(iCube)\r
+ 45: 27(ivec2) ImageQuerySize 44\r
+ 46: 7(ivec3) Load 9(iv)\r
+ 47: 27(ivec2) VectorShuffle 46 46 0 1\r
+ 48: 27(ivec2) IAdd 47 45\r
+ 49: 7(ivec3) Load 9(iv)\r
+ 50: 7(ivec3) VectorShuffle 49 48 3 4 2\r
+ Store 9(iv) 50\r
+ 54: 51 Load 53(iCubeArray)\r
+ 55: 7(ivec3) ImageQuerySize 54\r
+ 56: 7(ivec3) Load 9(iv)\r
+ 57: 7(ivec3) IAdd 56 55\r
+ Store 9(iv) 57\r
+ 61: 58 Load 60(i2DRect)\r
+ 62: 27(ivec2) ImageQuerySize 61\r
+ 63: 7(ivec3) Load 9(iv)\r
+ 64: 27(ivec2) VectorShuffle 63 63 0 1\r
+ 65: 27(ivec2) IAdd 64 62\r
+ 66: 7(ivec3) Load 9(iv)\r
+ 67: 7(ivec3) VectorShuffle 66 65 3 4 2\r
+ Store 9(iv) 67\r
+ 71: 68 Load 70(i1DArray)\r
+ 72: 27(ivec2) ImageQuerySize 71\r
+ 73: 7(ivec3) Load 9(iv)\r
+ 74: 27(ivec2) VectorShuffle 73 73 0 1\r
+ 75: 27(ivec2) IAdd 74 72\r
+ 76: 7(ivec3) Load 9(iv)\r
+ 77: 7(ivec3) VectorShuffle 76 75 3 4 2\r
+ Store 9(iv) 77\r
+ 81: 78 Load 80(i2DArray)\r
+ 82: 7(ivec3) ImageQuerySize 81\r
+ 83: 7(ivec3) Load 9(iv)\r
+ 84: 7(ivec3) IAdd 83 82\r
+ Store 9(iv) 84\r
+ 88: 85 Load 87(iBuffer)\r
+ 89: 6(int) ImageQuerySize 88\r
+ 90: 7(ivec3) Load 9(iv)\r
+ 91: 6(int) CompositeExtract 90 0\r
+ 92: 6(int) IAdd 91 89\r
+ 93: 7(ivec3) Load 9(iv)\r
+ 94: 7(ivec3) CompositeInsert 92 93 0\r
+ Store 9(iv) 94\r
+ 98: 95 Load 97(i2DMS)\r
+ 99: 27(ivec2) ImageQuerySize 98\r
+ 100: 7(ivec3) Load 9(iv)\r
+ 101: 27(ivec2) VectorShuffle 100 100 0 1\r
+ 102: 27(ivec2) IAdd 101 99\r
+ 103: 7(ivec3) Load 9(iv)\r
+ 104: 7(ivec3) VectorShuffle 103 102 3 4 2\r
+ Store 9(iv) 104\r
+ 108: 105 Load 107(i2DMSArray)\r
+ 109: 7(ivec3) ImageQuerySize 108\r
+ 110: 7(ivec3) Load 9(iv)\r
+ 111: 7(ivec3) IAdd 110 109\r
+ Store 9(iv) 111\r
+ 112: 95 Load 97(i2DMS)\r
+ 113: 6(int) ImageQuerySamples 112\r
+ 114: 7(ivec3) Load 9(iv)\r
+ 115: 6(int) CompositeExtract 114 0\r
+ 116: 6(int) IAdd 115 113\r
+ 117: 7(ivec3) Load 9(iv)\r
+ 118: 7(ivec3) CompositeInsert 116 117 0\r
+ Store 9(iv) 118\r
+ 119: 105 Load 107(i2DMSArray)\r
+ 120: 6(int) ImageQuerySamples 119\r
+ 121: 7(ivec3) Load 9(iv)\r
+ 122: 6(int) CompositeExtract 121 0\r
+ 123: 6(int) IAdd 122 120\r
+ 124: 7(ivec3) Load 9(iv)\r
+ 125: 7(ivec3) CompositeInsert 123 124 0\r
+ Store 9(iv) 125\r
+ Store 128(v) 130\r
+ 131: 13 Load 15(i1D)\r
+ 134: 6(int) Load 133(ic1D)\r
+ 135: 126(fvec4) ImageRead 131 134\r
+ 136: 126(fvec4) Load 128(v)\r
+ 137: 126(fvec4) FAdd 136 135\r
+ Store 128(v) 137\r
+ 138: 13 Load 15(i1D)\r
+ 139: 6(int) Load 133(ic1D)\r
+ 140: 126(fvec4) Load 128(v)\r
+ ImageWrite 138 139 140\r
+ 141: 23 Load 25(i2D)\r
+ 144: 27(ivec2) Load 143(ic2D)\r
+ 145: 126(fvec4) ImageRead 141 144\r
+ 146: 126(fvec4) Load 128(v)\r
+ 147: 126(fvec4) FAdd 146 145\r
+ Store 128(v) 147\r
+ 148: 23 Load 25(i2D)\r
+ 149: 27(ivec2) Load 143(ic2D)\r
+ 150: 126(fvec4) Load 128(v)\r
+ ImageWrite 148 149 150\r
+ 151: 34 Load 36(i3D)\r
+ 154: 7(ivec3) Load 153(ic3D)\r
+ 155: 126(fvec4) ImageRead 151 154\r
+ 156: 126(fvec4) Load 128(v)\r
+ 157: 126(fvec4) FAdd 156 155\r
+ Store 128(v) 157\r
+ 158: 34 Load 36(i3D)\r
+ 159: 7(ivec3) Load 153(ic3D)\r
+ 160: 126(fvec4) Load 128(v)\r
+ ImageWrite 158 159 160\r
+ 161: 41 Load 43(iCube)\r
+ 162: 7(ivec3) Load 153(ic3D)\r
+ 163: 126(fvec4) ImageRead 161 162\r
+ 164: 126(fvec4) Load 128(v)\r
+ 165: 126(fvec4) FAdd 164 163\r
+ Store 128(v) 165\r
+ 166: 41 Load 43(iCube)\r
+ 167: 7(ivec3) Load 153(ic3D)\r
+ 168: 126(fvec4) Load 128(v)\r
+ ImageWrite 166 167 168\r
+ 169: 51 Load 53(iCubeArray)\r
+ 173: 170(ivec4) Load 172(ic4D)\r
+ 174: 126(fvec4) ImageRead 169 173\r
+ 175: 126(fvec4) Load 128(v)\r
+ 176: 126(fvec4) FAdd 175 174\r
+ Store 128(v) 176\r
+ 177: 51 Load 53(iCubeArray)\r
+ 178: 170(ivec4) Load 172(ic4D)\r
+ 179: 126(fvec4) Load 128(v)\r
+ ImageWrite 177 178 179\r
+ 180: 58 Load 60(i2DRect)\r
+ 181: 27(ivec2) Load 143(ic2D)\r
+ 182: 126(fvec4) ImageRead 180 181\r
+ 183: 126(fvec4) Load 128(v)\r
+ 184: 126(fvec4) FAdd 183 182\r
+ Store 128(v) 184\r
+ 185: 58 Load 60(i2DRect)\r
+ 186: 27(ivec2) Load 143(ic2D)\r
+ 187: 126(fvec4) Load 128(v)\r
+ ImageWrite 185 186 187\r
+ 188: 68 Load 70(i1DArray)\r
+ 189: 27(ivec2) Load 143(ic2D)\r
+ 190: 126(fvec4) ImageRead 188 189\r
+ 191: 126(fvec4) Load 128(v)\r
+ 192: 126(fvec4) FAdd 191 190\r
+ Store 128(v) 192\r
+ 193: 68 Load 70(i1DArray)\r
+ 194: 27(ivec2) Load 143(ic2D)\r
+ 195: 126(fvec4) Load 128(v)\r
+ ImageWrite 193 194 195\r
+ 196: 78 Load 80(i2DArray)\r
+ 197: 7(ivec3) Load 153(ic3D)\r
+ 198: 126(fvec4) ImageRead 196 197\r
+ 199: 126(fvec4) Load 128(v)\r
+ 200: 126(fvec4) FAdd 199 198\r
+ Store 128(v) 200\r
+ 201: 78 Load 80(i2DArray)\r
+ 202: 7(ivec3) Load 153(ic3D)\r
+ 203: 126(fvec4) Load 128(v)\r
+ ImageWrite 201 202 203\r
+ 204: 85 Load 87(iBuffer)\r
+ 205: 6(int) Load 133(ic1D)\r
+ 206: 126(fvec4) ImageRead 204 205\r
+ 207: 126(fvec4) Load 128(v)\r
+ 208: 126(fvec4) FAdd 207 206\r
+ Store 128(v) 208\r
+ 209: 85 Load 87(iBuffer)\r
+ 210: 6(int) Load 133(ic1D)\r
+ 211: 126(fvec4) Load 128(v)\r
+ ImageWrite 209 210 211\r
+ 212: 95 Load 97(i2DMS)\r
+ 213: 27(ivec2) Load 143(ic2D)\r
+ 215: 126(fvec4) ImageRead 212 213 214\r
+ 216: 126(fvec4) Load 128(v)\r
+ 217: 126(fvec4) FAdd 216 215\r
+ Store 128(v) 217\r
+ 218: 95 Load 97(i2DMS)\r
+ 219: 27(ivec2) Load 143(ic2D)\r
+ 221: 126(fvec4) Load 128(v)\r
+ ImageWrite 218 219 221 220\r
+ 222: 105 Load 107(i2DMSArray)\r
+ 223: 7(ivec3) Load 153(ic3D)\r
+ 225: 126(fvec4) ImageRead 222 223 224\r
+ 226: 126(fvec4) Load 128(v)\r
+ 227: 126(fvec4) FAdd 226 225\r
+ Store 128(v) 227\r
+ 228: 105 Load 107(i2DMSArray)\r
+ 229: 7(ivec3) Load 153(ic3D)\r
+ 231: 126(fvec4) Load 128(v)\r
+ ImageWrite 228 229 231 230\r
+ Store 234(ui) 235\r
+ 239: 6(int) Load 133(ic1D)\r
+ 242: 241(ptr) ImageTexelPointer 238(ii1D) 239 0\r
+ 244: 6(int) AtomicIAdd 242 243 235 240\r
+ 245: 7(ivec3) Load 9(iv)\r
+ 246: 6(int) CompositeExtract 245 0\r
+ 247: 6(int) IAdd 246 244\r
+ 248: 7(ivec3) Load 9(iv)\r
+ 249: 7(ivec3) CompositeInsert 247 248 0\r
+ Store 9(iv) 249\r
+ 253: 27(ivec2) Load 143(ic2D)\r
+ 256: 232(int) Load 255(value)\r
+ 258: 257(ptr) ImageTexelPointer 252(ui2D) 253 0\r
+ 259: 232(int) AtomicIAdd 258 243 235 256\r
+ 260: 232(int) Load 234(ui)\r
+ 261: 232(int) IAdd 260 259\r
+ Store 234(ui) 261\r
+ 262: 6(int) Load 133(ic1D)\r
+ 264: 241(ptr) ImageTexelPointer 238(ii1D) 262 0\r
+ 265: 6(int) AtomicSMin 264 243 235 263\r
+ 266: 7(ivec3) Load 9(iv)\r
+ 267: 6(int) CompositeExtract 266 0\r
+ 268: 6(int) IAdd 267 265\r
+ 269: 7(ivec3) Load 9(iv)\r
+ 270: 7(ivec3) CompositeInsert 268 269 0\r
+ Store 9(iv) 270\r
+ 271: 27(ivec2) Load 143(ic2D)\r
+ 272: 232(int) Load 255(value)\r
+ 273: 257(ptr) ImageTexelPointer 252(ui2D) 271 0\r
+ 274: 232(int) AtomicUMin 273 243 235 272\r
+ 275: 232(int) Load 234(ui)\r
+ 276: 232(int) IAdd 275 274\r
+ Store 234(ui) 276\r
+ 277: 6(int) Load 133(ic1D)\r
+ 279: 241(ptr) ImageTexelPointer 238(ii1D) 277 0\r
+ 280: 6(int) AtomicSMax 279 243 235 278\r
+ 281: 7(ivec3) Load 9(iv)\r
+ 282: 6(int) CompositeExtract 281 0\r
+ 283: 6(int) IAdd 282 280\r
+ 284: 7(ivec3) Load 9(iv)\r
+ 285: 7(ivec3) CompositeInsert 283 284 0\r
+ Store 9(iv) 285\r
+ 286: 27(ivec2) Load 143(ic2D)\r
+ 287: 232(int) Load 255(value)\r
+ 288: 257(ptr) ImageTexelPointer 252(ui2D) 286 0\r
+ 289: 232(int) AtomicUMax 288 243 235 287\r
+ 290: 232(int) Load 234(ui)\r
+ 291: 232(int) IAdd 290 289\r
+ Store 234(ui) 291\r
+ 292: 6(int) Load 133(ic1D)\r
+ 294: 241(ptr) ImageTexelPointer 238(ii1D) 292 0\r
+ 295: 6(int) AtomicAnd 294 243 235 293\r
+ 296: 7(ivec3) Load 9(iv)\r
+ 297: 6(int) CompositeExtract 296 0\r
+ 298: 6(int) IAdd 297 295\r
+ 299: 7(ivec3) Load 9(iv)\r
+ 300: 7(ivec3) CompositeInsert 298 299 0\r
+ Store 9(iv) 300\r
+ 301: 27(ivec2) Load 143(ic2D)\r
+ 302: 232(int) Load 255(value)\r
+ 303: 257(ptr) ImageTexelPointer 252(ui2D) 301 0\r
+ 304: 232(int) AtomicAnd 303 243 235 302\r
+ 305: 232(int) Load 234(ui)\r
+ 306: 232(int) IAdd 305 304\r
+ Store 234(ui) 306\r
+ 307: 6(int) Load 133(ic1D)\r
+ 309: 241(ptr) ImageTexelPointer 238(ii1D) 307 0\r
+ 310: 6(int) AtomicOr 309 243 235 308\r
+ 311: 7(ivec3) Load 9(iv)\r
+ 312: 6(int) CompositeExtract 311 0\r
+ 313: 6(int) IAdd 312 310\r
+ 314: 7(ivec3) Load 9(iv)\r
+ 315: 7(ivec3) CompositeInsert 313 314 0\r
+ Store 9(iv) 315\r
+ 316: 27(ivec2) Load 143(ic2D)\r
+ 317: 232(int) Load 255(value)\r
+ 318: 257(ptr) ImageTexelPointer 252(ui2D) 316 0\r
+ 319: 232(int) AtomicOr 318 243 235 317\r
+ 320: 232(int) Load 234(ui)\r
+ 321: 232(int) IAdd 320 319\r
+ Store 234(ui) 321\r
+ 322: 6(int) Load 133(ic1D)\r
+ 324: 241(ptr) ImageTexelPointer 238(ii1D) 322 0\r
+ 325: 6(int) AtomicXor 324 243 235 323\r
+ 326: 7(ivec3) Load 9(iv)\r
+ 327: 6(int) CompositeExtract 326 0\r
+ 328: 6(int) IAdd 327 325\r
+ 329: 7(ivec3) Load 9(iv)\r
+ 330: 7(ivec3) CompositeInsert 328 329 0\r
+ Store 9(iv) 330\r
+ 331: 27(ivec2) Load 143(ic2D)\r
+ 332: 232(int) Load 255(value)\r
+ 333: 257(ptr) ImageTexelPointer 252(ui2D) 331 0\r
+ 334: 232(int) AtomicXor 333 243 235 332\r
+ 335: 232(int) Load 234(ui)\r
+ 336: 232(int) IAdd 335 334\r
+ Store 234(ui) 336\r
+ 337: 6(int) Load 133(ic1D)\r
+ 339: 241(ptr) ImageTexelPointer 238(ii1D) 337 0\r
+ 340: 6(int) AtomicExchange 339 243 235 338\r
+ 341: 7(ivec3) Load 9(iv)\r
+ 342: 6(int) CompositeExtract 341 0\r
+ 343: 6(int) IAdd 342 340\r
+ 344: 7(ivec3) Load 9(iv)\r
+ 345: 7(ivec3) CompositeInsert 343 344 0\r
+ Store 9(iv) 345\r
+ 346: 27(ivec2) Load 143(ic2D)\r
+ 347: 232(int) Load 255(value)\r
+ 348: 257(ptr) ImageTexelPointer 252(ui2D) 346 0\r
+ 349: 232(int) AtomicExchange 348 243 235 347\r
+ 350: 232(int) Load 234(ui)\r
+ 351: 232(int) IAdd 350 349\r
+ Store 234(ui) 351\r
+ 352: 6(int) Load 133(ic1D)\r
+ 355: 241(ptr) ImageTexelPointer 238(ii1D) 352 0\r
+ 356: 6(int) AtomicCompareExchange 355 243 235 235 354 353\r
+ 357: 7(ivec3) Load 9(iv)\r
+ 358: 6(int) CompositeExtract 357 0\r
+ 359: 6(int) IAdd 358 356\r
+ 360: 7(ivec3) Load 9(iv)\r
+ 361: 7(ivec3) CompositeInsert 359 360 0\r
+ Store 9(iv) 361\r
+ 362: 27(ivec2) Load 143(ic2D)\r
+ 364: 232(int) Load 255(value)\r
+ 365: 257(ptr) ImageTexelPointer 252(ui2D) 362 0\r
+ 366: 232(int) AtomicCompareExchange 365 243 235 235 364 363\r
+ 367: 232(int) Load 234(ui)\r
+ 368: 232(int) IAdd 367 366\r
+ Store 234(ui) 368\r
+ 372: 232(int) Load 234(ui)\r
+ 373: 7(ivec3) Load 9(iv)\r
+ 374: 6(int) CompositeExtract 373 1\r
+ 375: 232(int) Bitcast 374\r
+ 377: 376(bool) INotEqual 372 375\r
+ SelectionMerge 379 None\r
+ BranchConditional 377 378 381\r
+ 378: Label\r
+ 380: 126(fvec4) Load 128(v)\r
+ Store 371 380\r
+ Branch 379\r
+ 381: Label\r
+ Store 371 130\r
+ Branch 379\r
+ 379: Label\r
+ 382: 126(fvec4) Load 371\r
+ Store 370(fragData) 382\r
+ Return\r
+ FunctionEnd\r
8: TypePointer Function 7(fvec4)\r
10: TypePointer Input 7(fvec4)\r
11(BaseColor): 10(ptr) Variable Input\r
- 17: TypeBool\r
- 18: 17(bool) ConstantTrue\r
+ 16: TypeBool\r
+ 18: 16(bool) ConstantTrue\r
23: TypePointer UniformConstant 6(float)\r
24(d4): 23(ptr) Variable UniformConstant\r
28: TypePointer UniformConstant 7(fvec4)\r
29(bigColor4): 28(ptr) Variable UniformConstant\r
39: 6(float) Constant 1073741824\r
53: 6(float) Constant 1065353216\r
- 57: 17(bool) ConstantFalse\r
+ 57: 16(bool) ConstantFalse\r
83(d13): 23(ptr) Variable UniformConstant\r
147: TypePointer Output 7(fvec4)\r
148(gl_FragColor): 147(ptr) Variable Output\r
Store 9(color) 12\r
Branch 13\r
13: Label\r
- 16: 17(bool) Phi 18 5 57 49 57 64\r
+ 17: 16(bool) Phi 18 5 57 49 57 64\r
LoopMerge 14 None\r
Branch 19\r
19: Label\r
SelectionMerge 15 None\r
- BranchConditional 16 15 20\r
+ BranchConditional 17 15 20\r
20: Label\r
21: 7(fvec4) Load 9(color)\r
22: 6(float) CompositeExtract 21 2\r
25: 6(float) Load 24(d4)\r
- 26: 17(bool) FOrdLessThan 22 25\r
+ 26: 16(bool) FOrdLessThan 22 25\r
SelectionMerge 27 None\r
BranchConditional 26 27 14\r
27: Label\r
33: 7(fvec4) Load 9(color)\r
34: 6(float) CompositeExtract 33 0\r
35: 6(float) Load 24(d4)\r
- 36: 17(bool) FOrdLessThan 34 35\r
+ 36: 16(bool) FOrdLessThan 34 35\r
SelectionMerge 38 None\r
BranchConditional 36 37 38\r
37: Label\r
45: 7(fvec4) Load 9(color)\r
46: 6(float) CompositeExtract 45 2\r
47: 6(float) Load 24(d4)\r
- 48: 17(bool) FOrdLessThan 46 47\r
+ 48: 16(bool) FOrdLessThan 46 47\r
SelectionMerge 50 None\r
BranchConditional 48 49 50\r
49: Label\r
59: 7(fvec4) Load 9(color)\r
60: 6(float) CompositeExtract 59 1\r
61: 6(float) Load 24(d4)\r
- 62: 17(bool) FOrdLessThan 60 61\r
+ 62: 16(bool) FOrdLessThan 60 61\r
SelectionMerge 64 None\r
BranchConditional 62 63 71\r
63: Label\r
81: 7(fvec4) Load 9(color)\r
82: 6(float) CompositeExtract 81 3\r
84: 6(float) Load 83(d13)\r
- 85: 17(bool) FOrdLessThan 82 84\r
+ 85: 16(bool) FOrdLessThan 82 84\r
LoopMerge 79 None\r
BranchConditional 85 80 79\r
80: Label\r
86: 7(fvec4) Load 9(color)\r
87: 6(float) CompositeExtract 86 2\r
88: 6(float) Load 83(d13)\r
- 89: 17(bool) FOrdLessThan 87 88\r
+ 89: 16(bool) FOrdLessThan 87 88\r
SelectionMerge 91 None\r
BranchConditional 89 90 95\r
90: Label\r
102: 7(fvec4) Load 9(color)\r
103: 6(float) CompositeExtract 102 0\r
104: 6(float) Load 24(d4)\r
- 105: 17(bool) FOrdLessThan 103 104\r
+ 105: 16(bool) FOrdLessThan 103 104\r
SelectionMerge 107 None\r
BranchConditional 105 106 107\r
106: Label\r
113: 7(fvec4) Load 9(color)\r
114: 6(float) CompositeExtract 113 2\r
115: 6(float) Load 24(d4)\r
- 116: 17(bool) FOrdLessThan 114 115\r
+ 116: 16(bool) FOrdLessThan 114 115\r
SelectionMerge 118 None\r
BranchConditional 116 117 118\r
117: Label\r
125: 7(fvec4) Load 9(color)\r
126: 6(float) CompositeExtract 125 1\r
127: 6(float) Load 24(d4)\r
- 128: 17(bool) FOrdLessThan 126 127\r
+ 128: 16(bool) FOrdLessThan 126 127\r
SelectionMerge 130 None\r
BranchConditional 128 129 137\r
129: Label\r
64: 21 Load 23(s3D)\r
68: 65(ivec3) Load 67(ic3D)\r
71: 50(int) Load 70(ic1D)\r
- 72: 7(fvec4) ImageFetch 64 68\r
+ 72: 7(fvec4) ImageFetch 64 68 71\r
73: 7(fvec4) Load 9(v)\r
74: 7(fvec4) FAdd 73 72\r
Store 9(v) 74\r
75: 11 Load 13(s2D)\r
78: 51(ivec2) Load 77(ic2D)\r
- 80: 7(fvec4) ImageFetch 75 78 79\r
+ 80: 7(fvec4) ImageFetch 75 78 79 53\r
81: 7(fvec4) Load 9(v)\r
82: 7(fvec4) FAdd 81 80\r
Store 9(v) 82\r
205: 202 Load 204(is2DArray)\r
206: 65(ivec3) Load 67(ic3D)\r
207: 50(int) Load 70(ic1D)\r
- 208: 139(ivec4) ImageFetch 205 206\r
+ 208: 139(ivec4) ImageFetch 205 206 207\r
Store 141(iv) 208\r
209: 139(ivec4) Load 141(iv)\r
210: 7(fvec4) ConvertSToF 209\r
214: 70 Load 72(texSampler2D)\r
215: 205(ivec2) Load 207(iCoords2D)\r
216: 204(int) Load 212(iLod)\r
- 217: 22(fvec4) ImageFetch 214 215\r
+ 217: 22(fvec4) ImageFetch 214 215 216\r
218: 22(fvec4) Load 26(color)\r
219: 22(fvec4) FAdd 218 217\r
Store 26(color) 219\r
--- /dev/null
+#version 450\r
+\r
+layout(rgba32f, binding = 0) uniform image1D i1D;\r
+layout(rgba32f, binding = 1) uniform image2D i2D;\r
+layout(rgba32f, binding = 2) uniform image3D i3D;\r
+layout(rgba32f, binding = 3) uniform imageCube iCube;\r
+layout(rgba32f, binding = 4) uniform imageCubeArray iCubeArray;\r
+layout(rgba32f, binding = 5) uniform image2DRect i2DRect;\r
+layout(rgba32f, binding = 6) uniform image1DArray i1DArray;\r
+layout(rgba32f, binding = 7) uniform image2DArray i2DArray;\r
+layout(rgba32f, binding = 8) uniform imageBuffer iBuffer;\r
+layout(rgba32f, binding = 9) uniform image2DMS i2DMS;\r
+layout(rgba32f, binding = 10) uniform image2DMSArray i2DMSArray;\r
+\r
+layout(r32i, binding = 11) uniform iimage1D ii1D;\r
+layout(r32ui, binding = 12) uniform uimage2D ui2D;\r
+\r
+uniform int ic1D;\r
+uniform ivec2 ic2D;\r
+uniform ivec3 ic3D;\r
+uniform ivec4 ic4D;\r
+\r
+uniform uint value;\r
+\r
+out vec4 fragData;\r
+\r
+void main()\r
+{\r
+ ivec3 iv = ivec3(0);\r
+ iv.x += imageSize(i1D);\r
+ iv.xy += imageSize(i2D);\r
+ iv.xyz += imageSize(i3D);\r
+ iv.xy += imageSize(iCube);\r
+ iv.xyz += imageSize(iCubeArray);\r
+ iv.xy += imageSize(i2DRect);\r
+ iv.xy += imageSize(i1DArray);\r
+ iv.xyz += imageSize(i2DArray);\r
+ iv.x += imageSize(iBuffer);\r
+ iv.xy += imageSize(i2DMS);\r
+ iv.xyz += imageSize(i2DMSArray);\r
+\r
+ iv.x += imageSamples(i2DMS);\r
+ iv.x += imageSamples(i2DMSArray);\r
+\r
+ vec4 v = vec4(0.0);\r
+ v += imageLoad(i1D, ic1D);\r
+ imageStore(i1D, ic1D, v);\r
+ v += imageLoad(i2D, ic2D);\r
+ imageStore(i2D, ic2D, v);\r
+ v += imageLoad(i3D, ic3D);\r
+ imageStore(i3D, ic3D, v);\r
+ v += imageLoad(iCube, ic3D);\r
+ imageStore(iCube, ic3D, v);\r
+ v += imageLoad(iCubeArray, ic4D);\r
+ imageStore(iCubeArray, ic4D, v);\r
+ v += imageLoad(i2DRect, ic2D);\r
+ imageStore(i2DRect, ic2D, v);\r
+ v += imageLoad(i1DArray, ic2D);\r
+ imageStore(i1DArray, ic2D, v);\r
+ v += imageLoad(i2DArray, ic3D);\r
+ imageStore(i2DArray, ic3D, v);\r
+ v += imageLoad(iBuffer, ic1D);\r
+ imageStore(iBuffer, ic1D, v);\r
+ v += imageLoad(i2DMS, ic2D, 1);\r
+ imageStore(i2DMS, ic2D, 2, v);\r
+ v += imageLoad(i2DMSArray, ic3D, 3);\r
+ imageStore(i2DMSArray, ic3D, 4, v);\r
+\r
+ uint ui = 0;\r
+ iv.x += imageAtomicAdd(ii1D, ic1D, 10);\r
+ ui += imageAtomicAdd(ui2D, ic2D, value);\r
+ iv.x += imageAtomicMin(ii1D, ic1D, 11);\r
+ ui += imageAtomicMin(ui2D, ic2D, value);\r
+ iv.x += imageAtomicMax(ii1D, ic1D, 12);\r
+ ui += imageAtomicMax(ui2D, ic2D, value);\r
+ iv.x += imageAtomicAnd(ii1D, ic1D, 13);\r
+ ui += imageAtomicAnd(ui2D, ic2D, value);\r
+ iv.x += imageAtomicOr(ii1D, ic1D, 14);\r
+ ui += imageAtomicOr(ui2D, ic2D, value);\r
+ iv.x += imageAtomicXor(ii1D, ic1D, 15);\r
+ ui += imageAtomicXor(ui2D, ic2D, value);\r
+ iv.x += imageAtomicExchange(ii1D, ic1D, 16);\r
+ ui += imageAtomicExchange(ui2D, ic2D, value);\r
+ iv.x += imageAtomicCompSwap(ii1D, ic1D, 18, 17);\r
+ ui += imageAtomicCompSwap(ui2D, ic2D, 19u, value);\r
+\r
+ fragData = ui != iv.y ? v : vec4(0.0); \r
+}\r
+\r
spv.test.vert
spv.texture.frag
spv.texture.vert
+spv.image.frag
spv.types.frag
spv.uint.frag
spv.uniformArray.frag
bool query;
bool proj;
bool lod;
- bool sample;
bool fetch;
bool offset;
bool offsets;
cracked.query = false;
cracked.proj = false;
cracked.lod = false;
- cracked.sample = false;
cracked.fetch = false;
cracked.offset = false;
cracked.offsets = false;
cracked.grad = false;
switch (op) {
+ case EOpImageQuerySize:
+ case EOpImageQuerySamples:
case EOpTextureQuerySize:
case EOpTextureQueryLod:
case EOpTextureQueryLevels:
break;
case EOpTextureFetch:
cracked.fetch = true;
- if (sampler.dim == Esd1D || sampler.dim == Esd2D || sampler.dim == Esd3D) {
- if (sampler.ms)
- cracked.sample = true;
- else
- cracked.lod = true;
- }
+ if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ cracked.lod = true;
break;
case EOpTextureFetchOffset:
cracked.fetch = true;
cracked.offset = true;
- if (sampler.dim == Esd1D || sampler.dim == Esd2D || sampler.dim == Esd3D) {
- if (sampler.ms)
- cracked.sample = true;
- else
- cracked.lod = true;
- }
+ if (sampler.dim == Esd1D || (sampler.dim == Esd2D && ! sampler.ms) || sampler.dim == Esd3D)
+ cracked.lod = true;
break;
case EOpTextureProjOffset:
cracked.offset = true;