Remapper: handle embedded opcode in OpSpecConstantOp

OpSpecConstantOp contains an embedded opcode which is given as a literal
argument to the OpSpecConstantOp.  The subsequent arguments are as the
embedded op would expect, which may be a mixture of IDs and literals.  This
adds support for that to the remapper binary parser.  Upon seeing such an
embedded op, the parser flips over to parsing the argument list as
appropriate for that opcode.

Fixes #882.
This commit is contained in:
LoopDawg
2017-05-18 16:13:04 -06:00
parent 24e895b4a3
commit 65c2eed65d
3 changed files with 47 additions and 1 deletions

View File

@@ -89,6 +89,7 @@ INSTANTIATE_TEST_CASE_P(
{ "remap.basic.everything.frag", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING },
{ "remap.basic.dcefunc.frag", "main", Source::GLSL, spv::spirvbin_t::DCE_FUNCS },
{ "remap.basic.strip.frag", "main", Source::GLSL, spv::spirvbin_t::STRIP },
{ "remap.specconst.comp", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING },
{ "remap.switch.none.frag", "main", Source::GLSL, spv::spirvbin_t::NONE },
{ "remap.switch.everything.frag", "main", Source::GLSL, spv::spirvbin_t::DO_EVERYTHING },
{ "remap.literal64.none.spv", "main", Source::GLSL, spv::spirvbin_t::NONE },