#include "main/dispatch.h"
#include "main/enums.h"
#include "main/hash.h"
+#include "main/mfeatures.h"
+#include "main/mtypes.h"
#include "main/shaderapi.h"
#include "main/shaderobj.h"
#include "program/program.h"
#include "program/prog_uniform.h"
#include "talloc.h"
#include <stdbool.h>
+#include "../glsl/glsl_parser_extras.h"
/** Define this to enable shader substitution (see below) */
#define SHADER_SUBST 0
* are generated by the GLSL compiler.
*/
struct gl_shader_compiler_options options;
- GLuint i;
+ gl_shader_type sh;
memset(&options, 0, sizeof(options));
options.MaxUnrollIterations = 32;
/* Default pragma settings */
options.DefaultPragmas.Optimize = GL_TRUE;
- for(i = 0; i < MESA_SHADER_TYPES; ++i)
- memcpy(&ctx->ShaderCompilerOptions[i], &options, sizeof(options));
+ for (sh = 0; sh < MESA_SHADER_TYPES; ++sh)
+ memcpy(&ctx->ShaderCompilerOptions[sh], &options, sizeof(options));
ctx->Shader.Flags = get_shader_flags();
}
void GLAPIENTRY
_mesa_ReleaseShaderCompiler(void)
{
- GET_CURRENT_CONTEXT(ctx);
- _mesa_error(ctx, GL_INVALID_OPERATION, __FUNCTION__);
+ _mesa_destroy_shader_compiler_caches();
}
SET_BindFragDataLocationEXT(exec, _mesa_BindFragDataLocation);
SET_GetFragDataLocationEXT(exec, _mesa_GetFragDataLocation);
+ /* GL_ARB_ES2_compatibility */
+ SET_ReleaseShaderCompiler(exec, _mesa_ReleaseShaderCompiler);
+
#endif /* FEATURE_GL */
}