gfx-rs / gfx

[maintenance mode] A low-overhead Vulkan-like GPU API for Rust.
http://gfx-rs.github.io/
Apache License 2.0
5.36k stars 547 forks source link

Cannot construct a pipeline on Windows #1280

Closed icefoxen closed 7 years ago

icefoxen commented 7 years ago

When attempting to run ggez on Windows using the OpenGL backend, I get the following error when trying to construct a pipeline:

DescriptorInit(ConstantBuffer("RectProperties", Some(Offset { name: "u_Scale", shader_offset: 32, code_offset: 24} ) )

More specifically, code building the pipeline is https://github.com/ggez/ggez/blob/master/src/graphics/mod.rs as of commit 0f076c774c8be83311af406ee07d37a4761ad7e1 , and the shaders are here: https://github.com/ggez/ggez/tree/master/src/graphics/shader

I will work to make a minimal reproduction when I get a chance.

icefoxen commented 7 years ago

Oops, fixed by changing uniform RectProperties { ... } to layout (std140) uniform RectProperties { ... }.

Never even knew that was a thing.