Brad King wrote:
> Hello,
>
> Several VTK tests have been failing when using depth peeling with the
> nightly mesa development tree. The tests die with an assertion failure
> inside mesa:
>
> main/context.c:632: delete_shader_cb: Assertion `shProg->Type == 0x9999'
> failed.
>
> I think the problem is in shader/shader_api.c in the function
> _mesa_delete_shader:
>
> sh->DeletePending = GL_TRUE;
> sh->RefCount--;
> if (sh->RefCount <= 0) {
> _mesa_free_shader(ctx, sh);
> }
>
> This deletes the shader object when the reference count reaches zero.
> However this fails to remove the ctx->Shared->ShaderObjects hash table
> entry for the shader. Later when the gl context is destroyed the line
>
> _mesa_HashDeleteAll(ss->ShaderObjects, delete_shader_cb, ctx);
>
> in main/context.c causes all hash table entry objects to be deleted.
> This attempts to delete the shader object again. Since the memory has
> been re-used the assertion fails of course. I fixed the problem in my
> own mesa checkout by adding the line:
>
> _mesa_HashRemove(ctx->Shared->ShaderObjects, shader);
>
> just after the _mesa_free_shader call above. I'm not sure that is quite
> the right place for it but hopefully a mesa dev can take it from here.
Coincidentally, I was working on that code today. I'll check in some
changes later today.
-Brian
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mesa3d-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/mesa3d-dev