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

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

Issue 213743003: Pass GL context bind_generates_resources flag to GPU Service. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 6 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
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 70c5bc70eb9df268bbec087e3631838066130461..417833241d72e22fa7a42e5a65b79fa6ca890dd2 100644
--- a/gpu/command_buffer/client/gles2_implementation.cc
+++ b/gpu/command_buffer/client/gles2_implementation.cc
@@ -67,8 +67,8 @@ GLES2Implementation::GLStaticState::IntState::IntState()
max_vertex_texture_image_units(0),
max_vertex_uniform_vectors(0),
num_compressed_texture_formats(0),
- num_shader_binary_formats(0) {
-}
+ num_shader_binary_formats(0),
+ bind_generates_resource_chromium(0) {}
GLES2Implementation::SingleThreadChecker::SingleThreadChecker(
GLES2Implementation* gles2_implementation)
@@ -201,6 +201,16 @@ bool GLES2Implementation::Initialize(
reserved_ids_[0],
reserved_ids_[1]));
+ // GL_BIND_GENERATES_RESOURCE_CHROMIUM state must be the same
+ // on Client & Service.
+ if (static_state_.int_state.bind_generates_resource_chromium !=
+ (share_group_->bind_generates_resource() ? 1 : 0)) {
+ SetGLError(GL_INVALID_OPERATION,
+ "Initialize",
+ "Service bind_generates_resource mismatch.");
+ return false;
+ }
+
return true;
}
@@ -219,6 +229,7 @@ bool GLES2Implementation::QueryAndCacheStaticState() {
GL_MAX_VERTEX_UNIFORM_VECTORS,
GL_NUM_COMPRESSED_TEXTURE_FORMATS,
GL_NUM_SHADER_BINARY_FORMATS,
+ GL_BIND_GENERATES_RESOURCE_CHROMIUM,
};
GetMultipleIntegervState integerv_state(
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.h ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698