spirv: Restructure the case loop in OpSwitch handling
authorJason Ekstrand <jason.ekstrand@intel.com>
Wed, 6 Dec 2017 18:09:28 +0000 (10:09 -0800)
committerJason Ekstrand <jason.ekstrand@intel.com>
Tue, 12 Dec 2017 06:28:34 +0000 (22:28 -0800)
commit58cabae8cc8e848cfe39c7a63973c12c92a4ee96
treecd5eb6fa30629f78eb440f30b7885f1bc1323acb
parent5f572ccc95bdfa1445b67511c6d2c9b23bc22208
spirv: Restructure the case loop in OpSwitch handling

Instead of calling vtn_add_case for the default case and then looping,
add an is_default variable and do everything inside the loop.  This will
make the next commit easier.

Reviewed-by: Samuel Iglesias Gonsálvez <siglesias@igalia.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/spirv/vtn_cfg.c