|
|
DescriptionTime of first use cost of upload.
This test is to check whether there is a time-of-first-use
cost (e.g. driver doesn't upload to the texture until we
draw with it).
BUG=423481
Committed: https://crrev.com/f82e8f7c7ab63b38b715c664f3bb23a608b5d28b
Cr-Commit-Position: refs/heads/master@{#322131}
Patch Set 1 #Patch Set 2 : Calculate upload and draw times. #Patch Set 3 : First draw cost. #
Total comments: 1
Patch Set 4 : Remove the suffix "cost". #Messages
Total messages: 17 (6 generated)
siva.gunturi@samsung.com changed reviewers: + dcastagna@chromium.org, piman@chromium.org
siva.gunturi@samsung.com changed reviewers: - dcastagna@chromium.org
siva.gunturi@samsung.com changed reviewers: + dcastagna@chromium.org
ptal..
On 2015/03/23 at 11:29:43, siva.gunturi wrote: > ptal.. Hi! Thank you for working on this. Why did you decide to go with this approach? Wouldn't it be easier to draw multiple times with the same texture and measure the cost of the first draw versus the cost of the subsequent draws?
On 2015/03/23 16:06:38, Daniele Castagna wrote: > On 2015/03/23 at 11:29:43, siva.gunturi wrote: > > ptal.. > > Hi! > Thank you for working on this. > > Why did you decide to go with this approach? > Wouldn't it be easier to draw multiple times with the same texture and measure > the cost of the first draw versus the cost of the subsequent draws? The test is added to check whether driver doesn't upload to the texture until we draw with it, First i uploaded to different textures and recorded their times. Then recorded the draw readings separately. From gpu side this should tell us whether upload really happened when draw is called or , it didn't wait for draw to happen. May be you are right, i just did the first draw for all textures here, we should compare this with subsequent draws to get the first draw cost. Do you think this is valid only for first time use, or whenever we use the texture to upload?
On 2015/03/23 at 16:33:57, siva.gunturi wrote: > On 2015/03/23 16:06:38, Daniele Castagna wrote: > > On 2015/03/23 at 11:29:43, siva.gunturi wrote: > > > ptal.. > > > > Hi! > > Thank you for working on this. > > > > Why did you decide to go with this approach? > > Wouldn't it be easier to draw multiple times with the same texture and measure > > the cost of the first draw versus the cost of the subsequent draws? > > The test is added to check whether driver doesn't upload to the texture until we draw with it, > First i uploaded to different textures and recorded their times. > Then recorded the draw readings separately. From gpu side this should tell us whether upload > really happened when draw is called or , it didn't wait for draw to happen. > Are you suggesting that the absence of a GPU cost in the upload phase implies that there is going to be a first time draw cost? This seems like a really strong assumption. There might be no GPU cost in uploading at all. There might be delayed CPU cost the first time the texture is used. IMO it'd be much better and easier just to measure the cost of drawing the first time versus drawing again with the same texture. There might be other set-up costs for getting things ready to run the program the first time (e.g: first time a program is used). That's why in TextureUploadPerfTest.upload we run a few warm up uploads and draws. If you want to test if there is a first time upload cost when drawing, I'd suggest to change the TextureUploadPerfTest.upload to make it draw twice using the same texture. > May be you are right, i just did the first draw for all textures here, we should compare this > with subsequent draws to get the first draw cost. > > Do you think this is valid only for first time use, or whenever we use the texture to upload?
On 2015/03/23 19:55:12, Daniele Castagna wrote: > On 2015/03/23 at 16:33:57, siva.gunturi wrote: > > On 2015/03/23 16:06:38, Daniele Castagna wrote: > > > On 2015/03/23 at 11:29:43, siva.gunturi wrote: > > > > ptal.. > > > > > > Hi! > > > Thank you for working on this. > > > > > > Why did you decide to go with this approach? > > > Wouldn't it be easier to draw multiple times with the same texture and > measure > > > the cost of the first draw versus the cost of the subsequent draws? > > > > The test is added to check whether driver doesn't upload to the texture until > we draw with it, > > First i uploaded to different textures and recorded their times. > > Then recorded the draw readings separately. From gpu side this should tell us > whether upload > > really happened when draw is called or , it didn't wait for draw to happen. > > > > Are you suggesting that the absence of a GPU cost in the upload phase implies > that there is going > to be a first time draw cost? > This seems like a really strong assumption. There might be no GPU cost in > uploading at all. There > might be delayed CPU cost the first time the texture is used. > > IMO it'd be much better and easier just to measure the cost of drawing the first > time versus > drawing again with the same texture. > > There might be other set-up costs for getting things ready to run the program > the first time > (e.g: first time a program is used). That's why in TextureUploadPerfTest.upload > we run a few > warm up uploads and draws. > > > If you want to test if there is a first time upload cost when drawing, I'd > suggest to change the > TextureUploadPerfTest.upload to make it draw twice using the same texture. > > > > > May be you are right, i just did the first draw for all textures here, we > should compare this > > with subsequent draws to get the first draw cost. > > > > Do you think this is valid only for first time use, or whenever we use the > texture to upload? ptal... I made the changes to TextureUploadPerfTest.upload by drawing twice and recording first draw cost.
dcastagna@chromium.org changed reviewers: + reveman@chromium.org - piman@chromium.org
Thank you! LGTM I'm adding reveman@ for owner approval. https://codereview.chromium.org/1031463002/diff/40001/gpu/perftests/texture_u... File gpu/perftests/texture_upload_perftest.cc (right): https://codereview.chromium.org/1031463002/diff/40001/gpu/perftests/texture_u... gpu/perftests/texture_upload_perftest.cc:381: first_draw_timers.GetAsMeasurement("firstdrawarrayscost")); nit: I'd remove the suffix "cost". Every measurement we're tracking is a cost.
Thanks daniele for the comments. @reveman, ptal..
lgtm
The CQ bit was checked by siva.gunturi@samsung.com
The patchset sent to the CQ was uploaded after l-g-t-m from reveman@chromium.org, dcastagna@chromium.org Link to the patchset: https://codereview.chromium.org/1031463002/#ps60001 (title: "Remove the suffix "cost".")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1031463002/60001
Message was sent while issue was closed.
Committed patchset #4 (id:60001)
Message was sent while issue was closed.
Patchset 4 (id:??) landed as https://crrev.com/f82e8f7c7ab63b38b715c664f3bb23a608b5d28b Cr-Commit-Position: refs/heads/master@{#322131} |