add basic support for KHR_parallel_shader_compile
We're just detecting the extension here, not making use of it.
This commit is contained in:
committed by
Mathias Agopian
parent
fed69025d2
commit
bee8862897
@@ -480,6 +480,7 @@ void OpenGLContext::initExtensionsGLES() noexcept {
|
||||
ext.EXT_texture_cube_map_array = exts.has("GL_EXT_texture_cube_map_array"sv) || exts.has("GL_OES_texture_cube_map_array"sv);
|
||||
ext.GOOGLE_cpp_style_line_directive = exts.has("GL_GOOGLE_cpp_style_line_directive"sv);
|
||||
ext.KHR_debug = exts.has("GL_KHR_debug"sv);
|
||||
ext.KHR_parallel_shader_compile = exts.has("GL_KHR_parallel_shader_compile"sv);
|
||||
ext.KHR_texture_compression_astc_hdr = exts.has("GL_KHR_texture_compression_astc_hdr"sv);
|
||||
ext.KHR_texture_compression_astc_ldr = exts.has("GL_KHR_texture_compression_astc_ldr"sv);
|
||||
ext.OES_depth_texture = exts.has("GL_OES_depth_texture"sv);
|
||||
@@ -544,6 +545,7 @@ void OpenGLContext::initExtensionsGL() noexcept {
|
||||
ext.EXT_texture_filter_anisotropic = exts.has("GL_EXT_texture_filter_anisotropic"sv);
|
||||
ext.EXT_texture_sRGB = exts.has("GL_EXT_texture_sRGB"sv);
|
||||
ext.GOOGLE_cpp_style_line_directive = exts.has("GL_GOOGLE_cpp_style_line_directive"sv);
|
||||
ext.KHR_parallel_shader_compile = exts.has("GL_KHR_parallel_shader_compile"sv);
|
||||
ext.KHR_texture_compression_astc_hdr = exts.has("GL_KHR_texture_compression_astc_hdr"sv);
|
||||
ext.KHR_texture_compression_astc_ldr = exts.has("GL_KHR_texture_compression_astc_ldr"sv);
|
||||
ext.OES_depth_texture = true;
|
||||
|
||||
@@ -212,6 +212,7 @@ public:
|
||||
bool EXT_texture_sRGB;
|
||||
bool GOOGLE_cpp_style_line_directive;
|
||||
bool KHR_debug;
|
||||
bool KHR_parallel_shader_compile;
|
||||
bool KHR_texture_compression_astc_hdr;
|
||||
bool KHR_texture_compression_astc_ldr;
|
||||
bool OES_depth_texture;
|
||||
|
||||
@@ -63,6 +63,9 @@ PFNGLCLIPCONTROLEXTPROC glClipControlEXT;
|
||||
#ifdef GL_EXT_discard_framebuffer
|
||||
PFNGLDISCARDFRAMEBUFFEREXTPROC glDiscardFramebufferEXT;
|
||||
#endif
|
||||
#ifdef GL_KHR_parallel_shader_compile
|
||||
PFNGLMAXSHADERCOMPILERTHREADSKHRPROC glMaxShaderCompilerThreadsKHR;
|
||||
#endif
|
||||
|
||||
#if defined(__ANDROID__) && !defined(FILAMENT_SILENCE_NOT_SUPPORTED_BY_ES2)
|
||||
// On Android, If we want to support a build system less than ANDROID_API 21, we need to
|
||||
@@ -109,6 +112,9 @@ void importGLESExtensionsEntryPoints() {
|
||||
#ifdef GL_EXT_discard_framebuffer
|
||||
getProcAddress(glDiscardFramebufferEXT, "glDiscardFramebufferEXT");
|
||||
#endif
|
||||
#ifdef GL_KHR_parallel_shader_compile
|
||||
getProcAddress(glMaxShaderCompilerThreadsKHR, "glMaxShaderCompilerThreadsKHR");
|
||||
#endif
|
||||
#if defined(__ANDROID__) && !defined(FILAMENT_SILENCE_NOT_SUPPORTED_BY_ES2)
|
||||
getProcAddress(glDispatchCompute, "glDispatchCompute");
|
||||
#endif
|
||||
|
||||
@@ -147,6 +147,9 @@ extern PFNGLGENVERTEXARRAYSOESPROC glGenVertexArraysOES;
|
||||
#ifdef GL_EXT_discard_framebuffer
|
||||
extern PFNGLDISCARDFRAMEBUFFEREXTPROC glDiscardFramebufferEXT;
|
||||
#endif
|
||||
#ifdef GL_KHR_parallel_shader_compile
|
||||
extern PFNGLMAXSHADERCOMPILERTHREADSKHRPROC glMaxShaderCompilerThreadsKHR;
|
||||
#endif
|
||||
#if defined(__ANDROID__) && !defined(FILAMENT_SILENCE_NOT_SUPPORTED_BY_ES2)
|
||||
extern PFNGLDISPATCHCOMPUTEPROC glDispatchCompute;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user