WebGL2RenderingContext.getBufferSubData does not accept ArrayBuffer
Reported by
d07....@gmail.com,
Jun 13 2018
|
|||
Issue descriptionUserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.79 Safari/537.36 Steps to reproduce the problem: 1. Create a WebGL2 context 2. Create and populate a buffer 3. Create an ArrayBuffer 4. Call getBufferSubData to read data from the buffer into the ArrayBuffer What is the expected behavior? According to MDN (https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/getBufferSubData), it should accept ArrayBuffer argument. What went wrong? TypeError: Failed to execute 'getBufferSubData' on 'WebGL2RenderingContext': parameter 3 is not of type 'ArrayBufferView'. Did this work before? N/A Chrome version: 67.0.3396.79 Channel: n/a OS Version: 10.0 Flash Version: Fiddle: http://jsfiddle.net/j5xhwLup/2/
,
Jun 13 2018
Able to reproduce this issue on reported version 67.0.3396.79 and latest canary 69.0.3457.0 using windows 10, Mac 10.13.3 and Ubuntu 14.04. This issue is seen from M-60. Hence considering this issue as Non-Regression and marking as Untriaged. Thanks!
,
Jun 13 2018
Actually, it seems that the original Khronos specs (linked on MDN) do require ArrayBufferView, but I was also able to find conformance tests that go both ways. So there seems to be a mistake in MDN, and/or the specs were changed at some point. Does anyone know what the rationale behind not allowing ArrayBuffers could be? Since the function reads opaque data, it seems odd to require typed arrays or even a DataView.
,
Jun 27 2018
I don't remember all of the discussions but I think the rationale was that since you are going to need an ArrayBufferView to view the returned data anyway, there was no point in accepting a raw ArrayBuffer as argument. This is a specification question so please raise it on the public_webgl mailing list if you'd like to discuss it with the other browser vendors: https://www.khronos.org/webgl/public-mailing-list/ . Closing this as WontFix; Chrome is implementing the current spec. |
|||
►
Sign in to add a comment |
|||
Comment 1 by viswa.karala@chromium.org
, Jun 13 2018