[Webkit-unassigned] [Bug 197592] New: [WebGL] Safari doesn't handle common no attribute use case

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sat May 4 02:18:51 PDT 2019


https://bugs.webkit.org/show_bug.cgi?id=197592

            Bug ID: 197592
           Summary: [WebGL] Safari doesn't handle common no attribute use
                    case
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebGL
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: gman at chromium.org
                CC: dino at apple.com

When debugging WebGL or when explaining to discussing a feature it's best to make a "MINIMAL, Complete, Verifiable, Example"

For WebGL this often means using no attributes and just drawing a single POINT

Example:

-------
const gl = document.querySelector('canvas').getContext('webgl');

const vsrc = `
void main() {
  gl_PointSize = 128.0;
  gl_Position = vec4(0, 0, 0, 1);
}
`;

const fsrc = `
precision highp float;
void main() {
  gl_FragColor = vec4(1, 0, 0, 1);
}
`;

function createShader(gl, type, src) {
  const s = gl.createShader(type);
  gl.shaderSource(s, src);
  gl.compileShader(s);
  return s;
}

const prg = gl.createProgram();
gl.attachShader(prg, createShader(gl, gl.VERTEX_SHADER, vsrc));
gl.attachShader(prg, createShader(gl, gl.FRAGMENT_SHADER, fsrc));
gl.linkProgram(prg);

gl.useProgram(prg);
gl.clearColor(0, 0, 1, 1);
gl.clear(gl.COLOR_BUFFER_BIT);
gl.drawArrays(gl.POINTS, 0, 1);
-----

No attributes needed. This is great as it keeps the sample minimal so is perfect as a starting point for fragment shader based examples. I've used it 100s of times on Stack Overflow and other places to demonstrate WebGL solutions.

It incorrectly fails on Safari only

Here's the relevant conformance test

https://www.khronos.org/registry/webgl/sdk/tests/conformance/rendering/point-no-attributes.html?webglVersion=1&quiet=0

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190504/aa9486e9/attachment.html>


More information about the webkit-unassigned mailing list