[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Public WebGL] packed qualifier omission



On Fri, Mar 27, 2015 at 12:45 AM, Florian Bösch <pyalot@gmail.com> wrote:
> This ticket https://github.com/KhronosGroup/WebGL/issues/911 specifies that
> the packed layout qualifier is dropped because it could be used in a
> non-portable fashion (by querying one GPU for its packing offsets and baking
> that into a buffer for delivery).
>
> This isn't a "problem" unique to WebGL. Native applications would be able to
> commit the same mistake. Wouldn't it be better to clearly state on the
> reference pages/spec/test/guides that using packed qualifiers with GPU
> queried offsets that this is GPU specific and leave the feature in?
>
> There are probably good uses of packed UBOs for applications (such as say
> reducing GPU bandwidth cost on transfer).

This topic was discussed face-to-face with multiple GPU vendors at the
time. The smaller vendors typically find that the behavior implemented
in the larger vendors' drivers becomes the status quo standard, and
that they're forced to implement it in order to get major applications
and games to run on their hardware. The WebGL group did not want this
to happen with the data format of uniform buffer objects. Since UBOs
are likely to provide such a huge performance boost over individual
setting of uniforms, their usage is likely to be widespread. App
developers are unlikely to test on more GPUs than those they have
available. The probability is very high that using the packed layout
qualifier will result in non-portable code.

Also at the time, all GPU vendors agreed there would be no major
performance loss or significant memory increase by standardizing on
the std140 layout for WebGL. It's for this reason that the decision
was made to only support that layout in UBOs in WebGL 2.0.

-Ken

-----------------------------------------------------------
You are currently subscribed to public_webgl@khronos.org.
To unsubscribe, send an email to majordomo@khronos.org with
the following command in the body of your email:
unsubscribe public_webgl
-----------------------------------------------------------