radeonsi: support thread-safe shaders shared by multiple contexts
authorMarek Olšák <marek.olsak@amd.com>
Tue, 6 Oct 2015 23:48:18 +0000 (01:48 +0200)
committerMarek Olšák <marek.olsak@amd.com>
Tue, 20 Oct 2015 10:51:51 +0000 (12:51 +0200)
commit9b54ce3362f117b4d46497b578211bb26554dd78
tree147c05c7e33aff01d0a983e73f9c6b78ebe5ae15
parente57dd7a08bfeacab47d64c3adeb392f8c15ca793
radeonsi: support thread-safe shaders shared by multiple contexts

The "current" shader pointer is moved from the CSO to the context, so that
the CSO is mostly immutable.

The only drawback is that the "current" pointer isn't saved when unbinding
a shader and it must be looked up when the shader is bound again.

This is also a prerequisite for multithreaded shader compilation.

Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/drivers/radeonsi/si_blit.c
src/gallium/drivers/radeonsi/si_debug.c
src/gallium/drivers/radeonsi/si_descriptors.c
src/gallium/drivers/radeonsi/si_pipe.c
src/gallium/drivers/radeonsi/si_pipe.h
src/gallium/drivers/radeonsi/si_shader.h
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/radeonsi/si_state_draw.c
src/gallium/drivers/radeonsi/si_state_shaders.c