[Mesa-dev] How to get uniform components used by uniform variables

Juan A. Suarez Romero jasuarez at igalia.com
Mon Feb 22 13:20:19 UTC 2016


On Mon, 2016-02-22 at 14:13 +0200, Tapani Pälli wrote:
> > So rather than reporting the number of uniform components it is
> > consuming, is reporting the bytes used in the layout.
> >
> 
> Ah right, I see. Maybe you can query OFFSET then, this should differ 
> then when matrix has a different type?

I've tested with an UBO containing 3 floats:

uniform ssbo1 {
  float f1;
  float f2;
  float f3;
};

When query OFFSET for each of f1, f2 and f3, I get 0, 4, and 8,
respectively. That is, the offset in bytes inside the layout.

Seems more about querying the layout. But I'm not sure if this really
translates to "uniform components". Seems more about querying the 


	J.A.



More information about the mesa-dev mailing list