Hey, quick question. Is there some kind of preformance penalty for using the getsurfacelevel() function for a render target?
As in I create a render target as a texture (say, myTexture)
then during runtime I call:
myTexture->getsurfacelevel(mySurface);
is there a preformance penalty or slowdown for this?
Btw, just to let you know, I can't use nVidia perf-hud for these things unfortunatley. My laptop has some kind of compatability problem with the driver and it keeps stalling everything I run (even when perf-hud is off).
thanks in advance
getsurfacelevel() performance
Started by starstutter, Dec 22 2008 09:45 PM
3 replies to this topic
#1
Posted 22 December 2008 - 09:45 PM
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
#2
Posted 23 December 2008 - 12:55 AM
No, there shouldn't be any slowdown for calling GetSurfaceLevel() itself. This function really doesn't do much. It just returns an interface to the surface (the meaning of the 'I' in front of IDirect3DSurface9).
Things do start getting complicated when you actually do something with this surface interface though. If you lock it for reading the data then it will stall till the GPU is completely done rendering to the texture. And if automatic mipmap generation is enabled then you'll have to wait for that too. What should be fast though (in theory) is copying the data to another surface that is in graphics memory, or setting it as a texture, as this merely gets stored into the command buffer and executes later when the data is ready (neither GPU or CPU is stalled).
Things do start getting complicated when you actually do something with this surface interface though. If you lock it for reading the data then it will stall till the GPU is completely done rendering to the texture. And if automatic mipmap generation is enabled then you'll have to wait for that too. What should be fast though (in theory) is copying the data to another surface that is in graphics memory, or setting it as a texture, as this merely gets stored into the command buffer and executes later when the data is ready (neither GPU or CPU is stalled).
#3
Posted 23 December 2008 - 03:30 AM
BTW just a heads-up: it's "performance" not "preformance".
reedbeta.com - developer blog, OpenGL demos, and other projects
#4
Posted 23 December 2008 - 04:57 AM
Nick said:
No, there shouldn't be any slowdown for calling GetSurfaceLevel() itself. This function really doesn't do much. It just returns an interface to the surface (the meaning of the 'I' in front of IDirect3DSurface9).
Reedbeta said:
BTW just a heads-up: it's "performance" not "preformance".
(\__/)
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
(='.'=) This is Bunny. Copy and paste bunny into
(")_(") your signature to help him gain world domination.
bunny also wants to fight spam: Click Here Bots!
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












