Add missing guard to code that uses AMD extensions
Otherwise compilation fails when ENABLED_AMD_EXTENSIONS is off.
This commit is contained in:
		
							parent
							
								
									5d45eadedc
								
							
						
					
					
						commit
						bb5c02fd23
					
				@ -4133,10 +4133,12 @@ spv::Id TGlslangToSpvTraverser::createInvocationsOperation(glslang::TOperator op
 | 
			
		||||
        builder.addCapability(spv::CapabilitySubgroupBallotKHR);
 | 
			
		||||
    } else {
 | 
			
		||||
        builder.addCapability(spv::CapabilityGroups);
 | 
			
		||||
#ifdef AMD_EXTENSIONS
 | 
			
		||||
        if (op == glslang::EOpMinInvocationsNonUniform ||
 | 
			
		||||
            op == glslang::EOpMaxInvocationsNonUniform ||
 | 
			
		||||
            op == glslang::EOpAddInvocationsNonUniform)
 | 
			
		||||
            builder.addExtension(spv::E_SPV_AMD_shader_ballot);
 | 
			
		||||
#endif
 | 
			
		||||
 | 
			
		||||
        spvGroupOperands.push_back(builder.makeUintConstant(spv::ScopeSubgroup));
 | 
			
		||||
#ifdef AMD_EXTENSIONS
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user