shader_translator: Handle all enum values in switch-cases
This commit is contained in:
@@ -559,6 +559,9 @@ void GlslShaderTranslator::ProcessVertexFetchInstruction(
|
||||
EmitSource(" = vf%u_%d;\n", instr.operands[1].storage_index,
|
||||
instr.attributes.offset);
|
||||
break;
|
||||
default:
|
||||
assert_always();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -676,6 +679,9 @@ void GlslShaderTranslator::ProcessTextureFetchInstruction(
|
||||
EmitUnimplementedTranslationError();
|
||||
EmitSourceDepth("pv = vec4(0.0);\n");
|
||||
break;
|
||||
case FetchOpcode::kVertexFetch:
|
||||
assert_always();
|
||||
break;
|
||||
}
|
||||
|
||||
EmitStoreVectorResult(instr.result);
|
||||
@@ -728,6 +734,10 @@ void GlslShaderTranslator::EmitLoadOperand(size_t i,
|
||||
case InstructionStorageSource::kConstantBool:
|
||||
EmitSource("state.bool_consts");
|
||||
break;
|
||||
case InstructionStorageSource::kTextureFetchConstant:
|
||||
case InstructionStorageSource::kVertexFetchConstant:
|
||||
assert_always();
|
||||
break;
|
||||
}
|
||||
switch (op.storage_addressing_mode) {
|
||||
case InstructionStorageAddressingMode::kStatic:
|
||||
@@ -815,6 +825,8 @@ void GlslShaderTranslator::EmitStoreResult(const InstructionResult& result,
|
||||
case InstructionStorageTarget::kDepth:
|
||||
EmitSourceDepth("gl_FragDepth");
|
||||
break;
|
||||
case InstructionStorageTarget::kNone:
|
||||
break;
|
||||
}
|
||||
if (uses_storage_index) {
|
||||
switch (result.storage_addressing_mode) {
|
||||
|
||||
Reference in New Issue
Block a user