SPIR-V: Hack in OpSelectionMerge as hints to NVidia's shader compiler (TODO: Make a Shader Compiler)

This commit is contained in:
Dr. Chat
2016-04-13 23:17:03 -05:00
parent 2bd603bf18
commit 9b2e2a7275
4 changed files with 88 additions and 42 deletions

View File

@@ -369,9 +369,9 @@ bool ShaderTranslator::TranslateBlocks() {
AddControlFlowTargetLabel(cf_a, &label_addresses);
AddControlFlowTargetLabel(cf_b, &label_addresses);
PreProcessControlFlowInstruction(cf_index);
PreProcessControlFlowInstruction(cf_index, cf_a);
++cf_index;
PreProcessControlFlowInstruction(cf_index);
PreProcessControlFlowInstruction(cf_index, cf_b);
++cf_index;
}