Page MenuHome

rename "kernel_tex_fetch" macro to include its return type ( kernel_tex_fetch_float, kernel_tex_fetch_uint etc )
Needs ReviewPublic

Authored by Martijn Berger (juicyfruit) on Sep 13 2014, 8:26 AM.

Details

Summary

The rationale for this change is that we need a way to use cuda texture objects on Kepler and above (http://devblogs.nvidia.com/parallelforall/cuda-pro-tip-kepler-texture-objects-improve-performance-and-flexibility/).

The problem is that these object references are essentially just pointers (cudaTextureObject_t) but that they unlike texture references hold no information on the data type of the actual texture and the data type you get the sample in. These are what is called in the graphics world bindless textures and do hold some significant advantages like increase texture limits ( 2 million or so for Kepler) and also some performance

"Using texture objects, the overhead of binding (up to 1 μs) and unbinding (up to 0.5 μs) textures is eliminated. What is not commonly known is that each outstanding texture reference   that is bound when a kernel is launched incurs added launch latency—up to 0.5 μs per texture reference. This launch overhead persists even if the outstanding bound textures are not even referenced by the kernel. Again, using texture objects instead of texture references completely removes this overhead."

This change is just a stepping stone on the road to supporting these texture objects but since it impacts so much files i thought it better to separate it out.
There are be no function changes.

Diff Detail

Event Timeline

Martijn Berger (juicyfruit) retitled this revision from to rename "kernel_tex_fetch" macro to include its return type ( kernel_tex_fetch_float, kernel_tex_fetch_uint etc ).
Martijn Berger (juicyfruit) updated this object.