mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-11-25 13:00:04 +00:00
Add tests for recently added command line option (#3297)
We have not added tests for the new command line options recently. I've updated the test and fixed on option that was incorrect. Fixes #3247
This commit is contained in:
parent
ca5751590e
commit
4956644894
@ -498,7 +498,7 @@ bool Optimizer::RegisterPassFromFlag(const std::string& flag) {
|
|||||||
} else if (pass_name == "legalize-vector-shuffle") {
|
} else if (pass_name == "legalize-vector-shuffle") {
|
||||||
RegisterPass(CreateLegalizeVectorShufflePass());
|
RegisterPass(CreateLegalizeVectorShufflePass());
|
||||||
} else if (pass_name == "split-invalid-unreachable") {
|
} else if (pass_name == "split-invalid-unreachable") {
|
||||||
RegisterPass(CreateLegalizeVectorShufflePass());
|
RegisterPass(CreateSplitInvalidUnreachablePass());
|
||||||
} else if (pass_name == "decompose-initialized-variables") {
|
} else if (pass_name == "decompose-initialized-variables") {
|
||||||
RegisterPass(CreateDecomposeInitializedVariablesPass());
|
RegisterPass(CreateDecomposeInitializedVariablesPass());
|
||||||
} else if (pass_name == "graphics-robust-access") {
|
} else if (pass_name == "graphics-robust-access") {
|
||||||
|
@ -73,7 +73,10 @@ class TestValidPassFlags(expect.ValidObjectFile1_5,
|
|||||||
'--remove-duplicates', '--replace-invalid-opcode', '--ssa-rewrite',
|
'--remove-duplicates', '--replace-invalid-opcode', '--ssa-rewrite',
|
||||||
'--scalar-replacement', '--scalar-replacement=42', '--strength-reduction',
|
'--scalar-replacement', '--scalar-replacement=42', '--strength-reduction',
|
||||||
'--strip-debug', '--strip-reflect', '--vector-dce', '--workaround-1209',
|
'--strip-debug', '--strip-reflect', '--vector-dce', '--workaround-1209',
|
||||||
'--unify-const'
|
'--unify-const', '--legalize-vector-shuffle',
|
||||||
|
'--split-invalid-unreachable', '--generate-webgpu-initializers',
|
||||||
|
'--decompose-initialized-variables', '--graphics-robust-access',
|
||||||
|
'--wrap-opkill', '--amd-ext-to-khr'
|
||||||
]
|
]
|
||||||
expected_passes = [
|
expected_passes = [
|
||||||
'wrap-opkill',
|
'wrap-opkill',
|
||||||
@ -120,7 +123,14 @@ class TestValidPassFlags(expect.ValidObjectFile1_5,
|
|||||||
'strip-reflect',
|
'strip-reflect',
|
||||||
'vector-dce',
|
'vector-dce',
|
||||||
'workaround-1209',
|
'workaround-1209',
|
||||||
'unify-const'
|
'unify-const',
|
||||||
|
'legalize-vector-shuffle',
|
||||||
|
'split-invalid-unreachable',
|
||||||
|
'generate-webgpu-initializers',
|
||||||
|
'decompose-initialized-variables',
|
||||||
|
'graphics-robust-access',
|
||||||
|
'wrap-opkill',
|
||||||
|
'amd-ext-to-khr'
|
||||||
]
|
]
|
||||||
shader = placeholder.FileSPIRVShader(empty_main_assembly(), '.spvasm')
|
shader = placeholder.FileSPIRVShader(empty_main_assembly(), '.spvasm')
|
||||||
output = placeholder.TempFileName('output.spv')
|
output = placeholder.TempFileName('output.spv')
|
||||||
|
Loading…
Reference in New Issue
Block a user