зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1530576 - WR track vao bindings better r=gw
this change makes sure that bindings are always synced. Differential Revision: https://phabricator.services.mozilla.com/D21159 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
66bda67c38
Коммит
4d33ea2da4
|
@ -2345,18 +2345,14 @@ impl Device {
|
|||
ibo_id: IBOId,
|
||||
owns_vertices_and_indices: bool,
|
||||
) -> VAO {
|
||||
debug_assert!(self.inside_frame);
|
||||
|
||||
let instance_stride = descriptor.instance_stride() as usize;
|
||||
let vao_id = self.gl.gen_vertex_arrays(1)[0];
|
||||
|
||||
self.gl.bind_vertex_array(vao_id);
|
||||
self.bind_vao_impl(vao_id);
|
||||
|
||||
descriptor.bind(self.gl(), main_vbo_id, instance_vbo_id);
|
||||
ibo_id.bind(self.gl()); // force it to be a part of VAO
|
||||
|
||||
self.gl.bind_vertex_array(0);
|
||||
|
||||
VAO {
|
||||
id: vao_id,
|
||||
ibo_id,
|
||||
|
@ -2374,7 +2370,7 @@ impl Device {
|
|||
debug_assert!(self.inside_frame);
|
||||
|
||||
let vao_id = self.gl.gen_vertex_arrays(1)[0];
|
||||
self.gl.bind_vertex_array(vao_id);
|
||||
self.bind_vao_impl(vao_id);
|
||||
|
||||
let mut attrib_index = 0;
|
||||
for stream in streams {
|
||||
|
@ -2388,8 +2384,6 @@ impl Device {
|
|||
attrib_index += stream.attributes.len();
|
||||
}
|
||||
|
||||
self.gl.bind_vertex_array(0);
|
||||
|
||||
CustomVAO {
|
||||
id: vao_id,
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче