• Advertisement
Sign in to follow this  

reading from texture performance

This topic is 1875 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
Advertisement
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. [url="http://wwwae.ciemat.es/~cardenas/CUDA/T6-ConstantMemory.pdf"]Montes[/url]):[list=1]
[*]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.
[/list]

Best regards!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement