Pass GL context bind_generates_resources flag to GPU Service.
GPU Client has been respecting the bind_generates_resources attrib,
however the GPU Service has been forcing it to always 'true'. This
means glBind semantic validation has been incorrect when
bind_generates_resources is 'false' on the Client.
This patch passes the bind_generates_resources attrib for
WebGraphicsContext3DCommandBufferImpl, and checks that all contexts
in the same ContextGroup use the same setting.
BUG=333063, 244968
Review URL: https://codereview.chromium.org/213743003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@261563 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index 64ff616..c70a999 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -4555,6 +4555,12 @@
params[0] = unpack_unpremultiply_alpha_;
}
return true;
+ case GL_BIND_GENERATES_RESOURCE_CHROMIUM:
+ *num_written = 1;
+ if (params) {
+ params[0] = group_->bind_generates_resource() ? 1 : 0;
+ }
+ return true;
default:
if (pname >= GL_DRAW_BUFFER0_ARB &&
pname < GL_DRAW_BUFFER0_ARB + group_->max_draw_buffers()) {