Skip to content

Commit 0e5b3a8

Browse files
authored
Allow-list 7 more WebGL extensions (#21185)
These 6 extensions don't add any entry points, so shouldn't require any Emscripten support (aside from having any enums present in gl2ext.h, which they do): - EXT_conservative_depth - NV_shader_noperspective_interpolation - EXT_depth_clamp - WEBGL_blend_func_extended - WEBGL_compressed_texture_etc - WEBGL_compressed_texture_etc1 Finally: - WEBGL_compressed_texture_astc does add an entry point getSupportedProfiles() in WebGL. This is a WEBGL_ extension, so it is still safe to allow-list without implementing a C version of that function. There is no corresponding GLES entry point for this; instead, profile support is indicated by the presence of KHR_texture_compression_astc_{ldr,hdr}. Emscripten should emulate those extensions by checking getSupportedProfiles(), but I haven't implemented this. Applications can still use the WEBGL_ version directly. WEBGL_compressed_texture_astc guarantees support for the LDR profile (since HDR is a superset of LDR, and there are only two profiles), so applications that only need LDR don't need to call this function. It can also be easily called using EM_ASM in applications that do use the HDR profile. Fixes #21183
1 parent ce5114b commit 0e5b3a8

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/library_webgl.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,25 @@ for (/**@suppress{duplicate}*/var i = 0; i < {{{ GL_POOL_TEMP_BUFFERS_SIZE }}};
162162
#if MAX_WEBGL_VERSION >= 2
163163
// WebGL 2 extensions
164164
'EXT_color_buffer_float',
165+
'EXT_conservative_depth',
165166
'EXT_disjoint_timer_query_webgl2',
166167
'EXT_texture_norm16',
168+
'NV_shader_noperspective_interpolation',
167169
'WEBGL_clip_cull_distance',
168170
#endif
169171
// WebGL 1 and WebGL 2 extensions
170172
'EXT_color_buffer_half_float',
173+
'EXT_depth_clamp',
171174
'EXT_float_blend',
172175
'EXT_texture_compression_bptc',
173176
'EXT_texture_compression_rgtc',
174177
'EXT_texture_filter_anisotropic',
175178
'KHR_parallel_shader_compile',
176179
'OES_texture_float_linear',
180+
'WEBGL_blend_func_extended',
181+
'WEBGL_compressed_texture_astc',
182+
'WEBGL_compressed_texture_etc',
183+
'WEBGL_compressed_texture_etc1',
177184
'WEBGL_compressed_texture_s3tc',
178185
'WEBGL_compressed_texture_s3tc_srgb',
179186
'WEBGL_debug_renderer_info',

0 commit comments

Comments
 (0)