Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(302)

Unified Diff: gpu/command_buffer/client/gles2_implementation.cc

Issue 1752703003: Fix transform feedback bugs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix error msg Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation.cc
diff --git a/gpu/command_buffer/client/gles2_implementation.cc b/gpu/command_buffer/client/gles2_implementation.cc
index fc051b1fad3bfa6b1a9d2c61c2999cde84f192ee..5ba643154d3bbb551d948630976a78b69d5b7e4d 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -3820,6 +3820,34 @@ void GLES2Implementation::BindBufferBaseHelper(
GLenum target, GLuint index, GLuint buffer_id) {
// TODO(zmo): See note #1 above.
// TODO(zmo): See note #2 above.
+ switch (target) {
+ case GL_TRANSFORM_FEEDBACK_BUFFER:
+ if (index >=
+ static_cast<GLuint>(
+ capabilities_.max_transform_feedback_separate_attribs)) {
+ SetGLError(GL_INVALID_VALUE,
+ "glBindBufferBase", "index out of range");
+ return;
+ }
+ if (bound_transform_feedback_buffer_ != buffer_id) {
+ bound_transform_feedback_buffer_ = buffer_id;
+ }
+ break;
+ case GL_UNIFORM_BUFFER:
+ if (index >=
+ static_cast<GLuint>(capabilities_.max_uniform_buffer_bindings)) {
+ SetGLError(GL_INVALID_VALUE,
+ "glBindBufferBase", "index out of range");
+ return;
+ }
+ if (bound_uniform_buffer_ != buffer_id) {
+ bound_uniform_buffer_ = buffer_id;
+ }
+ break;
+ default:
+ SetGLError(GL_INVALID_ENUM, "glBindBufferBase", "invalid target");
+ return;
+ }
GetIdHandler(id_namespaces::kBuffers)->MarkAsUsedForBind(
this, target, index, buffer_id, &GLES2Implementation::BindBufferBaseStub);
}
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698