summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderobj.c
diff options
context:
space:
mode:
authorChristian König <[email protected]>2011-03-19 01:02:40 +0100
committerChristian König <[email protected]>2011-03-19 01:02:40 +0100
commit2bf95c519e755146704f4942b1703d47d18bfeaa (patch)
tree9d29c5d56014377013770615611f903cd5b25292 /src/mesa/main/shaderobj.c
parentf36846c77ee196881c0da560229279fc7ed88170 (diff)
parent8042d751debb7a8375e8bc587189fea9a5a8371d (diff)
Merge remote branch 'origin/master' into pipe-video
Conflicts: src/gallium/drivers/r600/r600_asm.c src/gallium/tests/unit/SConscript
Diffstat (limited to 'src/mesa/main/shaderobj.c')
-rw-r--r--src/mesa/main/shaderobj.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/mesa/main/shaderobj.c b/src/mesa/main/shaderobj.c
index 1d75845590f..33d91ad594d 100644
--- a/src/mesa/main/shaderobj.c
+++ b/src/mesa/main/shaderobj.c
@@ -72,7 +72,8 @@ _mesa_reference_shader(struct gl_context *ctx, struct gl_shader **ptr,
deleteFlag = (old->RefCount == 0);
if (deleteFlag) {
- _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ if (old->Name != 0)
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
ctx->Driver.DeleteShader(ctx, old);
}
@@ -213,7 +214,8 @@ _mesa_reference_shader_program(struct gl_context *ctx,
deleteFlag = (old->RefCount == 0);
if (deleteFlag) {
- _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
+ if (old->Name != 0)
+ _mesa_HashRemove(ctx->Shared->ShaderObjects, old->Name);
ctx->Driver.DeleteShaderProgram(ctx, old);
}
@@ -408,6 +410,5 @@ _mesa_init_shader_object_functions(struct dd_function_table *driver)
driver->DeleteShader = _mesa_delete_shader;
driver->NewShaderProgram = _mesa_new_shader_program;
driver->DeleteShaderProgram = _mesa_delete_shader_program;
- driver->CompileShader = _mesa_ir_compile_shader;
driver->LinkShader = _mesa_ir_link_shader;
}