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

Unified Diff: gpu/command_buffer/client/gles2_implementation_impl_autogen.h

Issue 846943002: Improve BindBufferBase/BindBufferRange and a few other commands. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/share_group.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_implementation_impl_autogen.h
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 02551b4b4e6ec9b7cf21c63f14a27302359f3320..23eb9668011fbbadc30d05fe807414659e63e82a 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -41,7 +41,11 @@ void GLES2Implementation::BindBufferBase(GLenum target,
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindBufferBase("
<< GLES2Util::GetStringIndexedBufferTarget(target) << ", "
<< index << ", " << buffer << ")");
- helper_->BindBufferBase(target, index, buffer);
+ if (IsBufferReservedId(buffer)) {
+ SetGLError(GL_INVALID_OPERATION, "BindBufferBase", "buffer reserved id");
+ return;
+ }
+ BindBufferBaseHelper(target, index, buffer);
CheckGLError();
}
@@ -77,7 +81,11 @@ void GLES2Implementation::BindSampler(GLuint unit, GLuint sampler) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindSampler(" << unit << ", "
<< sampler << ")");
- helper_->BindSampler(unit, sampler);
+ if (IsSamplerReservedId(sampler)) {
+ SetGLError(GL_INVALID_OPERATION, "BindSampler", "sampler reserved id");
+ return;
+ }
+ BindSamplerHelper(unit, sampler);
CheckGLError();
}
@@ -100,7 +108,12 @@ void GLES2Implementation::BindTransformFeedback(GLenum target,
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glBindTransformFeedback("
<< GLES2Util::GetStringTransformFeedbackBindTarget(target)
<< ", " << transformfeedback << ")");
- helper_->BindTransformFeedback(target, transformfeedback);
+ if (IsTransformFeedbackReservedId(transformfeedback)) {
+ SetGLError(GL_INVALID_OPERATION, "BindTransformFeedback",
+ "transformfeedback reserved id");
+ return;
+ }
+ BindTransformFeedbackHelper(target, transformfeedback);
CheckGLError();
}
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/share_group.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698