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

Issue 1750123002: Upgrade Tex{Sub}Image{2|3}D to handle ES3 unpack parameters. (Closed)

Created:
4 years, 9 months ago by Zhenyao Mo
Modified:
4 years, 9 months ago
Reviewers:
piman
CC:
chromium-reviews, 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

Upgrade Tex{Sub}Image{2|3}D to handle ES3 unpack parameters. Also, this CL changed the SKIP_* unpack parameters to be fully handled on the client side and never get sent down to the service side. Also, this CL fixed a bug in ClearLevel3D. If an unpack buffer is bound, unpack parameters have been submitted to the driver already. So when we call TexSubImage3D to clear a 3D texture, we need to clear these parameters if set by client, and restore them afterwards. BUG=487841, 429053 TEST=gpu_unittests,webgl_conformance,webgl2_conformance R=piman@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Committed: https://crrev.com/4a658ee4067d5256885276c95a52ac393f11e2c0 Cr-Commit-Position: refs/heads/master@{#380752}

Patch Set 1 : #

Patch Set 2 : #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Patch Set 6 : working version #

Patch Set 7 : #

Patch Set 8 : #

Total comments: 15

Patch Set 9 : Clean rebase #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : rebase after crrev.com/1785483002 #

Patch Set 13 : Fix minor bugs #

Patch Set 14 : rebase after crrev.com/1787503002 #

Patch Set 15 : pure rebase #

Patch Set 16 : Attemp to fix random crashes on windows #

Unified diffs Side-by-side diffs Delta from patch set Stats (+714 lines, -188 lines) Patch
M gpu/command_buffer/client/gles2_implementation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +8 lines, -0 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 17 chunks +270 lines, -130 lines 0 comments Download
M gpu/command_buffer/client/gles2_implementation_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 7 chunks +187 lines, -3 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M gpu/command_buffer/common/gles2_cmd_utils.cc View 1 2 3 4 5 6 7 8 1 chunk +4 lines, -0 lines 0 comments Download
M gpu/command_buffer/service/gles2_cmd_decoder.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 4 chunks +158 lines, -32 lines 0 comments Download
M gpu/command_buffer/service/texture_manager.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -1 line 0 comments Download
M gpu/command_buffer/service/texture_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 9 chunks +84 lines, -22 lines 0 comments Download

Messages

Total messages: 67 (33 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/1
4 years, 9 months ago (2016-03-01 03:24:15 UTC) #3
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win8_chromium_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_ng/builds/110899)
4 years, 9 months ago (2016-03-01 03:52:33 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/20001
4 years, 9 months ago (2016-03-01 18:29:10 UTC) #7
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-01 19:50:41 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/40001
4 years, 9 months ago (2016-03-02 19:17:00 UTC) #11
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/182951)
4 years, 9 months ago (2016-03-02 21:03:47 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/80001
4 years, 9 months ago (2016-03-03 18:13:23 UTC) #16
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/100001
4 years, 9 months ago (2016-03-03 18:21:07 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/183626)
4 years, 9 months ago (2016-03-03 21:09:59 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/140001
4 years, 9 months ago (2016-03-04 20:58:08 UTC) #23
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/184383)
4 years, 9 months ago (2016-03-04 22:50:58 UTC) #25
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/160001
4 years, 9 months ago (2016-03-05 00:15:15 UTC) #27
Zhenyao Mo
piman: PTAL We have to resolve the random crashes on win bot before landing this. ...
4 years, 9 months ago (2016-03-05 01:14:53 UTC) #30
commit-bot: I haz the power
Dry run: Exceeded global retry quota
4 years, 9 months ago (2016-03-05 01:20:09 UTC) #31
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/184570)
4 years, 9 months ago (2016-03-05 04:17:09 UTC) #33
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/200001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/200001
4 years, 9 months ago (2016-03-07 22:55:39 UTC) #36
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/177571)
4 years, 9 months ago (2016-03-07 23:33:54 UTC) #38
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/220001
4 years, 9 months ago (2016-03-08 00:15:41 UTC) #40
piman
https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc File gpu/command_buffer/service/gles2_cmd_decoder.cc (right): https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/gles2_cmd_decoder.cc#newcode9563 gpu/command_buffer/service/gles2_cmd_decoder.cc:9563: NOTREACHED(); nit: no NOTREACHED() since this can be reached ...
4 years, 9 months ago (2016-03-08 01:56:50 UTC) #41
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/34650)
4 years, 9 months ago (2016-03-08 03:11:49 UTC) #43
Zhenyao Mo
Revised, but I still haven't figured out the win crash issue - can't reproduce locally. ...
4 years, 9 months ago (2016-03-09 18:41:05 UTC) #44
piman
https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/texture_manager.cc File gpu/command_buffer/service/texture_manager.cc (right): https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/texture_manager.cc#newcode2147 gpu/command_buffer/service/texture_manager.cc:2147: if (buffer_size % type_size != 0) { On 2016/03/09 ...
4 years, 9 months ago (2016-03-09 18:52:05 UTC) #45
Zhenyao Mo
On 2016/03/09 18:52:05, piman wrote: > https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/texture_manager.cc > File gpu/command_buffer/service/texture_manager.cc (right): > > https://codereview.chromium.org/1750123002/diff/220001/gpu/command_buffer/service/texture_manager.cc#newcode2147 > ...
4 years, 9 months ago (2016-03-09 19:25:18 UTC) #46
piman
lgtm
4 years, 9 months ago (2016-03-09 21:12:32 UTC) #47
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/300001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/300001
4 years, 9 months ago (2016-03-10 02:32:23 UTC) #49
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 9 months ago (2016-03-10 05:40:25 UTC) #51
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/340001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/340001
4 years, 9 months ago (2016-03-11 00:38:27 UTC) #53
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/138233) linux_chromium_rel_ng on ...
4 years, 9 months ago (2016-03-11 01:14:01 UTC) #55
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/400001
4 years, 9 months ago (2016-03-11 20:36:49 UTC) #58
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/195678)
4 years, 9 months ago (2016-03-11 21:11:10 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1750123002/400001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1750123002/400001
4 years, 9 months ago (2016-03-11 22:12:29 UTC) #63
commit-bot: I haz the power
Committed patchset #16 (id:400001)
4 years, 9 months ago (2016-03-11 22:19:51 UTC) #64
commit-bot: I haz the power
Patchset 16 (id:??) landed as https://crrev.com/4a658ee4067d5256885276c95a52ac393f11e2c0 Cr-Commit-Position: refs/heads/master@{#380752}
4 years, 9 months ago (2016-03-11 22:21:18 UTC) #66
Zhenyao Mo
4 years, 9 months ago (2016-03-11 22:38:44 UTC) #67
Message was sent while issue was closed.
Post my findings for the random crashes on win bots observed in any CLs except
the last one.

1) in these CLs, I did an optimization when TexImage is called with data =
nullptr, I skip calculating the data size, (thus the variable holding data size
is set to 0)

2) on top of ANGLE, we have workarounds for cubemaps that we internally allocate
all faces to make it cube complete, where they use this data size (=0) to create
a buffer that's all initialized to zero and feed it to all cube map faces.

3) apparently new char[0] returns non null, and feeding this pointer to TexImage
caused random crashes (in driver I assume) because this pointer points to no
data, but since it's non null, driver assumes it points to a buffer large enough
to hold full pixels.

Powered by Google App Engine
This is Rietveld 408576698