glslang/Test/baseResults/web.builtins.vert.out
John Kessenich 13761069b5 Web: Add sanity check test suite for smaller-footprint builds.
For the smallest builds, google tests will not be present, in
addition to a large number of tests not being capable of running.
2019-08-20 23:21:55 -06:00

75 lines
3.1 KiB
Plaintext

; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 42
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %_ %ps %gl_VertexIndex %gl_InstanceIndex
OpSource ESSL 310
OpName %main "main"
OpName %gl_PerVertex "gl_PerVertex"
OpMemberName %gl_PerVertex 0 "gl_Position"
OpMemberName %gl_PerVertex 1 "gl_PointSize"
OpName %_ ""
OpName %ps "ps"
OpName %gl_VertexIndex "gl_VertexIndex"
OpName %gl_InstanceIndex "gl_InstanceIndex"
OpMemberDecorate %gl_PerVertex 0 Invariant
OpMemberDecorate %gl_PerVertex 0 BuiltIn Position
OpMemberDecorate %gl_PerVertex 1 BuiltIn PointSize
OpDecorate %gl_PerVertex Block
OpDecorate %ps RelaxedPrecision
OpDecorate %ps Location 0
OpDecorate %15 RelaxedPrecision
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
OpDecorate %30 RelaxedPrecision
OpDecorate %gl_InstanceIndex BuiltIn InstanceIndex
%void = OpTypeVoid
%3 = OpTypeFunction %void
%float = OpTypeFloat 32
%v4float = OpTypeVector %float 4
%gl_PerVertex = OpTypeStruct %v4float %float
%_ptr_Output_gl_PerVertex = OpTypePointer Output %gl_PerVertex
%_ = OpVariable %_ptr_Output_gl_PerVertex Output
%int = OpTypeInt 32 1
%int_0 = OpConstant %int 0
%_ptr_Input_float = OpTypePointer Input %float
%ps = OpVariable %_ptr_Input_float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%int_4 = OpConstant %int 4
%_ptr_Input_int = OpTypePointer Input %int
%gl_VertexIndex = OpVariable %_ptr_Input_int Input
%int_1 = OpConstant %int 1
%_ptr_Output_float = OpTypePointer Output %float
%int_5 = OpConstant %int 5
%gl_InstanceIndex = OpVariable %_ptr_Input_int Input
%main = OpFunction %void None %3
%5 = OpLabel
%15 = OpLoad %float %ps
%16 = OpCompositeConstruct %v4float %15 %15 %15 %15
%18 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %18 %16
%22 = OpLoad %int %gl_VertexIndex
%23 = OpISub %int %int_4 %22
%24 = OpConvertSToF %float %23
%25 = OpAccessChain %_ptr_Output_v4float %_ %int_0
%26 = OpLoad %v4float %25
%27 = OpVectorTimesScalar %v4float %26 %24
%28 = OpAccessChain %_ptr_Output_v4float %_ %int_0
OpStore %28 %27
%30 = OpLoad %float %ps
%32 = OpAccessChain %_ptr_Output_float %_ %int_1
OpStore %32 %30
%35 = OpLoad %int %gl_InstanceIndex
%36 = OpISub %int %int_5 %35
%37 = OpConvertSToF %float %36
%38 = OpAccessChain %_ptr_Output_float %_ %int_1
%39 = OpLoad %float %38
%40 = OpFMul %float %39 %37
%41 = OpAccessChain %_ptr_Output_float %_ %int_1
OpStore %41 %40
OpReturn
OpFunctionEnd