Переглянути джерело

fix // shader compilation

David Catuhe 6 роки тому
батько
коміт
82f839f4ad

+ 1 - 0
inspector/src/components/actionTabs/tabs/statisticsTabComponent.tsx

@@ -119,6 +119,7 @@ export class StatisticsTabComponent extends PaneComponent {
                     <BooleanLineComponent label="Vertex array object" value={caps.vertexArrayObject} />
                     <BooleanLineComponent label="Timer query" value={caps.timerQuery !== undefined} />
                     <BooleanLineComponent label="Stencil" value={engine.isStencilEnable} />
+                    <BooleanLineComponent label="Parallel shader compilation" value={caps.parallelShaderCompile != null} />
                     <ValueLineComponent label="Max textures units" value={caps.maxTexturesImageUnits} fractionDigits={0} />
                     <ValueLineComponent label="Max textures size" value={caps.maxTextureSize} fractionDigits={0} />
                     <ValueLineComponent label="Max anisotropy" value={caps.maxAnisotropy} fractionDigits={0} />

+ 0 - 6
src/Engines/engine.ts

@@ -176,8 +176,6 @@ export class EngineCapabilities {
     public canUseTimestampForTimerQuery: boolean;
     /** Function used to let the system compiles shaders in background */
     public parallelShaderCompile: {
-        MAX_SHADER_COMPILER_THREADS_KHR: number;
-        maxShaderCompilerThreadsKHR: (thread: number) => void;
         COMPLETION_STATUS_KHR: number;
     };
 }
@@ -1476,10 +1474,6 @@ export class Engine {
 
         // Shader compiler threads
         this._caps.parallelShaderCompile = this._gl.getExtension('KHR_parallel_shader_compile');
-        if (this._caps.parallelShaderCompile) {
-            const threads = this._gl.getParameter(this._caps.parallelShaderCompile.MAX_SHADER_COMPILER_THREADS_KHR);
-            this._caps.parallelShaderCompile.maxShaderCompilerThreadsKHR(threads);
-        }
 
         // Depth Texture
         if (this._webGLVersion > 1) {