glthread: track primitive restart state
[mesa.git] / src / mesa / main / hint.c
index 5d0c15d35abf47eadaa9842c47b9602ad1de153b..890be7b39c8f126a2df871ba910ab48d09bd2cb8 100644 (file)
@@ -28,7 +28,7 @@
 #include "enums.h"
 #include "context.h"
 #include "hint.h"
-#include "imports.h"
+
 #include "mtypes.h"
 
 
@@ -130,6 +130,17 @@ invalid_target:
    return;
 }
 
+/* GL_ARB_parallel_shader_compile */
+void GLAPIENTRY
+_mesa_MaxShaderCompilerThreadsKHR(GLuint count)
+{
+   GET_CURRENT_CONTEXT(ctx);
+
+   ctx->Hint.MaxShaderCompilerThreads = count;
+
+   if (ctx->Driver.SetMaxShaderCompilerThreads)
+      ctx->Driver.SetMaxShaderCompilerThreads(ctx, count);
+}
 
 /**********************************************************************/
 /*****                      Initialization                        *****/
@@ -146,4 +157,5 @@ void _mesa_init_hint( struct gl_context * ctx )
    ctx->Hint.TextureCompression = GL_DONT_CARE;
    ctx->Hint.GenerateMipmap = GL_DONT_CARE;
    ctx->Hint.FragmentShaderDerivative = GL_DONT_CARE;
+   ctx->Hint.MaxShaderCompilerThreads = 0xffffffff;
 }