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

Issue 10106015: Allow textures to be moved from one GL context group to another. (Closed)

Created:
8 years, 8 months ago by apatrick_chromium
Modified:
8 years, 7 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, darin-cc_chromium.org, apatrick_chromium, piman
Visibility:
Public.

Description

Allow textures to be moved from one GL context group to another. The function glProduceTexture(target, mailbox) removes a texture from a context group and puts it in a "mailbox" that is accessible to all context groups on the same channel. Then glConsumeTexture(target, mailbox) adds the texture to a context group, possibly a different one, if the caller knows the name of the mailbox. From the point of view of the caller, the texture objects themselves do not move, just the texels. In terms of the underlying GL, the TextureInfo service IDs are reassigned as necessary. A texture in a mailbox is destroyed when the context group that put it there is destroyed. Expected usage is: // Context 1 glBindTexture(GL_TEXTURE_2D, foo); glProduceTexture(GL_TEXTURE_2D, secret_name); glFlush(); // Context 2 glBindTexture(GL_TEXTURE_2D, bar); glConsumeTexture(GL_TEXTURE_2D, secret_name); Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=134791

Patch Set 1 : #

Patch Set 2 : #

Total comments: 3

Patch Set 3 : #

Patch Set 4 : #

Total comments: 10

Patch Set 5 : #

Patch Set 6 : #

Total comments: 10

Patch Set 7 : #

Total comments: 4

Patch Set 8 : #

Patch Set 9 : #

Patch Set 10 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1662 lines, -44 lines) Patch
M content/common/gpu/gpu_channel.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_channel.cc View 1 2 3 4 5 6 7 8 4 chunks +4 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.h View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M content/common/gpu/gpu_command_buffer_stub.cc View 1 2 3 4 5 6 7 8 2 chunks +2 lines, -1 line 0 comments Download
M gpu/DEPS View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/build_gles2_cmd_buffer.py View 1 2 3 4 5 6 7 8 3 chunks +27 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_c_lib_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_cmd_helper_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +45 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 1 chunk +15 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +30 lines, -0 lines 0 comments Download
M gpu/command_buffer/cmd_buffer_functions.txt View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -1 line 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +214 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format_test_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +219 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_ids_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils_implementation_autogen.h View 1 2 3 4 5 6 7 8 3 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/context_group.h View 1 2 3 4 5 6 7 8 4 chunks +10 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/context_group.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/context_group_unittest.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/feature_info.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 7 chunks +93 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +92 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +127 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_3_autogen.h View 1 2 3 4 5 6 7 8 1 chunk +5 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
A gpu/command_buffer/service/mailbox_manager.h View 1 2 3 4 5 6 7 1 chunk +99 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/mailbox_manager.cc View 1 2 3 4 5 6 1 chunk +125 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/texture_definition.h View 1 2 3 4 5 6 1 chunk +75 lines, -0 lines 0 comments Download
A gpu/command_buffer/service/texture_definition.cc View 1 2 3 4 5 1 chunk +49 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 5 6 7 8 4 chunks +24 lines, -26 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 7 8 4 chunks +130 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_manager.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -1 line 0 comments Download
M gpu/command_buffer/tests/gl_manager.cc View 1 2 3 4 5 6 7 8 3 chunks +7 lines, -4 lines 0 comments Download
A gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc View 1 2 3 4 5 6 7 8 9 1 chunk +172 lines, -0 lines 0 comments Download
M gpu/command_buffer/tests/gl_unittests.cc View 1 2 3 4 5 6 7 8 1 chunk +10 lines, -0 lines 0 comments Download
M gpu/command_buffer_service.gypi View 1 2 3 4 5 6 7 8 3 chunks +5 lines, -0 lines 0 comments Download
M gpu/gles2_conform_support/egl/display.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M gpu/gpu_common.gypi View 1 2 3 4 5 6 7 8 1 chunk +1 line, -0 lines 0 comments Download
M third_party/khronos/GLES2/gl2ext.h View 1 2 3 4 5 6 7 8 1 chunk +20 lines, -0 lines 0 comments Download
M webkit/gpu/webgraphicscontext3d_in_process_command_buffer_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 17 (0 generated)
apatrick_chromium
This patch is not finished yet and it has only one test so far. Could ...
8 years, 8 months ago (2012-04-19 00:09:13 UTC) #1
apatrick_chromium
+piman Gregg suggested you might have some thoughts on this.
8 years, 8 months ago (2012-04-19 20:36:21 UTC) #2
Ken Russell (switch to Gerrit)
Per our offline discussions, the design seems good overall, and will work for the use ...
8 years, 8 months ago (2012-04-23 20:12:00 UTC) #3
gman1
On Mon, Apr 23, 2012 at 1:12 PM, <kbr@chromium.org> wrote: > Per our offline discussions, ...
8 years, 8 months ago (2012-04-23 21:44:10 UTC) #4
apatrick_chromium
Done sans documentation (which I'll do). PTAL.
8 years, 8 months ago (2012-04-25 21:58:53 UTC) #5
Ken Russell (switch to Gerrit)
Looks really good overall, in particular the thorough tests. Few minor comments. https://chromiumcodereview.appspot.com/10106015/diff/17040/gpu/command_buffer/build_gles2_cmd_buffer.py File gpu/command_buffer/build_gles2_cmd_buffer.py ...
8 years, 8 months ago (2012-04-26 01:10:53 UTC) #6
greggman
https://chromiumcodereview.appspot.com/10106015/diff/17040/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://chromiumcodereview.appspot.com/10106015/diff/17040/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode8564 gpu/command_buffer/service/gles2_cmd_decoder.cc:8564: group_->mailbox_manager()->ProduceTexture( I'm a little concerned that GenMailbox is optional. ...
8 years, 8 months ago (2012-04-26 18:09:18 UTC) #7
apatrick_chromium
I added a constant to gl2ext.h for the size of the mailbox and tried to ...
8 years, 8 months ago (2012-04-26 21:17:40 UTC) #8
Ken Russell (switch to Gerrit)
One semantic issue in glProduceTextureCHROMIUM. The others are minor comments. http://codereview.chromium.org/10106015/diff/45007/gpu/command_buffer/common/gles2_cmd_format.h File gpu/command_buffer/common/gles2_cmd_format.h (right): http://codereview.chromium.org/10106015/diff/45007/gpu/command_buffer/common/gles2_cmd_format.h#newcode38 ...
8 years, 8 months ago (2012-04-26 22:34:14 UTC) #9
apatrick_chromium
I changed the mailbox name size to 512 bits to accommodate a 256-bit key and ...
8 years, 8 months ago (2012-04-27 22:31:58 UTC) #10
Ken Russell (switch to Gerrit)
LGTM; very nice. Couple of minor comments. http://codereview.chromium.org/10106015/diff/67005/gpu/command_buffer/service/mailbox_manager.h File gpu/command_buffer/service/mailbox_manager.h (right): http://codereview.chromium.org/10106015/diff/67005/gpu/command_buffer/service/mailbox_manager.h#newcode18 gpu/command_buffer/service/mailbox_manager.h:18: #define GL_MAILBOX_SIZE_CHROMIUM ...
8 years, 8 months ago (2012-04-28 00:27:40 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apatrick@chromium.org/10106015/76004
8 years, 7 months ago (2012-05-01 01:08:43 UTC) #12
commit-bot: I haz the power
Can't apply patch for file gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc. While running patch -p0 --forward --force; patching file gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc ...
8 years, 7 months ago (2012-05-01 01:09:14 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apatrick@chromium.org/10106015/81052
8 years, 7 months ago (2012-05-01 19:47:21 UTC) #14
commit-bot: I haz the power
Can't apply patch for file gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc. While running patch -p0 --forward --force; patching file gpu/command_buffer/tests/gl_texture_mailbox_unittests.cc ...
8 years, 7 months ago (2012-05-01 19:47:46 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/apatrick@chromium.org/10106015/78020
8 years, 7 months ago (2012-05-01 20:03:17 UTC) #16
commit-bot: I haz the power
8 years, 7 months ago (2012-05-01 21:51:05 UTC) #17
Change committed as 134791

Powered by Google App Engine
This is Rietveld 408576698