mirror of
				https://github.com/encounter/dawn-cmake.git
				synced 2025-10-24 18:50:29 +00:00 
			
		
		
		
	CTS tests: https://github.com/gpuweb/cts/pull/1005 Bug: tint:1371 Change-Id: I228c7b2a27c6fbac0653c416fac603a6fb4bff85 Reviewed-on: https://dawn-review.googlesource.com/c/tint/+/81640 Reviewed-by: David Neto <dneto@google.com> Kokoro: Kokoro <noreply+kokoro@google.com>
		
			
				
	
	
		
			63 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			63 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ; SPIR-V
 | |
| ; Version: 1.3
 | |
| ; Generator: Google Tint Compiler; 0
 | |
| ; Bound: 36
 | |
| ; Schema: 0
 | |
|                OpCapability Shader
 | |
|          %11 = OpExtInstImport "GLSL.std.450"
 | |
|                OpMemoryModel Logical GLSL450
 | |
|                OpEntryPoint GLCompute %f "f"
 | |
|                OpExecutionMode %f LocalSize 1 1 1
 | |
|                OpName %tint_extract_bits "tint_extract_bits"
 | |
|                OpName %v "v"
 | |
|                OpName %offset "offset"
 | |
|                OpName %count "count"
 | |
|                OpName %f_1 "f_1"
 | |
|                OpName %v_0 "v"
 | |
|                OpName %offset_1 "offset_1"
 | |
|                OpName %count_0 "count"
 | |
|                OpName %f "f"
 | |
|         %int = OpTypeInt 32 1
 | |
|       %v3int = OpTypeVector %int 3
 | |
|        %uint = OpTypeInt 32 0
 | |
|           %1 = OpTypeFunction %v3int %v3int %uint %uint
 | |
|     %uint_32 = OpConstant %uint 32
 | |
|        %void = OpTypeVoid
 | |
|          %17 = OpTypeFunction %void
 | |
|          %21 = OpConstantNull %v3int
 | |
| %_ptr_Function_v3int = OpTypePointer Function %v3int
 | |
|      %uint_0 = OpConstant %uint 0
 | |
| %_ptr_Function_uint = OpTypePointer Function %uint
 | |
|          %27 = OpConstantNull %uint
 | |
| %tint_extract_bits = OpFunction %v3int None %1
 | |
|           %v = OpFunctionParameter %v3int
 | |
|      %offset = OpFunctionParameter %uint
 | |
|       %count = OpFunctionParameter %uint
 | |
|           %9 = OpLabel
 | |
|          %10 = OpExtInst %uint %11 UMin %offset %uint_32
 | |
|          %14 = OpIAdd %uint %10 %count
 | |
|          %13 = OpExtInst %uint %11 UMin %uint_32 %14
 | |
|          %16 = OpISub %uint %13 %10
 | |
|          %15 = OpBitFieldSExtract %v3int %v %10 %16
 | |
|                OpReturnValue %15
 | |
|                OpFunctionEnd
 | |
|         %f_1 = OpFunction %void None %17
 | |
|          %20 = OpLabel
 | |
|         %v_0 = OpVariable %_ptr_Function_v3int Function %21
 | |
|    %offset_1 = OpVariable %_ptr_Function_uint Function %27
 | |
|     %count_0 = OpVariable %_ptr_Function_uint Function %27
 | |
|                OpStore %v_0 %21
 | |
|                OpStore %offset_1 %uint_0
 | |
|                OpStore %count_0 %uint_0
 | |
|          %29 = OpLoad %v3int %v_0
 | |
|          %30 = OpLoad %uint %offset_1
 | |
|          %31 = OpLoad %uint %count_0
 | |
|          %32 = OpFunctionCall %v3int %tint_extract_bits %29 %30 %31
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 | |
|           %f = OpFunction %void None %17
 | |
|          %34 = OpLabel
 | |
|          %35 = OpFunctionCall %void %f_1
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 |