mirror of
				https://github.com/encounter/dawn-cmake.git
				synced 2025-10-26 03:30:30 +00:00 
			
		
		
		
	This is required to handle materialized values, and for constant expressions. Bug: tint:1504 Change-Id: If0a49e9b03566c06aa6e4e4c284fc427e1541e91 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/92082 Reviewed-by: Dan Sinclair <dsinclair@chromium.org> Kokoro: Kokoro <noreply+kokoro@google.com> Commit-Queue: Ben Clayton <bclayton@chromium.org>
		
			
				
	
	
		
			61 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| ; SPIR-V
 | |
| ; Version: 1.3
 | |
| ; Generator: Google Tint Compiler; 0
 | |
| ; Bound: 34
 | |
| ; Schema: 0
 | |
|                OpCapability Shader
 | |
|          %10 = 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
 | |
|        %uint = OpTypeInt 32 0
 | |
|           %1 = OpTypeFunction %int %int %uint %uint
 | |
|     %uint_32 = OpConstant %uint 32
 | |
|        %void = OpTypeVoid
 | |
|          %16 = OpTypeFunction %void
 | |
|          %20 = OpConstantNull %int
 | |
| %_ptr_Function_int = OpTypePointer Function %int
 | |
|          %23 = OpConstantNull %uint
 | |
| %_ptr_Function_uint = OpTypePointer Function %uint
 | |
| %tint_extract_bits = OpFunction %int None %1
 | |
|           %v = OpFunctionParameter %int
 | |
|      %offset = OpFunctionParameter %uint
 | |
|       %count = OpFunctionParameter %uint
 | |
|           %8 = OpLabel
 | |
|           %9 = OpExtInst %uint %10 UMin %offset %uint_32
 | |
|          %13 = OpIAdd %uint %9 %count
 | |
|          %12 = OpExtInst %uint %10 UMin %uint_32 %13
 | |
|          %15 = OpISub %uint %12 %9
 | |
|          %14 = OpBitFieldSExtract %int %v %9 %15
 | |
|                OpReturnValue %14
 | |
|                OpFunctionEnd
 | |
|         %f_1 = OpFunction %void None %16
 | |
|          %19 = OpLabel
 | |
|         %v_0 = OpVariable %_ptr_Function_int Function %20
 | |
|    %offset_1 = OpVariable %_ptr_Function_uint Function %23
 | |
|     %count_0 = OpVariable %_ptr_Function_uint Function %23
 | |
|                OpStore %v_0 %20
 | |
|                OpStore %offset_1 %23
 | |
|                OpStore %count_0 %23
 | |
|          %27 = OpLoad %int %v_0
 | |
|          %28 = OpLoad %uint %offset_1
 | |
|          %29 = OpLoad %uint %count_0
 | |
|          %30 = OpFunctionCall %int %tint_extract_bits %27 %28 %29
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 | |
|           %f = OpFunction %void None %16
 | |
|          %32 = OpLabel
 | |
|          %33 = OpFunctionCall %void %f_1
 | |
|                OpReturn
 | |
|                OpFunctionEnd
 |