PDA

View Full Version : Perfs: using 1 vs. multiple samplerBuffer objects?



fred_em
12-23-2011, 04:33 AM
Hi,

My shader accesses two different sets of data. I've got a texture bound to a first samplerBuffer object used in vertex/geometry shaders, and another texture bound to another samplerBuffer, used in the fragment shader. samplerBuffer = I'm using texture buffer objects in both cases.

I am suddenly starting to wonder if I shouldn't use only one samplerBuffer to improve performance. I fear that concurrently reading data from both samplerBuffer #0 and #1 might constantly invalidate the cache (ouch).

My application is meant to run on Fermi or Radeon HD 5xxx or later hardware. Profiling can be done but I am running out of time now, so I prefer to ask the question in this forum

Thanks,

Fred

carsten neumann
12-23-2011, 07:38 AM
This is purely a guess on my part: I would not expect a significant difference.
Since it is quite usual to have shaders sample from multiple textures (even in the same shader stage) I'd assume that each texture sampling unit in the hardware has its own cache so that they don't thrash each other.

(here goes the usual remark about only testing giving you a definitive answer - but you know that already ;) )