/** For GL_ARB_pipeline_statistics_query */
#define MAX_PIPELINE_STATISTICS 11
+/** For GL_ARB_tessellation_shader */
+/*@{*/
+#define MAX_TESS_GEN_LEVEL 64
+#define MAX_PATCH_VERTICES 32
+#define MAX_TESS_PATCH_COMPONENTS 120
+#define MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 4096
+/*@}*/
+
/*
* Color channel component order
*
/** GL_KHR_context_flush_control */
consts->ContextReleaseBehavior = GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH;
+
+ /** GL_ARB_tessellation_shader */
+ consts->MaxTessGenLevel = MAX_TESS_GEN_LEVEL;
+ consts->MaxPatchVertices = MAX_PATCH_VERTICES;
+ consts->Program[MESA_SHADER_TESS_CTRL].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ consts->Program[MESA_SHADER_TESS_EVAL].MaxTextureImageUnits = MAX_TEXTURE_IMAGE_UNITS;
+ consts->MaxTessPatchComponents = MAX_TESS_PATCH_COMPONENTS;
+ consts->MaxTessControlTotalOutputComponents = MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS;
}
GLenum ContextReleaseBehavior;
struct gl_shader_compiler_options ShaderCompilerOptions[MESA_SHADER_STAGES];
+
+ /** GL_ARB_tessellation_shader */
+ GLuint MaxPatchVertices;
+ GLuint MaxTessGenLevel;
+ GLuint MaxTessPatchComponents;
+ GLuint MaxTessControlTotalOutputComponents;
};
*/
struct gl_shader_compiler_options options;
gl_shader_stage sh;
+ int i;
memset(&options, 0, sizeof(options));
options.MaxUnrollIterations = 32;
/* Extended for ARB_separate_shader_objects */
ctx->Shader.RefCount = 1;
mtx_init(&ctx->Shader.Mutex, mtx_plain);
+
+ ctx->TessCtrlProgram.patch_vertices = 3;
+ for (i = 0; i < 4; ++i)
+ ctx->TessCtrlProgram.patch_default_outer_level[i] = 1.0;
+ for (i = 0; i < 2; ++i)
+ ctx->TessCtrlProgram.patch_default_inner_level[i] = 1.0;
}