Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(shadertools): Port fp64 tests to GLSL 3.00 #1886

Merged
merged 1 commit into from
Dec 19, 2023
Merged

Conversation

ibgreen
Copy link
Collaborator

@ibgreen ibgreen commented Dec 18, 2023

For #

Background

  • I am working on a PR that drops support for GLSL 1.00 as the source language for luma.gl shaders. I will motivate this more fully in that PR, but basically to support WebGPU we need to embrace uniform buffers, which in WebGL requires GLSL 3.00, so we might as well write all our shader code in GLSL 3.00.
  • As I was porting GLSL 1.00 shaders and fragments in our source to GLSL 3.00, I came across the fp64 tests.
  • After I ported them, I got 5 new failures, just for subtractions.
  • Hoping this could be a clue for someone (GLSL 1.00 and GLSL 3.00 do something differently, different backends etc.)

Change List

  • Modify fp64 test shader
  • ignore the new failing test cases.

@ibgreen ibgreen marked this pull request as ready for review December 18, 2023 20:55
@ibgreen ibgreen merged commit 3a0091e into master Dec 19, 2023
2 checks passed
@ibgreen ibgreen deleted the ib/fp64-glsl3 branch December 19, 2023 12:15
@donmccurdy
Copy link
Collaborator

After I ported [the fp64 tests], I got 5 new failures, just for subtractions.

That's a very interesting find! I added this to the webkit discussion, and added a demo:

https://fp64-arithmetic.donmccurdy.com/?operator=sum_fp64&lang=GLSL+3.0

On my (Apple M2) device, GLSL 3 affects the test results only when ANGLE's OpenGL backend is enabled. After switching to the Metal backend, results are consistent (with many failures) for both GLSL 1 and GLSL 3.

@ibgreen
Copy link
Collaborator Author

ibgreen commented Dec 19, 2023

Looks like my Chrome chooses ANGLE by default so yes I believe that is the env in which I got these problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants