Chromium Code Reviews

Unified Diff: command_buffer/service/win/d3d9/geometry_d3d9.cc

Issue 200127: Made gyp file for command buffer libraries.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: '' Created 11 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
« no previous file with comments | « command_buffer/service/cross/texture_utils.h ('k') | command_buffer/service/win/d3d9/sampler_d3d9.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: command_buffer/service/win/d3d9/geometry_d3d9.cc
===================================================================
--- command_buffer/service/win/d3d9/geometry_d3d9.cc (revision 25949)
+++ command_buffer/service/win/d3d9/geometry_d3d9.cc (working copy)
@@ -206,7 +206,15 @@
}
HR(d3d_device->SetStreamSource(i, vertex_buffer->d3d_vertex_buffer(), 0,
pair.second));
- max_vertices = std::min(max_vertices, vertex_buffer->size()/pair.second);
+
+ // TODO(apatrick): A zero size stride is valid. It means the first element
+ // in the vertex buffer will be used for every vertex. There doesn't seem
+ // to be enough information here to determine whether a zero stride
+ // vertex buffer is big enough to contain a single element.
+ if (pair.second != 0) {
+ max_vertices = std::min(max_vertices,
+ vertex_buffer->size() / pair.second);
+ }
}
return max_vertices;
}
« no previous file with comments | « command_buffer/service/cross/texture_utils.h ('k') | command_buffer/service/win/d3d9/sampler_d3d9.cc » ('j') | no next file with comments »

Powered by Google App Engine