Jump to content

  • Log In with Google      Sign In   
  • Create Account


reading from texture performance


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
1 reply to this topic

#1 lomateron   Members   -  Reputation: 300

Like
0Likes
Like

Posted 30 November 2012 - 08:51 PM

directx losses performance when in one draw call, I render to the same texel.(like having various vertices pointing to the same texel)

Do I lose performance if in 1 draw call i read from the same texel?(example:when rendering to a texture, all its texels, need to read from the same texel of a shader resource texture )

Edited by lomateron, 30 November 2012 - 09:00 PM.


Sponsor:

#2 Tsus   Members   -  Reputation: 977

Like
0Likes
Like

Posted 01 December 2012 - 07:20 PM

Hi!

Reading from the same address in texture memory, won’t be as bad as writing to the same address.
But, for the reading from one address rather use constant buffers instead of a texture, because of two reasons (cf. Montes):
  • Constant memory is optimized for broadcasts. This means, if all threads (i.e., pixel shader threads) in a warp (i.e., group of 16 or 32 threads dependent on the hardware) read from the same constant buffer address, only one memory access is requested and its result is “broadcasted” (send) to all threads. This saves 15 or 31 memory accesses and therefore memory bandwidth.
  • Each multiprocessor has its own constant memory cache (8 KB), thus only the first warp will read from memory, all others directly find the constant in the cache.

Best regards!

Acagamics e.V. – IGDA Student Game Development Club (University of Magdeburg, Germany)





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