}
struct gl_shader *
-_mesa_new_shader(struct gl_context *ctx, GLuint name, GLenum type)
+_mesa_new_shader(GLuint name, gl_shader_stage stage)
{
struct gl_shader *shader;
- (void) ctx;
-
- assert(type == GL_FRAGMENT_SHADER || type == GL_VERTEX_SHADER);
+ assert(stage == MESA_SHADER_FRAGMENT || stage == MESA_SHADER_VERTEX);
shader = rzalloc(NULL, struct gl_shader);
if (shader) {
- shader->Type = type;
- shader->Stage = _mesa_shader_enum_to_shader_stage(type);
+ shader->Stage = stage;
shader->Name = name;
shader->RefCount = 1;
}
return shader;
}
+struct gl_linked_shader *
+_mesa_new_linked_shader(gl_shader_stage stage)
+{
+ struct gl_linked_shader *shader;
+
+ assert(stage == MESA_SHADER_FRAGMENT || stage == MESA_SHADER_VERTEX);
+ shader = rzalloc(NULL, struct gl_linked_shader);
+ if (shader) {
+ shader->Stage = stage;
+ }
+ return shader;
+}
+
void
_mesa_delete_shader(struct gl_context *ctx, struct gl_shader *sh)
{
ralloc_free(sh);
}
+void
+_mesa_delete_linked_shader(struct gl_context *ctx,
+ struct gl_linked_shader *sh)
+{
+ ralloc_free(sh);
+}
+
void
_mesa_clear_shader_program_data(struct gl_shader_program *shProg)
{
ctx->Extensions.ARB_texture_query_lod = true;
ctx->Extensions.ARB_uniform_buffer_object = true;
ctx->Extensions.ARB_viewport_array = true;
+ ctx->Extensions.ARB_cull_distance = true;
ctx->Extensions.OES_EGL_image_external = true;
ctx->Extensions.OES_standard_derivatives = true;
ctx->Extensions.EXT_shader_integer_mix = true;
ctx->Extensions.EXT_texture_array = true;
+ ctx->Extensions.MESA_shader_integer_functions = true;
+
ctx->Extensions.NV_texture_rectangle = true;
ctx->Const.GLSLVersion = 120;