Changeset 254400 in webkit


Ignore:
Timestamp:
Jan 11, 2020 9:42:01 AM (4 years ago)
Author:
dino@apple.com
Message:

[WebGL] Clarify USE_OPENGL_ES_3
https://bugs.webkit.org/show_bug.cgi?id=206081
<rdar://problem/58486798>

Reviewed by Simon Fraser.

Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
and that the availability of OpenGL ES 3 is a separate query.

.:

  • Source/cmake/OptionsFTW.cmake:
  • Source/cmake/OptionsWPE.cmake:
  • Source/cmake/OptionsWinCairo.cmake:

Source/WebCore:

  • platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:

Source/WTF:

  • wtf/Platform.h:
Location:
trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r254333 r254400  
     12020-01-10  Dean Jackson  <dino@apple.com>
     2
     3        [WebGL] Clarify USE_OPENGL_ES_3
     4        https://bugs.webkit.org/show_bug.cgi?id=206081
     5        <rdar://problem/58486798>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
     10        and that the availability of OpenGL ES 3 is a separate query.
     11
     12        * Source/cmake/OptionsFTW.cmake:
     13        * Source/cmake/OptionsWPE.cmake:
     14        * Source/cmake/OptionsWinCairo.cmake:
     15
    1162020-01-10  Carlos Garcia Campos  <cgarcia@igalia.com>
    217
  • trunk/Source/WTF/ChangeLog

    r254394 r254400  
     12020-01-10  Dean Jackson  <dino@apple.com>
     2
     3        [WebGL] Clarify USE_OPENGL_ES_3
     4        https://bugs.webkit.org/show_bug.cgi?id=206081
     5        <rdar://problem/58486798>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
     10        and that the availability of OpenGL ES 3 is a separate query.
     11
     12        * wtf/Platform.h:
     13
    1142020-01-11  Yusuke Suzuki  <ysuzuki@apple.com>
    215
  • trunk/Source/WTF/wtf/Platform.h

    r254317 r254400  
    11191119#if PLATFORM(MAC) || (PLATFORM(MACCATALYST) && __has_include(<OpenGL/OpenGL.h>))
    11201120#define USE_OPENGL 1
    1121 #define USE_OPENGL_3 1
    11221121#define USE_OPENGL_ES 0
    1123 #define USE_OPENGL_ES_3 0
    11241122#define USE_ANGLE 0
    11251123#else
    11261124#define USE_OPENGL 0
    1127 #define USE_OPENGL_3 0
    11281125#define USE_OPENGL_ES 1
    1129 #define USE_OPENGL_ES_3 1
    11301126#define USE_ANGLE 0
    11311127#endif
     
    11341130#define GL_SILENCE_DEPRECATION 1
    11351131#endif
     1132#if USE(OPENGL) && !defined(HAVE_OPENGL_4)
     1133#define HAVE_OPENGL_4 1
     1134#endif
     1135#if USE(OPENGL_ES) && !defined(HAVE_OPENGL_ES_3)
     1136#define HAVE_OPENGL_ES_3 1
     1137#endif
     1138#endif
     1139#if USE_ANGLE && (USE_OPENGL || USE_OPENGL_ES)
     1140#error USE_ANGLE is incompatible with USE_OPENGL and USE_OPENGL_ES
    11361141#endif
    11371142#endif
  • trunk/Source/WebCore/ChangeLog

    r254388 r254400  
     12020-01-10  Dean Jackson  <dino@apple.com>
     2
     3        [WebGL] Clarify USE_OPENGL_ES_3
     4        https://bugs.webkit.org/show_bug.cgi?id=206081
     5        <rdar://problem/58486798>
     6
     7        Reviewed by Simon Fraser.
     8
     9        Make it clear that USE_ANGLE | USE_OPENGL | USE_OPENGL_ES are exclusive,
     10        and that the availability of OpenGL ES 3 is a separate query.
     11
     12        * platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp:
     13
    1142020-01-10  Zalan Bujtas  <zalan@apple.com>
    215
  • trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp

    r254214 r254400  
    18331833}
    18341834
     1835void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
     1836{
     1837    makeContextCurrent();
     1838    gl::CopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
     1839}
     1840
     1841void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access)
     1842{
     1843    makeContextCurrent();
     1844    return gl::MapBufferRange(target, offset, length, access);
     1845}
     1846
     1847GCGLboolean GraphicsContextGLOpenGL::unmapBuffer(GCGLenum target)
     1848{
     1849    makeContextCurrent();
     1850    return gl::UnmapBuffer(target);
     1851}
     1852
     1853void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params)
     1854{
     1855    makeContextCurrent();
     1856    gl::GetInternalformativ(target, internalformat, pname, bufSize, params);
     1857}
     1858
     1859void GraphicsContextGLOpenGL::renderbufferStorageMultisample(GCGLenum target, GCGLsizei samples, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
     1860{
     1861    makeContextCurrent();
     1862    gl::RenderbufferStorageMultisample(target, samples, internalformat, width, height);
     1863}
     1864
     1865void GraphicsContextGLOpenGL::texStorage2D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height)
     1866{
     1867    makeContextCurrent();
     1868    gl::TexStorage2D(target, levels, internalformat, width, height);
     1869    m_state.textureSeedCount.add(m_state.currentBoundTexture());
     1870}
     1871
     1872void GraphicsContextGLOpenGL::texStorage3D(GCGLenum target, GCGLsizei levels, GCGLenum internalformat, GCGLsizei width, GCGLsizei height, GCGLsizei depth)
     1873{
     1874    makeContextCurrent();
     1875    gl::TexStorage3D(target, levels, internalformat, width, height, depth);
     1876    m_state.textureSeedCount.add(m_state.currentBoundTexture());
     1877}
     1878
     1879void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params)
     1880{
     1881    ASSERT(program);
     1882    makeContextCurrent();
     1883
     1884    gl::GetActiveUniformsiv(program, uniformIndices.size(), uniformIndices.data(), pname, params.data());
     1885}
     1886
     1887GCGLuint GraphicsContextGLOpenGL::getUniformBlockIndex(PlatformGLObject program, const String& uniformBlockName)
     1888{
     1889    UNUSED_PARAM(program);
     1890    UNUSED_PARAM(uniformBlockName);
     1891
     1892    return 0;
     1893}
     1894
     1895void GraphicsContextGLOpenGL::getActiveUniformBlockiv(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLenum pname, GCGLint* params)
     1896{
     1897    UNUSED_PARAM(program);
     1898    UNUSED_PARAM(uniformBlockIndex);
     1899    UNUSED_PARAM(pname);
     1900    UNUSED_PARAM(params);
     1901}
     1902
     1903String GraphicsContextGLOpenGL::getActiveUniformBlockName(PlatformGLObject program, GCGLuint uniformBlockIndex)
     1904{
     1905    UNUSED_PARAM(program);
     1906    UNUSED_PARAM(uniformBlockIndex);
     1907
     1908    return emptyString();
     1909}
     1910
     1911void GraphicsContextGLOpenGL::uniformBlockBinding(PlatformGLObject program, GCGLuint uniformBlockIndex, GCGLuint uniformBlockBinding)
     1912{
     1913    UNUSED_PARAM(program);
     1914    UNUSED_PARAM(uniformBlockIndex);
     1915    UNUSED_PARAM(uniformBlockBinding);
     1916}
     1917
    18351918}
    18361919
  • trunk/Source/WebCore/platform/graphics/opengl/GraphicsContextGLOpenGLCommon.cpp

    r254350 r254400  
    20102010}
    20112011
    2012 #if USE(OPENGL) && ENABLE(WEBGL2)
     2012#if HAVE(OPENGL_4) && ENABLE(WEBGL2)
    20132013void GraphicsContextGLOpenGL::primitiveRestartIndex(GCGLuint index)
    20142014{
     
    20362036}
    20372037
    2038 #if USE(OPENGL_3) || USE(OPENGL_ES_3)
     2038#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
    20392039void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum readTarget, GCGLenum writeTarget, GCGLintptr readOffset, GCGLintptr writeOffset, GCGLsizeiptr size)
    20402040{
     
    20422042    ::glCopyBufferSubData(readTarget, writeTarget, readOffset, writeOffset, size);
    20432043}
    2044 #else
     2044#elif !USE(ANGLE)
    20452045void GraphicsContextGLOpenGL::copyBufferSubData(GCGLenum, GCGLenum, GCGLintptr, GCGLintptr, GCGLsizeiptr)
    20462046{
     
    20572057}
    20582058
    2059 #if USE(OPENGL_3) || USE(OPENGL_ES_3)
     2059#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
    20602060void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum target, GCGLintptr offset, GCGLsizeiptr length, GCGLbitfield access)
    20612061{
     
    20692069    return ::glUnmapBuffer(target);
    20702070}
    2071 #else
     2071#elif !USE(ANGLE)
    20722072void* GraphicsContextGLOpenGL::mapBufferRange(GCGLenum, GCGLintptr, GCGLsizeiptr, GCGLbitfield)
    20732073{
     
    21252125}
    21262126
    2127 #if USE(OPENGL_3) || USE(OPENGL_ES_3)
     2127#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
    21282128void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum target, GCGLenum internalformat, GCGLenum pname, GCGLsizei bufSize, GCGLint* params)
    21292129{
     
    21592159    m_state.textureSeedCount.add(m_state.currentBoundTexture());
    21602160}
    2161 #else
     2161#elif !USE(ANGLE)
    21622162void GraphicsContextGLOpenGL::getInternalformativ(GCGLenum, GCGLenum, GCGLenum, GCGLsizei, GCGLint*)
    21632163{
     
    27492749}
    27502750
    2751 #if USE(OPENGL_3) || USE(OPENGL_ES_3)
     2751#if HAVE(OPENGL_4) || HAVE(OPENGL_ES_3)
    27522752void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject program, const Vector<GCGLuint>& uniformIndices, GCGLenum pname, Vector<GCGLint>& params)
    27532753{
     
    27882788    UNUSED_PARAM(uniformBlockBinding);
    27892789}
    2790 #else
     2790#elif !USE(ANGLE)
    27912791void GraphicsContextGLOpenGL::getActiveUniforms(PlatformGLObject, const Vector<GCGLuint>&, GCGLenum, Vector<GCGLint>&)
    27922792{
  • trunk/Source/cmake/OptionsFTW.cmake

    r254103 r254400  
    246246SET_AND_EXPOSE_TO_BUILD(USE_EXPORT_MACROS ON)
    247247SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
    248 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 ON)
     248SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 ON)
    249249SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
    250250SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
  • trunk/Source/cmake/OptionsWPE.cmake

    r254121 r254400  
    190190SET_AND_EXPOSE_TO_BUILD(USE_LIBWPE TRUE)
    191191SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES TRUE)
    192 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 TRUE)
     192SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 TRUE)
    193193SET_AND_EXPOSE_TO_BUILD(USE_WPE_RENDERER TRUE)
    194194SET_AND_EXPOSE_TO_BUILD(USE_XDGMIME TRUE)
  • trunk/Source/cmake/OptionsWinCairo.cmake

    r254103 r254400  
    3939SET_AND_EXPOSE_TO_BUILD(USE_EGL ON)
    4040SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES ON)
    41 SET_AND_EXPOSE_TO_BUILD(USE_OPENGL_ES_3 ON)
     41SET_AND_EXPOSE_TO_BUILD(HAVE_OPENGL_ES_3 ON)
    4242SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER ON)
    4343SET_AND_EXPOSE_TO_BUILD(USE_TEXTURE_MAPPER_GL ON)
Note: See TracChangeset for help on using the changeset viewer.