summaryrefslogtreecommitdiffstats
path: root/gpu/command_buffer/build_gles2_cmd_buffer.py
diff options
context:
space:
mode:
authorjadahl@opera.com <jadahl@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 09:07:02 +0000
committerjadahl@opera.com <jadahl@opera.com@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-31 09:07:02 +0000
commite3c4a9abad01205eed3e7556158dc05800051f7b (patch)
tree20dcee8098386d67ed3d9322f230b08e74b451fb /gpu/command_buffer/build_gles2_cmd_buffer.py
parent15770a4144bf8def5cd689351db58a842f2535a1 (diff)
downloadchromium_src-e3c4a9abad01205eed3e7556158dc05800051f7b.zip
chromium_src-e3c4a9abad01205eed3e7556158dc05800051f7b.tar.gz
chromium_src-e3c4a9abad01205eed3e7556158dc05800051f7b.tar.bz2
gpu: Reuse transfer buffers more aggresively
By keeping track of transfer buffer usage (both sync and async), it is possible to reuse an existing transfer buffer earlier than it is today. For synchronous uploads, this is done by inserting tokens marking a buffer's last usage. If such a token has passed, the buffer can be reused. For asynchronous uploads, this is done by adding an internal async upload token to the GLES2Implementation and GLES2CmdDecoderImpl that enumerates all asynchronous uploads. When an upload is completed, the token is synchronized with the client which then can free the memory associated with the async token. The fenced allocator and mapped memory manager gets a callback that is used to allow fenced allocator to make the user, in this case GLES2Implementation, poll the current async upload token and free any associated memory. BUG=328808 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=260177 Review URL: https://codereview.chromium.org/116863003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260507 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.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py
index da0aa28..e635ae5 100755
--- a/gpu/command_buffer/build_gles2_cmd_buffer.py
+++ b/gpu/command_buffer/build_gles2_cmd_buffer.py
@@ -2462,6 +2462,14 @@ _FUNCTION_INFO = {
'type': 'Manual',
'immediate': False,
'client_test': False,
+ 'cmd_args': 'GLenumTextureTarget target, GLint level, '
+ 'GLintTextureInternalFormat internalformat, '
+ 'GLsizei width, GLsizei height, '
+ 'GLintTextureBorder border, '
+ 'GLenumTextureFormat format, GLenumPixelType type, '
+ 'const void* pixels, '
+ 'uint32 async_upload_token, '
+ 'void* sync_data',
'extension': True,
'chromium': True,
},
@@ -2469,6 +2477,13 @@ _FUNCTION_INFO = {
'type': 'Manual',
'immediate': False,
'client_test': False,
+ 'cmd_args': 'GLenumTextureTarget target, GLint level, '
+ 'GLint xoffset, GLint yoffset, '
+ 'GLsizei width, GLsizei height, '
+ 'GLenumTextureFormat format, GLenumPixelType type, '
+ 'const void* data, '
+ 'uint32 async_upload_token, '
+ 'void* sync_data',
'extension': True,
'chromium': True,
},
@@ -2479,6 +2494,13 @@ _FUNCTION_INFO = {
'extension': True,
'chromium': True,
},
+ 'WaitAllAsyncTexImage2DCHROMIUM': {
+ 'type': 'Manual',
+ 'immediate': False,
+ 'client_test': False,
+ 'extension': True,
+ 'chromium': True,
+ },
'DiscardFramebufferEXT': {
'type': 'PUTn',
'count': 1,