Web: Remove unused stage functionality, SPIR-V logger, and hex_utils

Saves another 20K.
This commit is contained in:
John Kessenich
2019-08-08 23:29:20 -06:00
parent 39697cdb9d
commit 155d351f86
20 changed files with 450 additions and 390 deletions

View File

@@ -1 +1 @@
812032 ../build/install/bin/glslangValidator.exe
601088 ../build/install/bin/glslangValidator.exe

View File

@@ -15,12 +15,12 @@ spv.hlslDebugInfo.vert
// OpModuleProcessed shift-UBO-binding 6
// OpModuleProcessed shift-ssbo-binding 3
// OpModuleProcessed shift-uav-binding 5
// OpModuleProcessed flatten-uniform-arrays
// OpModuleProcessed no-storage-format
// OpModuleProcessed resource-set-binding t0 0 0
// OpModuleProcessed hlsl-iomap
// OpModuleProcessed auto-map-bindings
// OpModuleProcessed auto-map-locations
// OpModuleProcessed flatten-uniform-arrays
// OpModuleProcessed hlsl-iomap
// OpModuleProcessed client vulkan100
// OpModuleProcessed target-env vulkan1.0
// OpModuleProcessed source-entrypoint origMain

View File

@@ -1,74 +1,62 @@
; SPIR-V
; Version: 1.0
; Generator: Khronos Glslang Reference Front End; 7
; Bound: 42
; Bound: 33
; Schema: 0
OpCapability Shader
%1 = OpExtInstImport "GLSL.std.450"
OpMemoryModel Logical GLSL450
OpEntryPoint Vertex %main "main" %_ %ps %gl_VertexIndex %gl_InstanceIndex
OpEntryPoint Vertex %main "main" %gl_Position %ps %gl_VertexIndex %gl_PointSize %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 %gl_Position "gl_Position"
OpName %ps "ps"
OpName %gl_VertexIndex "gl_VertexIndex"
OpName %gl_PointSize "gl_PointSize"
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 %gl_Position Invariant
OpDecorate %gl_Position BuiltIn Position
OpDecorate %ps RelaxedPrecision
OpDecorate %ps Location 0
OpDecorate %15 RelaxedPrecision
OpDecorate %12 RelaxedPrecision
OpDecorate %gl_VertexIndex BuiltIn VertexIndex
OpDecorate %30 RelaxedPrecision
OpDecorate %gl_PointSize BuiltIn PointSize
OpDecorate %25 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_Output_v4float = OpTypePointer Output %v4float
%gl_Position = OpVariable %_ptr_Output_v4float Output
%_ptr_Input_float = OpTypePointer Input %float
%ps = OpVariable %_ptr_Input_float Input
%_ptr_Output_v4float = OpTypePointer Output %v4float
%int = OpTypeInt 32 1
%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
%gl_PointSize = OpVariable %_ptr_Output_float Output
%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
%12 = OpLoad %float %ps
%13 = OpCompositeConstruct %v4float %12 %12 %12 %12
OpStore %gl_Position %13
%18 = OpLoad %int %gl_VertexIndex
%19 = OpISub %int %int_4 %18
%20 = OpConvertSToF %float %19
%21 = OpLoad %v4float %gl_Position
%22 = OpVectorTimesScalar %v4float %21 %20
OpStore %gl_Position %22
%25 = OpLoad %float %ps
OpStore %gl_PointSize %25
%28 = OpLoad %int %gl_InstanceIndex
%29 = OpISub %int %int_5 %28
%30 = OpConvertSToF %float %29
%31 = OpLoad %float %gl_PointSize
%32 = OpFMul %float %31 %30
OpStore %gl_PointSize %32
OpReturn
OpFunctionEnd