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

Issue 1394543003: Added SyncToken command buffer trait to help with IPC messages. (Closed)

Created:
5 years, 2 months ago by David Yen
Modified:
5 years, 2 months ago
Reviewers:
piman
CC:
chromium-reviews, darin-cc_chromium.org, jam, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Added SyncToken command buffer trait to help with IPC messages. R=piman@chromium.org BUG=514815 Committed: https://crrev.com/6a219f8ccdd5148f28458b8184f31859babb9848 Cr-Commit-Position: refs/heads/master@{#353170}

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -54 lines) Patch
M content/common/gpu/gpu_command_buffer_stub.cc View 4 chunks +8 lines, -7 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 3 chunks +7 lines, -6 lines 0 comments Download
M gpu/command_buffer/common/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/constants.h View 1 chunk +0 lines, -5 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_format.h View 2 chunks +0 lines, -20 lines 0 comments Download
A gpu/command_buffer/common/sync_token.h View 1 chunk +48 lines, -0 lines 0 comments Download
A gpu/command_buffer/common/sync_token.cc View 1 chunk +81 lines, -0 lines 1 comment Download
M gpu/command_buffer/service/in_process_command_buffer.cc View 5 chunks +5 lines, -8 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager.h View 1 chunk +3 lines, -1 line 0 comments Download
M gpu/command_buffer/service/mailbox_manager_sync.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M gpu/command_buffer/service/mailbox_manager_unittest.cc View 2 chunks +3 lines, -2 lines 0 comments Download
M gpu/command_buffer/tests/gl_fence_sync_unittest.cc View 3 chunks +4 lines, -3 lines 0 comments Download
M gpu/command_buffer_common.gypi View 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.h View 2 chunks +9 lines, -0 lines 0 comments Download
M gpu/ipc/gpu_command_buffer_traits.cc View 2 chunks +24 lines, -0 lines 0 comments Download

Messages

Total messages: 10 (1 generated)
David Yen
As discussed before (albeit awhile ago), add SyncToken as a command buffer trait to make ...
5 years, 2 months ago (2015-10-07 23:30:57 UTC) #1
piman
lgtm
5 years, 2 months ago (2015-10-08 22:57:11 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1394543003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1394543003/1
5 years, 2 months ago (2015-10-08 23:15:08 UTC) #4
commit-bot: I haz the power
Committed patchset #1 (id:1)
5 years, 2 months ago (2015-10-08 23:23:50 UTC) #5
commit-bot: I haz the power
Patchset 1 (id:??) landed as https://crrev.com/6a219f8ccdd5148f28458b8184f31859babb9848 Cr-Commit-Position: refs/heads/master@{#353170}
5 years, 2 months ago (2015-10-08 23:24:28 UTC) #6
jbudorick
A revert of this CL (patchset #1 id:1) has been created in https://codereview.chromium.org/1386323004/ by jbudorick@chromium.org. ...
5 years, 2 months ago (2015-10-10 00:34:45 UTC) #7
piman
https://codereview.chromium.org/1394543003/diff/1/gpu/command_buffer/common/sync_token.cc File gpu/command_buffer/common/sync_token.cc (right): https://codereview.chromium.org/1394543003/diff/1/gpu/command_buffer/common/sync_token.cc#newcode66 gpu/command_buffer/common/sync_token.cc:66: reinterpret_cast<SyncTokenInternal*>(data); I think because SyncToken::data is not guaranteed to ...
5 years, 2 months ago (2015-10-10 00:40:55 UTC) #8
David Yen
On 2015/10/10 00:40:55, piman (slow to review) wrote: > https://codereview.chromium.org/1394543003/diff/1/gpu/command_buffer/common/sync_token.cc > File gpu/command_buffer/common/sync_token.cc (right): > ...
5 years, 2 months ago (2015-10-10 00:45:49 UTC) #9
piman
5 years, 2 months ago (2015-10-10 00:51:45 UTC) #10
Message was sent while issue was closed.
On Fri, Oct 9, 2015 at 5:45 PM, <dyen@chromium.org> wrote:

> On 2015/10/10 00:40:55, piman (slow to review) wrote:
>
>
>
https://codereview.chromium.org/1394543003/diff/1/gpu/command_buffer/common/s...
>
>> File gpu/command_buffer/common/sync_token.cc (right):
>>
>
>
>
>
https://codereview.chromium.org/1394543003/diff/1/gpu/command_buffer/common/s...
>
>> gpu/command_buffer/common/sync_token.cc:66:
>> reinterpret_cast<SyncTokenInternal*>(data);
>> I think because SyncToken::data is not guaranteed to be aligned, this
>> reinterpret_cast is iffy and that's what's causing the problem.
>>
>
> It seems like we should simply list the members in SyncToken (if needed, in
>>
> the
>
>> private section), and maybe provide a data() accessor that does the
>> reinterpret_cast the opposite way, into char*.
>>
>
> Since GenSyncTokenCHROMIUM takes a GLByte* of size
> GL_SYNC_TOKEN_SIZE_CHROMIUM
> we cannot guarantee
> that the buffer is aligned even if a SyncToken structure is. I'm thinking
> we
> should make GL_SYNC_TOKEN_SIZE_CHROMIUM big enough to accomodate
> "SyncToken +
> alignof(SyncToken) - 1" and have the SyncToken data start at the correct
> alignment. Does that sound reasonable?
>

Not really, you don't want to interpret the GLbyte array differently
depending on the alignment.
For GenSyncTokenCHROMIUM, you can simply memcpy the SyncToken into the
users's byte array, then alignment doesn't matter.


> Although in practice we will probably have to use sizeof(uint64_t) instead
> of
> alignof since that is c++11 only.
>
> https://codereview.chromium.org/1394543003/
>

To unsubscribe from this group and stop receiving emails from it, send an email
to chromium-reviews+unsubscribe@chromium.org.

Powered by Google App Engine
This is Rietveld 408576698