mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 06:45:23 +00:00
Remove fallback value in execution mode
This commit is contained in:
parent
b909682401
commit
52f57c2e97
@ -89,26 +89,26 @@ pub fn write_entry_point(doc: &parse::Spirv, instruction: &parse::Instruction) -
|
|||||||
},
|
},
|
||||||
|
|
||||||
enums::ExecutionModel::ExecutionModelGeometry => {
|
enums::ExecutionModel::ExecutionModelGeometry => {
|
||||||
let mut execution_mode = "Points"; // fallback value
|
let mut execution_mode = None;
|
||||||
|
|
||||||
for instruction in doc.instructions.iter() {
|
for instruction in doc.instructions.iter() {
|
||||||
if let &parse::Instruction::ExecutionMode { target_id, ref mode, .. } = instruction {
|
if let &parse::Instruction::ExecutionMode { target_id, ref mode, .. } = instruction {
|
||||||
if target_id != id {
|
if target_id != id {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
execution_mode = match mode {
|
execution_mode = match mode {
|
||||||
&enums::ExecutionMode::ExecutionModeInputPoints => "Points",
|
&enums::ExecutionMode::ExecutionModeInputPoints => Some("Points"),
|
||||||
&enums::ExecutionMode::ExecutionModeInputLines => "Lines",
|
&enums::ExecutionMode::ExecutionModeInputLines => Some("Lines"),
|
||||||
&enums::ExecutionMode::ExecutionModeInputLinesAdjacency => "LinesWithAdjacency",
|
&enums::ExecutionMode::ExecutionModeInputLinesAdjacency => Some("LinesWithAdjacency"),
|
||||||
&enums::ExecutionMode::ExecutionModeTriangles => "Triangles",
|
&enums::ExecutionMode::ExecutionModeTriangles => Some("Triangles"),
|
||||||
&enums::ExecutionMode::ExecutionModeInputTrianglesAdjacency => "TrianglesWithAdjacency",
|
&enums::ExecutionMode::ExecutionModeInputTrianglesAdjacency => Some("TrianglesWithAdjacency"),
|
||||||
_ => continue,
|
_ => continue,
|
||||||
};
|
};
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
let execution_mode = format!("::vulkano::pipeline::shader::GeometryShaderExecutionMode::{0}", execution_mode);
|
let execution_mode = format!("::vulkano::pipeline::shader::GeometryShaderExecutionMode::{0}", execution_mode.unwrap());
|
||||||
|
|
||||||
let t = format!("::vulkano::pipeline::shader::GeometryShaderEntryPoint<(), {0}Input, \
|
let t = format!("::vulkano::pipeline::shader::GeometryShaderEntryPoint<(), {0}Input, \
|
||||||
{0}Output, Layout>",
|
{0}Output, Layout>",
|
||||||
|
Loading…
Reference in New Issue
Block a user