KhronosGroup / KhronosGroup/WebGL
getShaderPrecisionFormat conformance test not sufficient
- Dominant language
- HTML
- Stars
- 2.9k
- Forks
- 703
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 4
Description
Safari is hard coded to just return desktop values for `getShaderPrecisionFormat`.
https://trac.webkit.org/browser/webkit/trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp#L362
It seems like the getShaderPrecisionFormat test needs to test by actually rendering. If the implementation says for mediump float that precision is 23, rangeMin is 127 and rangeMax is 127 then basically just try to render something that's out of range for an typical meduimp value and see that you don't get that value back.
As it is apparently the only way for an app to test if mediump really gets mediump is to do that test themselves since asking via `getShaderPrecisionFormat` will fail to tell you on iOS.
Contributor guide
Research direction
Start with the linked Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLBase.cpp implementation and the existing getShaderPrecisionFormat conformance coverage. Determine how to exercise the reported mediump limits through rendering; done when the test detects implementations that report desktop precision while behaving differently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- html
- Domain
- computer-graphics, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100