mirror of
https://github.com/vulkano-rs/vulkano.git
synced 2024-11-22 14:56:42 +00:00
Add input attribute types to vertex shader type
This commit is contained in:
parent
ccd0c0f023
commit
b6a3b3c598
@ -113,7 +113,26 @@ fn write_entry_point(doc: &parse::Spirv, instruction: &parse::Instruction) -> St
|
|||||||
|
|
||||||
let ty = match *execution {
|
let ty = match *execution {
|
||||||
enums::ExecutionModel::ExecutionModelVertex => {
|
enums::ExecutionModel::ExecutionModelVertex => {
|
||||||
format!("::vulkano::shader::VertexShaderEntryPoint")
|
let mut input_types = Vec::new();
|
||||||
|
|
||||||
|
// TODO: sort types by location
|
||||||
|
|
||||||
|
for interface in interface.iter() {
|
||||||
|
for i in doc.instructions.iter() {
|
||||||
|
match i {
|
||||||
|
&parse::Instruction::Variable { result_type_id, result_id,
|
||||||
|
storage_class: enums::StorageClass::StorageClassInput, .. }
|
||||||
|
if &result_id == interface =>
|
||||||
|
{
|
||||||
|
input_types.push(type_from_id(doc, result_type_id));
|
||||||
|
},
|
||||||
|
_ => ()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
format!("::vulkano::shader::VertexShaderEntryPoint<({input})>",
|
||||||
|
input = input_types.join(", ") + ",")
|
||||||
},
|
},
|
||||||
|
|
||||||
enums::ExecutionModel::ExecutionModelTessellationControl => {
|
enums::ExecutionModel::ExecutionModelTessellationControl => {
|
||||||
|
Loading…
Reference in New Issue
Block a user