mirror of
				https://github.com/encounter/dawn-cmake.git
				synced 2025-10-25 19:20:30 +00:00 
			
		
		
		
	Use the ExpandCompoundAssignment transform to convert compound assignments to regular assignments. Bug: tint:1325 Change-Id: I193a09815836755bc1f7138fe1947be39f7b7206 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/85285 Reviewed-by: Ben Clayton <bclayton@google.com> Kokoro: James Price <jrprice@google.com>
		
			
				
	
	
		
			52 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			52 lines
		
	
	
		
			1.9 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ; SPIR-V
 | |
| ; Version: 1.3
 | |
| ; Generator: Google Tint Compiler; 0
 | |
| ; Bound: 31
 | |
| ; Schema: 0
 | |
|                OpCapability Shader
 | |
|                OpMemoryModel Logical GLSL450
 | |
|                OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
 | |
|                OpExecutionMode %unused_entry_point LocalSize 1 1 1
 | |
|                OpName %unused_entry_point "unused_entry_point"
 | |
|                OpName %foo "foo"
 | |
|                OpName %a "a"
 | |
|                OpName %b "b"
 | |
|                OpName %c "c"
 | |
|        %void = OpTypeVoid
 | |
|           %1 = OpTypeFunction %void
 | |
|         %int = OpTypeInt 32 1
 | |
| %_ptr_Function_int = OpTypePointer Function %int
 | |
|          %10 = OpConstantNull %int
 | |
|       %float = OpTypeFloat 32
 | |
|     %v4float = OpTypeVector %float 4
 | |
| %_ptr_Function_v4float = OpTypePointer Function %v4float
 | |
|          %15 = OpConstantNull %v4float
 | |
|     %v2float = OpTypeVector %float 2
 | |
| %mat2v2float = OpTypeMatrix %v2float 2
 | |
| %_ptr_Function_mat2v2float = OpTypePointer Function %mat2v2float
 | |
|          %20 = OpConstantNull %mat2v2float
 | |
|       %int_2 = OpConstant %int 2
 | |
| %mat4v4float = OpTypeMatrix %v4float 4
 | |
|          %26 = OpConstantNull %mat4v4float
 | |
|     %float_2 = OpConstant %float 2
 | |
| %unused_entry_point = OpFunction %void None %1
 | |
|           %4 = OpLabel
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 | |
|         %foo = OpFunction %void None %1
 | |
|           %6 = OpLabel
 | |
|           %a = OpVariable %_ptr_Function_int Function %10
 | |
|           %b = OpVariable %_ptr_Function_v4float Function %15
 | |
|           %c = OpVariable %_ptr_Function_mat2v2float Function %20
 | |
|          %21 = OpLoad %int %a
 | |
|          %23 = OpSDiv %int %21 %int_2
 | |
|                OpStore %a %23
 | |
|          %24 = OpLoad %v4float %b
 | |
|          %27 = OpVectorTimesMatrix %v4float %24 %26
 | |
|                OpStore %b %27
 | |
|          %28 = OpLoad %mat2v2float %c
 | |
|          %30 = OpMatrixTimesScalar %mat2v2float %28 %float_2
 | |
|                OpStore %c %30
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 |