vulkano-rs/vulkano

Impossible uniform struct.

Closed this issue · 5 comments

  • Version of vulkano: 0.34.0
  • OS: Windows 10
  • GPU (the selected PhysicalDevice): NVIDIA GeForce GTX 750 Ti

I can create structs that are impossible to construct. As in, when I define a uniform struct in a vertex shader, sometimes it doesn't update properly. It will tell you upon constructing the struct that you are missing some field, but upon adding that field, it will tell you that no such field exists. I cannot tell you how to recreate this bug, because I have not managed to find a consistent way to recreate this bug. This is inconsistent and confusing, but it happens extremely often. The only way to fix it, is to rename the uniform or rename the fields in the uniform, but even this is inconsistent.
image
image
image
image

Can you reproduce this using cargo build? If not, it's most certainly a rust-analyzer issue. Wouldn't be the first time it trips up on macros.

Ah thanks, yep using cargo build and cargo run it works just fine! Thanks!

I suggest upgrading or downgrading your toolchain to a rust-analyzer that works, and make absolutely sure you installed rust-analyzer through rustup.

(That is, in particular, not having the vscode extension so "helpfully" install it's own version of rust-analyzer, which is not in sync with your toolchain.)

oh fascinating, thanks for the info!