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

Implement EXT_frag_depth extension #26341

Closed
jdm opened this issue Apr 28, 2020 · 10 comments
Closed

Implement EXT_frag_depth extension #26341

jdm opened this issue Apr 28, 2020 · 10 comments

Comments

@jdm
Copy link
Member

@jdm jdm commented Apr 28, 2020

https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/

There are no new constants or APIs. All it requires is checking if the underlying extension is supported, which we should be able to copy from Gecko: https://searchfox.org/mozilla-central/source/dom/canvas/WebGLExtensionFragDepth.cpp#19-29

@jdm
Copy link
Member Author

@jdm jdm commented Apr 28, 2020

@jdm
Copy link
Member Author

@jdm jdm commented Apr 28, 2020

We will also need to enable the EXT_frag_depth field of

let mut params = BuiltInResources {
as well.

@jdm
Copy link
Member Author

@jdm jdm commented May 4, 2020

#22112 is a good model showing how to implement a new WebGL extension.

@PeterZhizhin
Copy link
Contributor

@PeterZhizhin PeterZhizhin commented May 6, 2020

@highfive: assign me

@highfive highfive added the C-assigned label May 6, 2020
@highfive
Copy link

@highfive highfive commented May 6, 2020

Hey @PeterZhizhin! Thanks for your interest in working on this issue. It's now assigned to you!

@PeterZhizhin
Copy link
Contributor

@PeterZhizhin PeterZhizhin commented May 8, 2020

Sorry, please unassign me. I will have time to return back to this problem after the 20th of May.

@CYBAI CYBAI removed the C-assigned label May 8, 2020
@splav
Copy link
Contributor

@splav splav commented May 10, 2020

@highfive: assign me

@highfive highfive added the C-assigned label May 10, 2020
@highfive
Copy link

@highfive highfive commented May 10, 2020

Hey @splav! Thanks for your interest in working on this issue. It's now assigned to you!

@splav
Copy link
Contributor

@splav splav commented May 10, 2020

Hi! I've a question:
Does servo always use ANGLE to translate shaders? Is it safe to assume that if the feature is supported somehow - it's supported in WebGL?

According to Gecko code ( https://searchfox.org/mozilla-central/source/gfx/gl/GLContextFeatures.cpp#142 ) the feature is assumed to be supported if we have GL > 2 or GLES > 3 or extension. This logic could be replicated.

Alternatively, we could test GLSL version. It should be 1.10+ for GL ( https://www.khronos.org/registry/OpenGL-Refpages/gl4/html/gl_FragDepth.xhtml ) and 3.00+ for GLES ( https://www.khronos.org/registry/webgl/extensions/EXT_frag_depth/ ) . I'd prefer this option - it seems to be more explicit, since this is a shading language feature.

@jdm
Copy link
Member Author

@jdm jdm commented May 10, 2020

Yes, ANGLE is always used to translate shaders.

@splav splav mentioned this issue May 11, 2020
3 of 5 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

5 participants
You can’t perform that action at this time.