llvmpipe: warn about illegal use of objects in different contexts
authorRoland Scheidegger <sroland@vmware.com>
Tue, 19 Jan 2016 23:48:07 +0000 (00:48 +0100)
committerRoland Scheidegger <sroland@vmware.com>
Wed, 20 Jan 2016 23:09:55 +0000 (00:09 +0100)
commitdc8b9bd0aae1b1bae89edda517ffe5c83b759552
tree5f47e474142044a55811c36a3117e68ad4de0664
parente925ec881128651b97ba747f644e921597a1c209
llvmpipe: warn about illegal use of objects in different contexts

Doing that is clearly a bug. We can't quite assert as st/mesa may hit this,
but increase at least visibility of it a bit.
(For the non-refcounted objects it would be illegal too, but we can't detect
that unless we'd store the context ourselves. Plus, those don't tend to cause
random crashes at context or object destruction time... So just sampler views,
surfaces and so targets for now.)

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/gallium/drivers/llvmpipe/lp_state_sampler.c
src/gallium/drivers/llvmpipe/lp_state_so.c
src/gallium/drivers/llvmpipe/lp_state_surface.c