-
Notifications
You must be signed in to change notification settings - Fork 3
Labels
bugSomething isn't workingSomething isn't working
Description
Problem
Some calls to context.getParameter() in the WebGL2 context in JSAR are returning the wrong JS type or an invalid value in critical conformance cases. For example:
- getParameter(context.RASTERIZER_DISCARD) should return a
boolean(false by default), but isundefined - getParameter(context.SAMPLE_ALPHA_TO_COVERAGE) and getParameter(context.SAMPLE_COVERAGE) should return booleans
- getParameter(context.MAX_3D_TEXTURE_SIZE), getParameter(context.UNIFORM_BUFFER_OFFSET_ALIGNMENT), and similar should be non-undefined numbers (integer >= minimum)
- Certain parameters are NOT being returned as instances of Number or Boolean as required, but are
undefinedor wrong type
Notable FAIL cases
- context.getParameter(context.MAX_3D_TEXTURE_SIZE) should be >= 256. Was undefined
- context.getParameter(context.MAX_3D_TEXTURE_SIZE) is not an instance of Number
- context.getParameter(context.UNIFORM_BUFFER_OFFSET_ALIGNMENT) should be >= 1. Was undefined
- context.getParameter(context.UNIFORM_BUFFER_OFFSET_ALIGNMENT) is not an instance of Number
- context.getParameter(context.RASTERIZER_DISCARD) should be false (boolean) Was undefined
- Similar errors on other boolean/numeric parameters
Expected Behavior
All type checks per WebGL2 and WebGL1 spec should pass: the returned value should always be of the correct type (Boolean, Number) and value as defined. Never undefined.
Impact
- Fails conformance and type safety tests
- Might break application logic depending on typeof/value checks
References
Suggested Actions
- Audit
getParameterimplementation for value and type safety - Match Chromium mapping for Number and Boolean return values
- Expand regression tests for typeof/instance conformance
Category: WebGL2 API type & value conformance
Copilot
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working