Skip to content

Commit

Permalink
A change
Browse files Browse the repository at this point in the history
Signed-off-by: Hal Gentz <[email protected]>
  • Loading branch information
goddessfreya committed May 29, 2018
1 parent dd88cf1 commit a777681
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/backend/gl/src/device.rs
Original file line number Diff line number Diff line change
Expand Up @@ -360,11 +360,13 @@ impl Device {
_ => panic!("Unhandled")
};

for (name, (btype, set, binding)) in desc_remap_data.get_names_and_data() {
let gl = &self.share.context;
unsafe {
let index = gl.GetUniformBlockIndex(program, name.as_ptr() as _);
gl.UniformBlockBinding(program, index, *desc_remap_data.get_binding(*btype, *set, *binding).unwrap())
if self.share.legacy_features.contains(LegacyFeatures::NO_EXPLICIT_LAYOUTS_IN_SHADER) {
for (name, (btype, set, binding)) in desc_remap_data.get_names_and_data() {
let gl = &self.share.context;
unsafe {
let index = gl.GetUniformBlockIndex(program, name.as_ptr() as _);
gl.UniformBlockBinding(program, index, *desc_remap_data.get_binding(*btype, *set, *binding).unwrap())
}
}
}

Expand Down

0 comments on commit a777681

Please sign in to comment.