shader_translator: Handle all enum values in switch-cases

This commit is contained in:
sephiroth99
2015-12-30 15:51:32 -05:00
parent ee8e6e8822
commit 962d8215da
3 changed files with 31 additions and 1 deletions

View File

@@ -159,7 +159,7 @@ void ShaderTranslator::GatherBindingInformation(
case ControlFlowOpcode::kCondExecPred:
case ControlFlowOpcode::kCondExecPredEnd:
case ControlFlowOpcode::kCondExecPredClean:
case ControlFlowOpcode::kCondExecPredCleanEnd:
case ControlFlowOpcode::kCondExecPredCleanEnd: {
uint32_t sequence = cf.exec.sequence();
for (uint32_t instr_offset = cf.exec.address();
instr_offset < cf.exec.address() + cf.exec.count();
@@ -195,6 +195,8 @@ void ShaderTranslator::GatherBindingInformation(
}
}
}
} break;
default:
break;
}
}
@@ -248,6 +250,9 @@ void ShaderTranslator::GatherTextureBindingInformation(
case FetchOpcode::kSetTextureGradientsVert:
// Doesn't use bindings.
return;
default:
// Continue.
break;
}
Shader::TextureBinding binding;
binding.binding_index = texture_bindings_.size();
@@ -271,6 +276,9 @@ void AddControlFlowTargetLabel(const ControlFlowInstruction& cf,
case ControlFlowOpcode::kCondJmp:
label_addresses->insert(cf.cond_jmp.address());
break;
default:
// Ignored.
break;
}
}
@@ -435,6 +443,8 @@ void ShaderTranslator::TranslateControlFlowCondExec(
i.opcode_name = "cexece";
i.is_end = true;
break;
default:
break;
}
i.instruction_address = cf.address();
i.instruction_count = cf.count();
@@ -446,6 +456,8 @@ void ShaderTranslator::TranslateControlFlowCondExec(
case ControlFlowOpcode::kCondExecEnd:
i.clean = false;
break;
default:
break;
}
i.is_yield = cf.is_yield();
i.sequence = cf.sequence();