Open GoogleCodeExporter opened 9 years ago
UBO offset bindings have been clarified as required on 3.1; whether this
restriction will be applied to 3.0 is still a pending question.
Original comment by shannonw...@chromium.org
on 16 Jun 2014 at 10:57
The restriction is expected to be applied back to 3.0; see new language
published in the 3.1 specification (Table 20.46, p397):
http://www.khronos.org/registry/gles/specs/3.1/es_spec_3.1.withchanges.pdf
Original comment by shannonw...@chromium.org
on 26 Jun 2014 at 3:16
Fixing offsets is a reasonable amount of work for our current UBO
implementation.
We currently use a pretty direct mapping from GL Buffers to D3D11 Constant
Buffers. We use methods such as PSSetConstantBuffers to expose the constant
buffers to the shader.
See
http://msdn.microsoft.com/en-us/library/windows/desktop/ff476470(v=vs.85).aspx
There isn't a parameter for an offset until D3D 11.1:
http://msdn.microsoft.com/en-us/library/windows/desktop/hh404649(v=vs.85).aspx
Using D3D11.1 is certainly an option on Windows 7 and 8. Without D3D11.1, we'd
have to use a less direct mapping from GL Buffers to D3D11 Constant Buffers,
with a bit of magic/virtualization.
Some thoughts: One GL buffer could be split into several constant buffers. Or,
we could map the buffer as a shader resource, and inside the shader decode the
offsets. Or, we could prohibit the offsets in WebGL and simply report an error
in ANGLE until we have time to re-investigate, as we do for other features we
don't easily support.
Original comment by jmad...@chromium.org
on 26 Jun 2014 at 3:45
Original issue reported on code.google.com by
jmad...@chromium.org
on 31 Oct 2013 at 3:35