On Mon, 2016-02-22 at 13:47 +0200, Tapani Pälli wrote:
> Maybe one way would be to include these matrices in UBO or SSBO and
> then 
> query BUFFER_DATA_SIZE for that buffer. That should return 
> "implementation-dependent minimum total buffer object size".
> 
> https://www.opengl.org/registry/specs/ARB/program_interface_query.txt
> 

Thank you!

That API was one of the first thing I was checking :)

But it doesn't provide what I'm looking for. Rather, seems to return
the size it requires the UBO to store the content with a specific
layout.

For instance, having this UBO:

uniform ubo1 {
  float f;
};


And using the proper function from that extension to query "ubo1", it
returns 16. Which is the size required to store a vec4, according to
layout rules.

If I modify the UBO and add another value:

uniform ubo1 {
  float f;
  int i;
};

And querying again, it still returns 16, as both elements fits in that
size.

So rather than reporting the number of uniform components it is
consuming, is reporting the bytes used in the layout.


        J.A.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to