mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-06-03 13:11:34 +00:00
This CL implement f16 for pipeline IO, i.e. vertex shader input, interstage variables between vertex and fragment shader, and fragment shader output (render target). Unit tests and E2E tests for Tint and Dawn are also implemented. Bugs: tint:1473, tint:1502 Change-Id: If0d6b2b3171ec8b7e4efc0efd58cc803c6a3d3a8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111160 Commit-Queue: Zhaoming Jiang <zhaoming.jiang@intel.com> Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com>
124 lines
5.6 KiB
Plaintext
124 lines
5.6 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.3
|
|
; Generator: Google Tint Compiler; 0
|
|
; Bound: 62
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
OpCapability Float16
|
|
OpCapability UniformAndStorageBuffer16BitAccess
|
|
OpCapability StorageBuffer16BitAccess
|
|
OpCapability StorageInputOutput16
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %loc0_1 %frag_depth_1 %loc1_1 %loc2_1 %sample_mask_1 %loc3_1 %loc4_1 %loc5_1
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpExecutionMode %main DepthReplacing
|
|
OpName %loc0_1 "loc0_1"
|
|
OpName %frag_depth_1 "frag_depth_1"
|
|
OpName %loc1_1 "loc1_1"
|
|
OpName %loc2_1 "loc2_1"
|
|
OpName %sample_mask_1 "sample_mask_1"
|
|
OpName %loc3_1 "loc3_1"
|
|
OpName %loc4_1 "loc4_1"
|
|
OpName %loc5_1 "loc5_1"
|
|
OpName %FragmentOutputs "FragmentOutputs"
|
|
OpMemberName %FragmentOutputs 0 "loc0"
|
|
OpMemberName %FragmentOutputs 1 "frag_depth"
|
|
OpMemberName %FragmentOutputs 2 "loc1"
|
|
OpMemberName %FragmentOutputs 3 "loc2"
|
|
OpMemberName %FragmentOutputs 4 "sample_mask"
|
|
OpMemberName %FragmentOutputs 5 "loc3"
|
|
OpMemberName %FragmentOutputs 6 "loc4"
|
|
OpMemberName %FragmentOutputs 7 "loc5"
|
|
OpName %main_inner "main_inner"
|
|
OpName %main "main"
|
|
OpDecorate %loc0_1 Location 0
|
|
OpDecorate %frag_depth_1 BuiltIn FragDepth
|
|
OpDecorate %loc1_1 Location 1
|
|
OpDecorate %loc2_1 Location 2
|
|
OpDecorate %_arr_uint_uint_1 ArrayStride 4
|
|
OpDecorate %sample_mask_1 BuiltIn SampleMask
|
|
OpDecorate %loc3_1 Location 3
|
|
OpDecorate %loc4_1 Location 4
|
|
OpDecorate %loc5_1 Location 5
|
|
OpMemberDecorate %FragmentOutputs 0 Offset 0
|
|
OpMemberDecorate %FragmentOutputs 1 Offset 4
|
|
OpMemberDecorate %FragmentOutputs 2 Offset 8
|
|
OpMemberDecorate %FragmentOutputs 3 Offset 12
|
|
OpMemberDecorate %FragmentOutputs 4 Offset 16
|
|
OpMemberDecorate %FragmentOutputs 5 Offset 32
|
|
OpMemberDecorate %FragmentOutputs 6 Offset 48
|
|
OpMemberDecorate %FragmentOutputs 7 Offset 56
|
|
%int = OpTypeInt 32 1
|
|
%_ptr_Output_int = OpTypePointer Output %int
|
|
%4 = OpConstantNull %int
|
|
%loc0_1 = OpVariable %_ptr_Output_int Output %4
|
|
%float = OpTypeFloat 32
|
|
%_ptr_Output_float = OpTypePointer Output %float
|
|
%8 = OpConstantNull %float
|
|
%frag_depth_1 = OpVariable %_ptr_Output_float Output %8
|
|
%uint = OpTypeInt 32 0
|
|
%_ptr_Output_uint = OpTypePointer Output %uint
|
|
%12 = OpConstantNull %uint
|
|
%loc1_1 = OpVariable %_ptr_Output_uint Output %12
|
|
%loc2_1 = OpVariable %_ptr_Output_float Output %8
|
|
%uint_1 = OpConstant %uint 1
|
|
%_arr_uint_uint_1 = OpTypeArray %uint %uint_1
|
|
%_ptr_Output__arr_uint_uint_1 = OpTypePointer Output %_arr_uint_uint_1
|
|
%18 = OpConstantNull %_arr_uint_uint_1
|
|
%sample_mask_1 = OpVariable %_ptr_Output__arr_uint_uint_1 Output %18
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%22 = OpConstantNull %v4float
|
|
%loc3_1 = OpVariable %_ptr_Output_v4float Output %22
|
|
%half = OpTypeFloat 16
|
|
%_ptr_Output_half = OpTypePointer Output %half
|
|
%26 = OpConstantNull %half
|
|
%loc4_1 = OpVariable %_ptr_Output_half Output %26
|
|
%v3half = OpTypeVector %half 3
|
|
%_ptr_Output_v3half = OpTypePointer Output %v3half
|
|
%30 = OpConstantNull %v3half
|
|
%loc5_1 = OpVariable %_ptr_Output_v3half Output %30
|
|
%FragmentOutputs = OpTypeStruct %int %float %uint %float %uint %v4float %half %v3half
|
|
%31 = OpTypeFunction %FragmentOutputs
|
|
%int_1 = OpConstant %int 1
|
|
%float_2 = OpConstant %float 2
|
|
%float_1 = OpConstant %float 1
|
|
%uint_2 = OpConstant %uint 2
|
|
%float_3 = OpConstant %float 3
|
|
%float_4 = OpConstant %float 4
|
|
%41 = OpConstantComposite %v4float %float_1 %float_2 %float_3 %float_4
|
|
%half_0x1_2p_1 = OpConstant %half 0x1.2p+1
|
|
%half_0x1_8p_1 = OpConstant %half 0x1.8p+1
|
|
%half_0x1_4p_2 = OpConstant %half 0x1.4p+2
|
|
%half_0x1p_3 = OpConstant %half 0x1p+3
|
|
%46 = OpConstantComposite %v3half %half_0x1_8p_1 %half_0x1_4p_2 %half_0x1p_3
|
|
%47 = OpConstantComposite %FragmentOutputs %int_1 %float_2 %uint_1 %float_1 %uint_2 %41 %half_0x1_2p_1 %46
|
|
%void = OpTypeVoid
|
|
%48 = OpTypeFunction %void
|
|
%main_inner = OpFunction %FragmentOutputs None %31
|
|
%34 = OpLabel
|
|
OpReturnValue %47
|
|
OpFunctionEnd
|
|
%main = OpFunction %void None %48
|
|
%51 = OpLabel
|
|
%52 = OpFunctionCall %FragmentOutputs %main_inner
|
|
%53 = OpCompositeExtract %int %52 0
|
|
OpStore %loc0_1 %53
|
|
%54 = OpCompositeExtract %float %52 1
|
|
OpStore %frag_depth_1 %54
|
|
%55 = OpCompositeExtract %uint %52 2
|
|
OpStore %loc1_1 %55
|
|
%56 = OpCompositeExtract %float %52 3
|
|
OpStore %loc2_1 %56
|
|
%57 = OpAccessChain %_ptr_Output_uint %sample_mask_1 %4
|
|
%58 = OpCompositeExtract %uint %52 4
|
|
OpStore %57 %58
|
|
%59 = OpCompositeExtract %v4float %52 5
|
|
OpStore %loc3_1 %59
|
|
%60 = OpCompositeExtract %half %52 6
|
|
OpStore %loc4_1 %60
|
|
%61 = OpCompositeExtract %v3half %52 7
|
|
OpStore %loc5_1 %61
|
|
OpReturn
|
|
OpFunctionEnd
|