[WebGL] Add all remaining WebGL2 implementation functions to GraphicsContextGL
<rdar://problem/58459051>
Created attachment 387278 [details] Patch
Comment on attachment 387278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387278&action=review > Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGL.h:365 > + // ========== WebGL 2 entry points. WebGL2 ? > Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2580 > + blank line gasp
Comment on attachment 387278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387278&action=review This is fine. Please wait for the EWS > Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2796 > +GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName) > +{ > + UNUSED_PARAM(program); > + UNUSED_PARAM(uniformBlockName); > + > + return 0; > +} > + > +void GraphicsContextGLOpenGL::getActiveUniformBlockiv(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLint* params) > +{ > + UNUSED_PARAM(program); > + UNUSED_PARAM(uniformBlockIndex); > + UNUSED_PARAM(pname); > + UNUSED_PARAM(params); > +} > + > +String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex) > +{ > + UNUSED_PARAM(program); > + UNUSED_PARAM(uniformBlockIndex); > + > + return emptyString(); > +} > + > +void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding) > +{ > + UNUSED_PARAM(program); > + UNUSED_PARAM(uniformBlockIndex); > + UNUSED_PARAM(uniformBlockBinding); > +} Even if its just a stub this should be wrapped too with the USE check since uniform block stuff is GL 3.1. Are we going to just assume that if its GL 3 that it has these functions or do we need additional USE checks?
Created attachment 387282 [details] EWS
Comment on attachment 387278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387278&action=review >> Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2796 >> +} > > Even if its just a stub this should be wrapped too with the USE check since uniform block stuff is GL 3.1. Are we going to just assume that if its GL 3 that it has these functions or do we need additional USE checks? I'm not sure what's best here. If you only have GL 3 and not GL 3.1+, is there any point trying to expose WebGL 2? Can it be emulated?
Comment on attachment 387278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387278&action=review >>> Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2796 >>> +} >> >> Even if its just a stub this should be wrapped too with the USE check since uniform block stuff is GL 3.1. Are we going to just assume that if its GL 3 that it has these functions or do we need additional USE checks? > > I'm not sure what's best here. If you only have GL 3 and not GL 3.1+, is there any point trying to expose WebGL 2? Can it be emulated? Oh, of course I'd still need the USE check. Sorry.
Comment on attachment 387278 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=387278&action=review >>>> Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2796 >>>> +} >>> >>> Even if its just a stub this should be wrapped too with the USE check since uniform block stuff is GL 3.1. Are we going to just assume that if its GL 3 that it has these functions or do we need additional USE checks? >> >> I'm not sure what's best here. If you only have GL 3 and not GL 3.1+, is there any point trying to expose WebGL 2? Can it be emulated? > > Oh, of course I'd still need the USE check. Sorry. The way it is now is confusing. USE_OPENGL_3 doesn't differentiate between 3 and 3.1, so it seems we already assume that is good enough. However, I think there is a difference between USE_OPENGL (which is deciding which backend to actually use) and USE_OPENGL_3 (which is signifying that it exists). I believe it should be HAS_OPENGL_3. But are there any platforms that we compile to that have OpenGL 3 or below?
(In reply to Dean Jackson from comment #8) > Comment on attachment 387278 [details] > Patch > > View in context: > https://bugs.webkit.org/attachment.cgi?id=387278&action=review > > >>>> Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:2796 > >>>> +} > >>> > >>> Even if its just a stub this should be wrapped too with the USE check since uniform block stuff is GL 3.1. Are we going to just assume that if its GL 3 that it has these functions or do we need additional USE checks? > >> > >> I'm not sure what's best here. If you only have GL 3 and not GL 3.1+, is there any point trying to expose WebGL 2? Can it be emulated? > > > > Oh, of course I'd still need the USE check. Sorry. > > The way it is now is confusing. > > USE_OPENGL_3 doesn't differentiate between 3 and 3.1, so it seems we already > assume that is good enough. > > However, I think there is a difference between USE_OPENGL (which is deciding > which backend to actually use) and USE_OPENGL_3 (which is signifying that it > exists). I believe it should be HAS_OPENGL_3. > > But are there any platforms that we compile to that have OpenGL 3 or below? Yea I agree that its confusing. I felt USE was probably safer because I'm not sure what sort of hardware Igalia was targeting with GTK and especially WPE since the later is embedded hardware and drivers might be crappy. There's also the fact that with ANGLE there are backends that don't have it. Metal and Vulkan appear to be a no from the README. DirectX 9 doesn't but for Windows we're just supporting Windows 10 at this point which would have 11. For our ports WinCairo and PlayStation just assuming OpenGL ES 3 is fine. I'd assume thats the same with Apple ports, minus AppleWin but fine for FTW. Maybe worth a discussion with Igalians somewhere to get consensus?
Committed r254350: <https://trac.webkit.org/changeset/254350>