Jump to content

  • Log In with Google      Sign In   
  • Create Account


Firelark

Member Since 19 Apr 2012
Offline Last Active Nov 14 2013 02:08 AM

Posts I've Made

In Topic: Another Input layout question...

12 November 2013 - 05:16 AM

Thanks mhagain, that's what i wanted to know :)


In Topic: Constant Buffers and multiple objects question

22 April 2012 - 11:07 PM

Maximum size of a constant buffer 4096 * float4 (64kb). A buffer object may be up to 128mb of size. One constant buffer can't hold that much of data, although it is enough for typical use.

Practically, accessing the buffer in the vertex shader is same as reading a texture. Texture fetches has been typically a slightly more expensive than constant buffer fetch. So this is the minor performance hit.

http://developer.amd...1_DX11inBF3.pdf Look here for implementation details.

Best regards!


Ah that makes sense. And thanks for the link.

In Topic: Constant Buffers and multiple objects question

20 April 2012 - 08:16 AM

That's very interesting kauna, I'll definitivly look into that!
I'm currently not that familjar with using buffers yet, other than for constant buffers and vertex and index buffers.

Why do you use buffers rather than constant buffers in that way? Sorry for my ignorance! :)

Also isn't the performance penalties, you are talking about, to do with what kind of usage flag is set when creating the buffer?

For example; if you create a buffer with a using flag of D3D10_USAGE_DYNAMIC, a cpu flag of D3D10_CPU_ACCESS_WRITE and you map it with D3D10_MAP_WRITE_DISCARD, is there a difference in performance whether you use that buffer as a constant buffer or as a shader resource?

Or is it an issue of mapping when the bind flag is D3D10_BIND_SHADER_RESOURCE rather than D3D10_BIND_CONSTANT_BUFFER?

In Topic: Constant Buffers and multiple objects question

19 April 2012 - 11:38 PM

Thanks mhagain. That's how I thought it worked. I got a bit unsure though. I reckon having a lot of different buffers also wastes video memory, right?

PARTNERS