SPIR-V postprocessing: WEB case only needs CFG mods
The SPIR-V post-processing to discover capabilities and extensions does not apply to WebGPU compilation. So don't include that code. This reclaims some of the code space added by #1943
This commit is contained in:
parent
e471df3c91
commit
e43e8ba9f3
2 changed files with 23 additions and 1 deletions
|
|
@ -58,6 +58,7 @@ namespace spv {
|
|||
|
||||
namespace spv {
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// Hook to visit each operand type and result type of an instruction.
|
||||
// Will be called multiple times for one instruction, once for each typed
|
||||
// operand and the result.
|
||||
|
|
@ -319,9 +320,10 @@ void Builder::postProcess(Instruction& inst)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// comment in header
|
||||
void Builder::postProcess()
|
||||
void Builder::postProcessCFG()
|
||||
{
|
||||
// reachableBlocks is the set of blockss reached via control flow, or which are
|
||||
// unreachable continue targert or unreachable merge.
|
||||
|
|
@ -377,7 +379,11 @@ void Builder::postProcess()
|
|||
return unreachableDefinitions.count(decoration_id) != 0;
|
||||
}),
|
||||
decorations.end());
|
||||
}
|
||||
|
||||
#ifndef GLSLANG_WEB
|
||||
// comment in header
|
||||
void Builder::postProcessFeatures() {
|
||||
// Add per-instruction capabilities, extensions, etc.,
|
||||
|
||||
// Look for any 8/16 bit type in physical storage buffer class, and set the
|
||||
|
|
@ -431,5 +437,14 @@ void Builder::postProcess()
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
// comment in header
|
||||
void Builder::postProcess() {
|
||||
postProcessCFG();
|
||||
#ifndef GLSLANG_WEB
|
||||
postProcessFeatures();
|
||||
#endif
|
||||
}
|
||||
|
||||
}; // end spv namespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue