SPV: Fix an issue related with imageStore() for 2DMS.
This commit is contained in:
		
							parent
							
								
									ea0cb2eb11
								
							
						
					
					
						commit
						7beb44190f
					
				@ -1889,15 +1889,19 @@ spv::Id TGlslangToSpvTraverser::createImageTextureFunctionCall(glslang::TIntermO
 | 
				
			|||||||
        auto opIt = arguments.begin();
 | 
					        auto opIt = arguments.begin();
 | 
				
			||||||
        operands.push_back(*(opIt++));
 | 
					        operands.push_back(*(opIt++));
 | 
				
			||||||
        operands.push_back(*(opIt++));
 | 
					        operands.push_back(*(opIt++));
 | 
				
			||||||
        if (node->getOp() == glslang::EOpImageStore)
 | 
					 | 
				
			||||||
            operands.push_back(*(opIt++));
 | 
					 | 
				
			||||||
        if (node->getOp() == glslang::EOpImageLoad) {
 | 
					        if (node->getOp() == glslang::EOpImageLoad) {
 | 
				
			||||||
            if (sampler.ms) {
 | 
					            if (sampler.ms) {
 | 
				
			||||||
                operands.push_back(spv::ImageOperandsSampleMask);
 | 
					                operands.push_back(spv::ImageOperandsSampleMask);
 | 
				
			||||||
                operands.push_back(*(opIt++));
 | 
					                operands.push_back(*opIt);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
 | 
					            return builder.createOp(spv::OpImageRead, convertGlslangToSpvType(node->getType()), operands);
 | 
				
			||||||
        } else if (node->getOp() == glslang::EOpImageStore) {
 | 
					        } else if (node->getOp() == glslang::EOpImageStore) {
 | 
				
			||||||
 | 
					            if (sampler.ms) {
 | 
				
			||||||
 | 
					                operands.push_back(*(opIt + 1));
 | 
				
			||||||
 | 
					                operands.push_back(spv::ImageOperandsSampleMask);
 | 
				
			||||||
 | 
					                operands.push_back(*opIt);
 | 
				
			||||||
 | 
					            } else
 | 
				
			||||||
 | 
					                operands.push_back(*opIt);
 | 
				
			||||||
            builder.createNoResultOp(spv::OpImageWrite, operands);
 | 
					            builder.createNoResultOp(spv::OpImageWrite, operands);
 | 
				
			||||||
            return spv::NoResult;
 | 
					            return spv::NoResult;
 | 
				
			||||||
        } else {
 | 
					        } else {
 | 
				
			||||||
 | 
				
			|||||||
@ -333,7 +333,7 @@ Linked fragment stage:
 | 
				
			|||||||
             214:          96 Load 98(i2DMS)
 | 
					             214:          96 Load 98(i2DMS)
 | 
				
			||||||
             215:   29(ivec2) Load 142(ic2D)
 | 
					             215:   29(ivec2) Load 142(ic2D)
 | 
				
			||||||
             217:  125(fvec4) Load 127(v)
 | 
					             217:  125(fvec4) Load 127(v)
 | 
				
			||||||
                              ImageWrite 214 215 216
 | 
					                              ImageWrite 214 215 217 Sample 216
 | 
				
			||||||
             218:         106 Load 108(i2DMSArray)
 | 
					             218:         106 Load 108(i2DMSArray)
 | 
				
			||||||
             219:    7(ivec3) Load 152(ic3D)
 | 
					             219:    7(ivec3) Load 152(ic3D)
 | 
				
			||||||
             221:  125(fvec4) ImageRead 218 219 Sample 220
 | 
					             221:  125(fvec4) ImageRead 218 219 Sample 220
 | 
				
			||||||
@ -343,7 +343,7 @@ Linked fragment stage:
 | 
				
			|||||||
             224:         106 Load 108(i2DMSArray)
 | 
					             224:         106 Load 108(i2DMSArray)
 | 
				
			||||||
             225:    7(ivec3) Load 152(ic3D)
 | 
					             225:    7(ivec3) Load 152(ic3D)
 | 
				
			||||||
             227:  125(fvec4) Load 127(v)
 | 
					             227:  125(fvec4) Load 127(v)
 | 
				
			||||||
                              ImageWrite 224 225 226
 | 
					                              ImageWrite 224 225 227 Sample 226
 | 
				
			||||||
                              Store 229(ui) 19
 | 
					                              Store 229(ui) 19
 | 
				
			||||||
             233:      6(int) Load 132(ic1D)
 | 
					             233:      6(int) Load 132(ic1D)
 | 
				
			||||||
             236:    235(ptr) ImageTexelPointer 232(ii1D) 233 0
 | 
					             236:    235(ptr) ImageTexelPointer 232(ii1D) 233 0
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user