Changeset 261769 in webkit
- Timestamp:
- May 15, 2020 4:57:24 PM (4 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r261767 r261769 1 2020-05-15 Kenneth Russell <kbr@chromium.org> 2 3 OES_texture_float internal format conversion must depend on WEBGL_color_buffer_float 4 https://bugs.webkit.org/show_bug.cgi?id=211971 5 6 Reviewed by Dean Jackson. 7 8 Only adjust the internal formats of textures created for the WebGL 9 1.0 OES_texture_float extension if the WEBGL_color_buffer_float 10 extension has been enabled. 11 12 Covered by the WebGL 1.0 OES_texture_float conformance tests when 13 run on iOS with another forthcoming fix to ANGLE which will enable 14 the OES_texture_float extension on that platform. 15 16 * platform/graphics/angle/ExtensionsGLANGLE.cpp: 17 (WebCore::ExtensionsGLANGLE::ensureEnabled): 18 (WebCore::ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat): 19 * platform/graphics/angle/ExtensionsGLANGLE.h: 20 * platform/graphics/angle/GraphicsContextGLANGLE.cpp: 21 (WebCore::GraphicsContextGLOpenGL::texImage2DDirect): 22 1 23 2020-05-15 Oriol Brufau <obrufau@igalia.com> 2 24 -
trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.cpp
r260908 r261769 88 88 gl::RequestExtensionANGLE(name.ascii().data()); 89 89 m_enabledExtensions.add(name); 90 91 if (name == "GL_CHROMIUM_color_buffer_float_rgba"_s) 92 m_webglColorBufferFloatRGBA = true; 93 else if (name == "GL_CHROMIUM_color_buffer_float_rgb"_s) 94 m_webglColorBufferFloatRGB = true; 90 95 } 91 96 } … … 250 255 { 251 256 // The implementation of WEBGL_color_buffer_float for WebGL 1.0 / ES 2.0 requires a sized 252 // internal format. Adjust it if necessary at this lowest level. Note that it does not matter at 253 // this point whether the WEBGL_color_buffer_float extension has actually been enabled at higher 254 // levels; the enum will be valid or invalid either way. 257 // internal format. Adjust it if necessary at this lowest level. 255 258 if (type == GL_FLOAT) { 256 if ( format == GL_RGBA && internalformat == GL_RGBA)259 if (m_webglColorBufferFloatRGBA && format == GL_RGBA && internalformat == GL_RGBA) 257 260 return GL_RGBA32F; 258 if ( format == GL_RGB && internalformat == GL_RGB)261 if (m_webglColorBufferFloatRGB && format == GL_RGB && internalformat == GL_RGB) 259 262 return GL_RGB32F; 260 263 } -
trunk/Source/WebCore/platform/graphics/angle/ExtensionsGLANGLE.h
r260908 r261769 149 149 150 150 // Only for non-WebGL 2.0 contexts. 151 staticGCGLenum adjustWebGL1TextureInternalFormat(GCGLenum internalformat, GCGLenum format, GCGLenum type);151 GCGLenum adjustWebGL1TextureInternalFormat(GCGLenum internalformat, GCGLenum format, GCGLenum type); 152 152 153 153 private: … … 175 175 String m_vendor; 176 176 String m_renderer; 177 178 // Whether the WebGL 1.0-related floating-point renderability extensions have been enabled. 179 bool m_webglColorBufferFloatRGB { false }; 180 bool m_webglColorBufferFloatRGBA { false }; 177 181 }; 178 182 -
trunk/Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp
r261639 r261769 1889 1889 { 1890 1890 makeContextCurrent(); 1891 if (!m_isForWebGL2 )1892 internalformat = ExtensionsGLANGLE::adjustWebGL1TextureInternalFormat(internalformat, format, type);1891 if (!m_isForWebGL2 && m_extensions) 1892 internalformat = m_extensions->adjustWebGL1TextureInternalFormat(internalformat, format, type); 1893 1893 gl::TexImage2D(target, level, internalformat, width, height, border, format, type, pixels); 1894 1894 m_state.textureSeedCount.add(m_state.currentBoundTexture());
Note: See TracChangeset
for help on using the changeset viewer.