vk_shader_decompiler: Implement UAtomicAdd (ATOMS) on SPIR-V
Also updates sirit to include atomic instructions.
This commit is contained in:
		
							
								
								
									
										2
									
								
								externals/sirit
									
									
									
									
										vendored
									
									
								
							
							
								
								
								
								
								
							
						
						
									
										2
									
								
								externals/sirit
									
									
									
									
										vendored
									
									
								
							 Submodule externals/sirit updated: 9f4d057aa2...a712959f1e
									
								
							| @@ -1796,9 +1796,17 @@ private: | |||||||
|         return {}; |         return {}; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     Expression UAtomicAdd(Operation) { |     Expression UAtomicAdd(Operation operation) { | ||||||
|         UNIMPLEMENTED(); |         const auto& smem = std::get<SmemNode>(*operation[0]); | ||||||
|         return {}; |         Id address = AsUint(Visit(smem.GetAddress())); | ||||||
|  |         address = OpShiftRightLogical(t_uint, address, Constant(t_uint, 2U)); | ||||||
|  |         const Id pointer = OpAccessChain(t_smem_uint, shared_memory, address); | ||||||
|  |  | ||||||
|  |         const Id scope = Constant(t_uint, static_cast<u32>(spv::Scope::Device)); | ||||||
|  |         const Id semantics = Constant(t_uint, 0U); | ||||||
|  |  | ||||||
|  |         const Id value = AsUint(Visit(operation[1])); | ||||||
|  |         return {OpAtomicIAdd(t_uint, pointer, scope, semantics, value), Type::Uint}; | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     Expression Branch(Operation operation) { |     Expression Branch(Operation operation) { | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user