Giovanni Mascellani (@giomasce) commented about libs/vkd3d-shader/hlsl.h:
unsigned int next_index; /* liveness index of the end of the loop */
};
+struct hlsl_ir_switch_case +{
- struct hlsl_src value;
- struct hlsl_block body;
- struct list entry;
+};
+struct hlsl_ir_switch +{
- struct hlsl_ir_node node;
- struct hlsl_src selector;
- struct list cases;
+};
Another alternative would be to have something like that: ```c struct hlsl_ir_switch { struct hlsl_ir_node; struct hlsl_src selector; struct hlsl_block body; } ``` and then have `case` to be another instruction type. Right now I can't see any strong reasons to prefer one over the other, but maybe it wouldn't be bad to give it some thought. Have you already considered if one of those two alternatives would be easier to deal with than the other?