mirror of
https://github.com/gfx-rs/wgpu.git
synced 2026-04-22 03:02:01 -04:00
Add a new Naga feature, `"compact"`, which adds a new function `naga::compact::compact`, which removes unused expressions, types, and constants from a `Module`.
94 lines
2.5 KiB
Plaintext
94 lines
2.5 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.1
|
|
; Generator: rspirv
|
|
; Bound: 78
|
|
OpCapability Shader
|
|
%1 = OpExtInstImport "GLSL.std.450"
|
|
OpMemoryModel Logical GLSL450
|
|
OpEntryPoint GLCompute %73 "main"
|
|
OpExecutionMode %73 LocalSize 1 1 1
|
|
%2 = OpTypeVoid
|
|
%4 = OpTypeFloat 32
|
|
%3 = OpTypeVector %4 2
|
|
%5 = OpTypeInt 32 1
|
|
%8 = OpTypeFunction %3
|
|
%9 = OpConstant %4 2.0
|
|
%10 = OpConstant %4 0.5
|
|
%18 = OpTypeFunction %5
|
|
%19 = OpConstant %5 1
|
|
%20 = OpTypeInt 32 0
|
|
%21 = OpConstant %20 1
|
|
%22 = OpConstant %5 4
|
|
%23 = OpConstant %5 2
|
|
%25 = OpTypeVector %5 2
|
|
%29 = OpConstantNull %5
|
|
%37 = OpTypeVector %20 3
|
|
%41 = OpConstantNull %20
|
|
%53 = OpTypeVector %5 4
|
|
%74 = OpTypeFunction %2
|
|
%7 = OpFunction %3 None %8
|
|
%6 = OpLabel
|
|
OpBranch %11
|
|
%11 = OpLabel
|
|
%12 = OpCompositeConstruct %3 %9 %9
|
|
%13 = OpCompositeConstruct %3 %10 %10
|
|
%14 = OpCompositeConstruct %3 %10 %10
|
|
%15 = OpExtInst %3 %1 Fma %12 %13 %14
|
|
OpReturnValue %15
|
|
OpFunctionEnd
|
|
%17 = OpFunction %5 None %18
|
|
%16 = OpLabel
|
|
OpBranch %24
|
|
%24 = OpLabel
|
|
%26 = OpCompositeConstruct %25 %19 %19
|
|
%27 = OpCompositeConstruct %25 %19 %19
|
|
%30 = OpCompositeExtract %5 %26 0
|
|
%31 = OpCompositeExtract %5 %27 0
|
|
%32 = OpIMul %5 %30 %31
|
|
%33 = OpIAdd %5 %29 %32
|
|
%34 = OpCompositeExtract %5 %26 1
|
|
%35 = OpCompositeExtract %5 %27 1
|
|
%36 = OpIMul %5 %34 %35
|
|
%28 = OpIAdd %5 %33 %36
|
|
%38 = OpCompositeConstruct %37 %21 %21 %21
|
|
%39 = OpCompositeConstruct %37 %21 %21 %21
|
|
%42 = OpCompositeExtract %20 %38 0
|
|
%43 = OpCompositeExtract %20 %39 0
|
|
%44 = OpIMul %20 %42 %43
|
|
%45 = OpIAdd %20 %41 %44
|
|
%46 = OpCompositeExtract %20 %38 1
|
|
%47 = OpCompositeExtract %20 %39 1
|
|
%48 = OpIMul %20 %46 %47
|
|
%49 = OpIAdd %20 %45 %48
|
|
%50 = OpCompositeExtract %20 %38 2
|
|
%51 = OpCompositeExtract %20 %39 2
|
|
%52 = OpIMul %20 %50 %51
|
|
%40 = OpIAdd %20 %49 %52
|
|
%54 = OpCompositeConstruct %53 %22 %22 %22 %22
|
|
%55 = OpCompositeConstruct %53 %23 %23 %23 %23
|
|
%57 = OpCompositeExtract %5 %54 0
|
|
%58 = OpCompositeExtract %5 %55 0
|
|
%59 = OpIMul %5 %57 %58
|
|
%60 = OpIAdd %5 %29 %59
|
|
%61 = OpCompositeExtract %5 %54 1
|
|
%62 = OpCompositeExtract %5 %55 1
|
|
%63 = OpIMul %5 %61 %62
|
|
%64 = OpIAdd %5 %60 %63
|
|
%65 = OpCompositeExtract %5 %54 2
|
|
%66 = OpCompositeExtract %5 %55 2
|
|
%67 = OpIMul %5 %65 %66
|
|
%68 = OpIAdd %5 %64 %67
|
|
%69 = OpCompositeExtract %5 %54 3
|
|
%70 = OpCompositeExtract %5 %55 3
|
|
%71 = OpIMul %5 %69 %70
|
|
%56 = OpIAdd %5 %68 %71
|
|
OpReturnValue %56
|
|
OpFunctionEnd
|
|
%73 = OpFunction %2 None %74
|
|
%72 = OpLabel
|
|
OpBranch %75
|
|
%75 = OpLabel
|
|
%76 = OpFunctionCall %3 %7
|
|
%77 = OpFunctionCall %5 %17
|
|
OpReturn
|
|
OpFunctionEnd |