Jump to content

  • Log In with Google      Sign In   
  • Create Account

We're offering banner ads on our site from just $5!

1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


Don't forget to read Tuesday's email newsletter for your chance to win a free copy of Construct 2!


Texture Swapping: Does size matter?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 metsfan   Members   -  Reputation: 654

Like
0Likes
Like

Posted 05 March 2014 - 09:40 PM

Hey all, 

 

I am wondering something about texture swapping, hoping someone can shed some light.  Question is simple:  If I swap to a different texture unit, whether it be DirectX or OpenGL, will the operation take longer depending on the size of a texture?  In other words, is a texture swap to a 64x64 texture the same cost as a 2048x2048 texture?  Is it just like changing a pointer, or does it actually have to move the memory to make it accessible to the GPU?  It is safe to assume in this situation the textures are fully initialized and have already been rendered with already (so the data is guarenteed to be in GPU memory), and that the data will not change for the runtime of the application.

 

It seems intuitive to me that it would take longer for the larger texture swap, but I have found more than once that the GPU does things that surprise me, so any knowledge here would be great.  Thank you.


Edited by metsfan, 05 March 2014 - 09:41 PM.


Sponsor:

#2 MJP   Moderators   -  Reputation: 11585

Like
5Likes
Like

Posted 05 March 2014 - 09:47 PM

If you're talking about standard desktop GPU's, binding a texture generally isn't going to cause any memory to move around. For dedicated GPU's the driver is going to keep all of your textures in GPU memory as long as everything fits, and so the "swap" is mostly a CPU-side operation involving pointers. In that case the size of the texture shouldn't have any bearing on the cost of switching.



#3 metsfan   Members   -  Reputation: 654

Like
0Likes
Like

Posted 05 March 2014 - 09:59 PM

If you're talking about standard desktop GPU's, binding a texture generally isn't going to cause any memory to move around. For dedicated GPU's the driver is going to keep all of your textures in GPU memory as long as everything fits, and so the "swap" is mostly a CPU-side operation involving pointers. In that case the size of the texture shouldn't have any bearing on the cost of switching.

 

Perfect, thanks.  Yes, I was referring to dedicated desktop GPUs.  






Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS