When using 4GB support, my understanding is that memory accesses are rewritten to use unsigned shifts. In library_webgl.js, glUniform4fv is rewritten from:
value >>= 2;
for (var i = 0; i < 4 * count; i += 4) {
var dst = value + i;
view[i] = heap[dst];
view[i + 1] = heap[dst + 1];
view[i + 2] = heap[dst + 2];
view[i + 3] = heap[dst + 3];
}
to:
value >>= 2;
for (var i = 0; i < 4 * count; i += 4) {
var dst = value + i;
view[i] = heap[dst >>> 0];
view[i + 1] = heap[dst + 1 >>> 0];
view[i + 2] = heap[dst + 2 >>> 0];
view[i + 3] = heap[dst + 3 >>> 0];
}
The memory accesses inside the loop look correct but should value >>= 2 be value >>>= 2? With value >>= 2, I get memory accesses that read out of bounds. Possibly the same issue here. Let me know if I'm misunderstanding the expected output.
When using 4GB support, my understanding is that memory accesses are rewritten to use unsigned shifts. In library_webgl.js, glUniform4fv is rewritten from:
to:
The memory accesses inside the loop look correct but should
value >>= 2bevalue >>>= 2? Withvalue >>= 2, I get memory accesses that read out of bounds. Possibly the same issue here. Let me know if I'm misunderstanding the expected output.