mirror of
https://gitee.com/openharmony/third_party_spirv-tools
synced 2024-11-23 07:20:28 +00:00
605c2e3c0e
This CL adds a simple JavaScript library which will assemble SPIR-V Assembly compatable with WebGPU.
31 lines
1.1 KiB
Plaintext
31 lines
1.1 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.0
|
|
; Generator: Khronos Glslang Reference Front End; 7
|
|
; Bound: 14
|
|
; Schema: 0
|
|
OpCapability Shader
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint Fragment %main "main" %gl_FragColor
|
|
OpExecutionMode %main OriginUpperLeft
|
|
OpSource GLSL 330
|
|
OpName %main "main"
|
|
OpName %gl_FragColor "gl_FragColor"
|
|
OpDecorate %gl_FragColor Location 0
|
|
%void = OpTypeVoid
|
|
%3 = OpTypeFunction %void
|
|
%float = OpTypeFloat 32
|
|
%v4float = OpTypeVector %float 4
|
|
%_ptr_Output_v4float = OpTypePointer Output %v4float
|
|
%gl_FragColor = OpVariable %_ptr_Output_v4float Output
|
|
%float_0_400000006 = OpConstant %float 0.400000006
|
|
%float_0_800000012 = OpConstant %float 0.800000012
|
|
%float_1 = OpConstant %float 1
|
|
%13 = OpConstantComposite %v4float %float_0_400000006 %float_0_400000006 %float_0_800000012 %float_1
|
|
%main = OpFunction %void None %3
|
|
%5 = OpLabel
|
|
OpStore %gl_FragColor %13
|
|
OpReturn
|
|
OpFunctionEnd
|
|
|