Kenneth Graunke <kenn...@whitecape.org> writes: > Applications may delete a shader program, create a new one, and bind it > before the next draw. With terrible luck, malloc may randomly return a > chunk of memory for the new gl_program that happened to be the exact > same pointer as our previously bound gl_program. In this case, our > logic to detect new programs in brw_upload_pipeline_state() would break: > > if (brw->vertex_program != ctx->VertexProgram._Current) { > brw->vertex_program = ctx->VertexProgram._Current; > brw->ctx.NewDriverState |= BRW_NEW_VERTEX_PROGRAM; > } > > Because the pointer is the same, we'd think it was the same program. > But it could be wildly different - a different stage altogether, > different sets of resources, and so on. This causes utter chaos.
Any reason you're not just using _mesa_reference_program()?
signature.asc
Description: PGP signature
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev