mesa: don't use drivers NewShader function when creating shader objects
authorTimothy Arceri <timothy.arceri@collabora.com>
Mon, 27 Jun 2016 06:10:35 +0000 (16:10 +1000)
committerTimothy Arceri <timothy.arceri@collabora.com>
Thu, 30 Jun 2016 06:51:25 +0000 (16:51 +1000)
The drivers function only needs to be used when creating a struct for
linked shaders.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
src/mesa/main/shaderapi.c

index 07250cd768c9d68d56b6f8fbdb4d7ea0d70d3ab3..142e75089df90f6c1c88daaca3983563648c6e51 100644 (file)
@@ -334,8 +334,7 @@ create_shader(struct gl_context *ctx, GLenum type)
 
    _mesa_HashLockMutex(ctx->Shared->ShaderObjects);
    name = _mesa_HashFindFreeKeyBlock(ctx->Shared->ShaderObjects, 1);
-   sh = ctx->Driver.NewShader(ctx, name,
-                              _mesa_shader_enum_to_shader_stage(type));
+   sh = _mesa_new_shader(ctx, name, _mesa_shader_enum_to_shader_stage(type));
    sh->Type = type;
    _mesa_HashInsertLocked(ctx->Shared->ShaderObjects, name, sh);
    _mesa_HashUnlockMutex(ctx->Shared->ShaderObjects);