summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
diff options
context:
space:
mode:
authorheejin.r.chung@samsung.com <heejin.r.chung@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 08:26:01 +0000
committerheejin.r.chung@samsung.com <heejin.r.chung@samsung.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-07-10 08:26:01 +0000
commit254a472207b88d8b929fde1b4d72b34893fd3f7d (patch)
tree1ec4e1d72718ef0f31c2869c176658b6514f8dc2 /gpu/command_buffer/build_gles2_cmd_buffer.py
parent81f8069057ccc43510791292206d9f711bd2ff79 (diff)
downloadchromium_src-254a472207b88d8b929fde1b4d72b34893fd3f7d.zip
chromium_src-254a472207b88d8b929fde1b4d72b34893fd3f7d.tar.gz
chromium_src-254a472207b88d8b929fde1b4d72b34893fd3f7d.tar.bz2
Query objects should not be shared between contexts
glQuery objects are not sharable, so managing IDs for each client locally in GLES2Implementation. BUG= Review URL: https://codereview.chromium.org/371363002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@282292 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/build_gles2_cmd_buffer.py')
-rwxr-xr-xgpu/command_buffer/build_gles2_cmd_buffer.py19
1 files changed, 16 insertions, 3 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index 1c7b019..a9e13bc 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -1283,6 +1283,7 @@ _PEPPER_INTERFACES = [
# extension_flag: Function is an extension and should be enabled only when
# the corresponding feature info flag is enabled. Implies
# 'extension': True.
+# not_shared: For GENn types, True if objects can't be shared between contexts
_FUNCTION_INFO = {
'ActiveTexture': {
@@ -2353,6 +2354,7 @@ _FUNCTION_INFO = {
'resource_types': 'Queries',
'unit_test': False,
'pepper_interface': 'Query',
+ 'not_shared': 'True',
},
'DeleteQueriesEXT': {
'type': 'DELn',
@@ -4048,9 +4050,20 @@ class GENnHandler(TypeHandler):
self.WriteClientGLCallLog(func, file)
for arg in func.GetOriginalArgs():
arg.WriteClientSideValidationCode(file, func)
- code = """ GPU_CLIENT_SINGLE_THREAD_CHECK();
- GetIdHandler(id_namespaces::k%(resource_types)s)->
- MakeIds(this, 0, %(args)s);
+ not_shared = func.GetInfo('not_shared')
+ if not_shared:
+ alloc_code = (
+""" IdAllocatorInterface* id_allocator = GetIdAllocator(id_namespaces::k%s);
+ for (GLsizei ii = 0; ii < n; ++ii)
+ %s[ii] = id_allocator->AllocateID();""" %
+ (func.GetInfo('resource_types'), func.GetOriginalArgs()[1].name))
+ else:
+ alloc_code = (""" GetIdHandler(id_namespaces::k%(resource_types)s)->
+ MakeIds(this, 0, %(args)s);""" % args)
+ args['alloc_code'] = alloc_code
+
+ code = """ GPU_CLIENT_SINGLE_THREAD_CHECK();
+%(alloc_code)s
%(name)sHelper(%(args)s);
helper_->%(name)sImmediate(%(args)s);
if (share_group_->bind_generates_resource())