grovesNL / spirv_cross

Safe Rust wrapper around SPIRV-Cross
Apache License 2.0
86 stars 42 forks source link

stage_inputs format #139

Closed erlendp closed 4 years ago

erlendp commented 4 years ago

Just wondering how to get the stride of a vertex input so I can create my buffer descriptor correctly. Calling get_type(input.type_id) on layout(location = 0) in vec4 a_Pos; appears to return a Float { array: [] }. There doesn't seem to be any way to get the actual vecsize which I was expecting. Am I missing something here?

grovesNL commented 4 years ago

Hi @erlendp! Were you able to figure this out?

erlendp commented 4 years ago

@grovesNL I've put this down for a while, while I work on other projects, but I'm still keen to find a solution!

sir-earl commented 4 years ago

Looks like the required fields hadn't been mapped through yet, so I've added a PR to expose them:

https://github.com/grovesNL/spirv_cross/pull/142

grovesNL commented 4 years ago

Looks like this was fixed by #142, thanks @sir-earl!