1 of 1 people found this helpful
This looks like a sign extension error. 49152 decimal as unsigned short = 1100000000000000 binary. -16386 as signed short also = 1100000000000000 binary. It seems like somewhere (most likely in the driver) we are sign extending an unsigned short quantity to an integer. I'll get it checked out. As a workaround, if you see a negative number, try subtracting it from 65536 to get the right answer. The good news is that it looks like we are correctly calculating the size even if we are reporting incorrectly, and the shader should work in spite of the erroneous information given by the query.
I'll get an update back on this thread when I have more information.
Thanks for the quick response. I got it to work with the workaround provided with a slight change (add 64*1024 to the negative value). What is the driver's behavior if you exceed the maximum size (is there any?) of the UBO in respect of reported size, shader compilation/linking, and what is the current maximum size supported by the driver?