|
|
Chromium Code Reviews|
Created:
5 years, 9 months ago by Daniele Castagna Modified:
5 years, 9 months ago Reviewers:
reveman 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. |
Descriptiongpu: Measure texture uploads with glTexSubImage2D and glTexImage2D.
glTexImage2D and glTexSubImage2D could have different performance
properties.
With this patch we benchmark both of these upload techniques.
When using glTexSubImage2D the texture storage is specified with
glTexStorage2D when available, or glTexImage2D passing an empty pointer as data.
BUG=423481
Committed: https://crrev.com/1b9c0f6571baefe70dad41d504cbe3136ce41ae4
Cr-Commit-Position: refs/heads/master@{#321300}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Reuse the same gl texture. #Messages
Total messages: 16 (5 generated)
Patchset #1 (id:1) has been deleted
Patchset #1 (id:20001) has been deleted
Patchset #1 (id:40001) has been deleted
dcastagna@chromium.org changed reviewers: + reveman@chromium.org
https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:304: glTexStorage2DEXT(GL_TEXTURE_2D, 1, GLFormatToStorageFormat(format), is this called for each upload? or just once followed by a number of glTexSubImage2D calls?
https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:304: glTexStorage2DEXT(GL_TEXTURE_2D, 1, GLFormatToStorageFormat(format), On 2015/03/18 at 22:32:34, reveman wrote: > is this called for each upload? or just once followed by a number of glTexSubImage2D calls? Called for each upload. We generate a texture for each upload right now. Should we reuse the same texture and upload multiple times?
https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:304: glTexStorage2DEXT(GL_TEXTURE_2D, 1, GLFormatToStorageFormat(format), On 2015/03/19 00:25:32, Daniele Castagna wrote: > On 2015/03/18 at 22:32:34, reveman wrote: > > is this called for each upload? or just once followed by a number of > glTexSubImage2D calls? > > Called for each upload. We generate a texture for each upload right now. > Should we reuse the same texture and upload multiple times? Reusing the same texture would match normal usage better.
PTAL. It now uses the same texture id when it uploads and draws different textures. If the upload is done using glTexSubImage2D, the storage is specified only once when the texture id is generated. In the previous patch the benchmark was run using both glTexStorage2DEXT and glTexImage2D with a nullptr as data. With this new one glTexStorage2DEXT is always used if available. Let me know if you think it was better before. https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:304: glTexStorage2DEXT(GL_TEXTURE_2D, 1, GLFormatToStorageFormat(format), On 2015/03/19 at 02:01:35, reveman wrote: > On 2015/03/19 00:25:32, Daniele Castagna wrote: > > On 2015/03/18 at 22:32:34, reveman wrote: > > > is this called for each upload? or just once followed by a number of > > glTexSubImage2D calls? > > > > Called for each upload. We generate a texture for each upload right now. > > Should we reuse the same texture and upload multiple times? > > Reusing the same texture would match normal usage better. Done.
PTAL. It now uses the same texture id when it uploads and draws different textures. If the upload is done using glTexSubImage2D, the storage is specified only once when the texture id is generated. In the previous patch the benchmark was run using both glTexStorage2DEXT and glTexImage2D with a nullptr as data. With this new one glTexStorage2DEXT is always used if available. Let me know if you think it was better before. https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1022603002/diff/60001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:304: glTexStorage2DEXT(GL_TEXTURE_2D, 1, GLFormatToStorageFormat(format), On 2015/03/19 at 02:01:35, reveman wrote: > On 2015/03/19 00:25:32, Daniele Castagna wrote: > > On 2015/03/18 at 22:32:34, reveman wrote: > > > is this called for each upload? or just once followed by a number of > > glTexSubImage2D calls? > > > > Called for each upload. We generate a texture for each upload right now. > > Should we reuse the same texture and upload multiple times? > > Reusing the same texture would match normal usage better. Done.
lgtm
The CQ bit was checked by dcastagna@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1022603002/80001
Message was sent while issue was closed.
Committed patchset #2 (id:80001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/1b9c0f6571baefe70dad41d504cbe3136ce41ae4 Cr-Commit-Position: refs/heads/master@{#321300}
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:80001) has been created in https://codereview.chromium.org/1011343005/ by sullivan@chromium.org. The reason for reverting is: This is causing gpu_perftests to fail on android perfbots. See http://crbug.com/468748. |
