dawn-cmake/test/tint/builtins/frexp/scalar/mixed.wgsl.expected.spvasm
Ben Clayton 69c2c34326 tint: Implement const-eval of frexp()
Also add abstract overloads.

Bug: tint:1581
Fixed: tint:1768
Change-Id: Icda465e0cfe960b77823c2135f0cfe8f82ed394f
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111441
Kokoro: Kokoro <noreply+kokoro@google.com>
Reviewed-by: Antonio Maiorano <amaiorano@google.com>
Reviewed-by: Dan Sinclair <dsinclair@chromium.org>
Commit-Queue: Ben Clayton <bclayton@google.com>
2022-11-23 18:21:38 +00:00

47 lines
1.8 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 26
; Schema: 0
OpCapability Shader
%16 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %main "main"
OpExecutionMode %main LocalSize 1 1 1
OpName %main "main"
OpName %__frexp_result "__frexp_result"
OpMemberName %__frexp_result 0 "fract"
OpMemberName %__frexp_result 1 "exp"
OpName %res "res"
OpMemberDecorate %__frexp_result 0 Offset 0
OpMemberDecorate %__frexp_result 1 Offset 4
%void = OpTypeVoid
%1 = OpTypeFunction %void
%float = OpTypeFloat 32
%float_1_25 = OpConstant %float 1.25
%int = OpTypeInt 32 1
%__frexp_result = OpTypeStruct %float %int
%float_0_625 = OpConstant %float 0.625
%int_1 = OpConstant %int 1
%11 = OpConstantComposite %__frexp_result %float_0_625 %int_1
%_ptr_Function___frexp_result = OpTypePointer Function %__frexp_result
%14 = OpConstantNull %__frexp_result
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_Function_float = OpTypePointer Function %float
%uint_1 = OpConstant %uint 1
%_ptr_Function_int = OpTypePointer Function %int
%main = OpFunction %void None %1
%4 = OpLabel
%res = OpVariable %_ptr_Function___frexp_result Function %14
OpStore %res %11
%15 = OpExtInst %__frexp_result %16 FrexpStruct %float_1_25
OpStore %res %15
OpStore %res %11
%20 = OpAccessChain %_ptr_Function_float %res %uint_0
%21 = OpLoad %float %20
%24 = OpAccessChain %_ptr_Function_int %res %uint_1
%25 = OpLoad %int %24
OpReturn
OpFunctionEnd