[Mesa-dev] [PATCH 2/7] mesa: don't use drivers NewShader function when creating shader objects

Timothy Arceri timothy.arceri at collabora.com
Tue Jun 28 01:52:45 UTC 2016


The drivers function only needs to be used when creating a struct for
linked shaders.
---
 src/mesa/main/shaderapi.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/shaderapi.c b/src/mesa/main/shaderapi.c
index 07250cd..142e750 100644
--- a/src/mesa/main/shaderapi.c
+++ b/src/mesa/main/shaderapi.c
@@ -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);
-- 
2.7.4



More information about the mesa-dev mailing list