RESOLVED FIXED 223096
[GPU Process] Encoding buffer for DisplayList items should be aligned to 8 bytes
https://bugs.webkit.org/show_bug.cgi?id=223096
Summary [GPU Process] Encoding buffer for DisplayList items should be aligned to 8 bytes
Said Abou-Hallawa
Reported 2021-03-11 15:43:33 PST
ItemBuffer::append() allocates a static buffer whose size = sizeof(DisplayList::Item) + uint64_t for the DisplayList::ItemType. But this static buffer is of type uint8_t. So this array should be aligned to the alignment of a single uint8_t which is 1. The expectation is to have this buffer aligned to 8 bytes so all each member in the encoded DisplayList::Item can be aligned to its alignment requirement. This was caught on Apple Silicon when trying to enable GPU rendering for 2D canvas for layout tests. See https://build.webkit.org/#/builders/103/builds/88. But the same assertion fires if the same page is just opened in mini browser while GPU rendering for 2D canvas is enabled.
Attachments
Patch (1.99 KB, patch)
2021-03-11 15:49 PST, Said Abou-Hallawa
no flags
Patch (1.88 KB, patch)
2021-03-11 16:14 PST, Said Abou-Hallawa
simon.fraser: review+
ews-feeder: commit-queue-
Patch (2.06 KB, patch)
2021-03-11 17:14 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch (2.06 KB, patch)
2021-03-11 17:55 PST, Said Abou-Hallawa
no flags
Patch (2.06 KB, patch)
2021-03-11 18:57 PST, Said Abou-Hallawa
ews-feeder: commit-queue-
Patch (2.01 KB, patch)
2021-03-11 20:59 PST, Said Abou-Hallawa
no flags
Said Abou-Hallawa
Comment 1 2021-03-11 15:49:31 PST
Geoffrey Garen
Comment 2 2021-03-11 16:01:41 PST
Comment on attachment 422983 [details] Patch I think modern C++ has a nicer explicit feature to just say the alignment you want. alignas, maybe?
Said Abou-Hallawa
Comment 3 2021-03-11 16:14:17 PST
Said Abou-Hallawa
Comment 4 2021-03-11 17:14:19 PST
Said Abou-Hallawa
Comment 5 2021-03-11 17:55:22 PST
Said Abou-Hallawa
Comment 6 2021-03-11 18:57:35 PST
EWS
Comment 7 2021-03-11 20:19:05 PST
commit-queue failed to commit attachment 423004 [details] to WebKit repository. To retry, please set cq+ flag again.
Said Abou-Hallawa
Comment 8 2021-03-11 20:59:22 PST
EWS
Comment 9 2021-03-11 21:56:59 PST
Committed r274326: <https://commits.webkit.org/r274326> All reviewed patches have been landed. Closing bug and clearing flags on attachment 423012 [details].
Radar WebKit Bug Importer
Comment 10 2021-03-11 21:57:25 PST
Note You need to log in before you can comment on or make changes to this bug.