Skip to main content
added 397 characters in body
Source Link
John Calsbeek
  • 5k
  • 2
  • 23
  • 17

It could, in theory. More vertices means more memory used on the GPU. If your game uses enough GPU memory to trigger swapping, then you could lose a bit of time to memory transfer. However, if w and h are low, then the buffer will use a negligible amount of memory, and if w and h are high then the wasted memory is fairly small. (As an example, the overhead on a 64x64 grid is about 3%.) The chance that a useful buffer could fit in that additional space is pretty small. The chance that you'd notice the FPS difference there is pretty tiny.

It could also somewhat penalize a smarter GPU. Although a vertex that is never listed in the index buffer should never get transformed by your vertex shader, it still might be fetched and take up cache space, depending on how the GPU works. This assumes your wasted vertices are littered all over your vertex buffer, not concentrated at the end (where they'd presumably be easy to get rid of).

It could, in theory. More vertices means more memory used on the GPU. If your game uses enough GPU memory to trigger swapping, then you could lose a bit of time to memory transfer. However, if w and h are low, then the buffer will use a negligible amount of memory, and if w and h are high then the wasted memory is fairly small. (As an example, the overhead on a 64x64 grid is about 3%.) The chance that a useful buffer could fit in that additional space is pretty small. The chance that you'd notice the FPS difference there is pretty tiny.

It could, in theory. More vertices means more memory used on the GPU. If your game uses enough GPU memory to trigger swapping, then you could lose a bit of time to memory transfer. However, if w and h are low, then the buffer will use a negligible amount of memory, and if w and h are high then the wasted memory is fairly small. (As an example, the overhead on a 64x64 grid is about 3%.) The chance that a useful buffer could fit in that additional space is pretty small. The chance that you'd notice the FPS difference there is pretty tiny.

It could also somewhat penalize a smarter GPU. Although a vertex that is never listed in the index buffer should never get transformed by your vertex shader, it still might be fetched and take up cache space, depending on how the GPU works. This assumes your wasted vertices are littered all over your vertex buffer, not concentrated at the end (where they'd presumably be easy to get rid of).

Source Link
John Calsbeek
  • 5k
  • 2
  • 23
  • 17

It could, in theory. More vertices means more memory used on the GPU. If your game uses enough GPU memory to trigger swapping, then you could lose a bit of time to memory transfer. However, if w and h are low, then the buffer will use a negligible amount of memory, and if w and h are high then the wasted memory is fairly small. (As an example, the overhead on a 64x64 grid is about 3%.) The chance that a useful buffer could fit in that additional space is pretty small. The chance that you'd notice the FPS difference there is pretty tiny.