XNA Creators Club Online
Page 1 of 1 (6 items)
Sort Posts: Previous Next

Difference between tbuffer and Buffer

Last post 05-16-2008 2:38 PM by Clootie RU. 5 replies.
  • 04-06-2008 1:18 PM

    Difference between tbuffer and Buffer

    Hi,

    what is the difference between tbuffer and Buffer<> object in HLSL?

    And how are they created and bound in the api? If i get it correctly Buffer<> is created as a d3d10 buffer with BindFlag set to D3D10_BIND_SHADER_RESOURCE and later it is bound to shader as a shader resource view, but how do i create and bind a tbuffer?

    In the DXSDK it is written that :

    Unlike other Direct3D 10 buffer and texture resources which must be bound to the pipeline using a view, a shader-resource buffer (a constant or texture buffer) is bound directly without the need of a view.

    but here http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=873245&SiteID=1 it is written that i should bind it as a resource view(just like a Buffer<>)

  • 04-07-2008 4:16 AM In reply to

    Re: Difference between tbuffer and Buffer

    Another question is how to select a format for a tbuffer resource view. How does the effect framework select it, based on the tbuffer contents in HLSL , or just uses the same format for all cases?
  • 04-08-2008 9:44 PM In reply to

    Re: Difference between tbuffer and Buffer

    I believe it defaults to a mixed format, even if you have homogenous data in the tbuffer. Effects just fills it like it would a cbuffer, but it gets bound to a texture slot instead of to a cbuffer slot.
  • 04-12-2008 7:23 AM In reply to

    Re: Difference between tbuffer and Buffer

    Thanks
  • 05-15-2008 5:17 PM In reply to

    Re: Difference between tbuffer and Buffer

    So does this mean that tbuffer and Buffer<> is the same thing, just different syntax? I've been confused about this for a while.
  • 05-16-2008 2:38 PM In reply to

    Re: Difference between tbuffer and Buffer

    TBuffer and CBuffer have different performance characteristics on HW. While CBuffer should be used for data that is coherently accessed in shaders (like all instances of shader fetching projection matrix from buffer) - TBuffers are more suited for randomly accessed data (for example, various lookup tables).
Page 1 of 1 (6 items) Previous Next