[Mesa-dev] [PATCH 0/7] RadeonSI: Unbind shaders properly

Michel Dänzer michel at daenzer.net
Thu Oct 22 20:08:01 PDT 2015


On 23.10.2015 08:12, Marek Olšák wrote:
> This series unbinds shaders properly in bind_(vs/fs/etc.)_state, because any context can release them now, therefore we can't rely on unbinding in delete_shader. This is basically a fix for sharable shader.
> 
> It also gets rid of the dummy pixel shader. Instead, the driver just skips draw calls that have rasterizer_discard==0 and ps==NULL set at the same time. rasterizer_discard==1 and ps==NULL works as expected.
> 
> Please review.

Patches 1-5 are

Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>


Patches 6 & 7:

Shouldn't we leave sctx->emitted.named.* intact in si_bind_*_shader and
only clear those from si_delete_shader_selector/si_shader_destroy?
Otherwise we might keep re-emitting the same shader PM4 state if the app
/ state tracker keeps unbinding and re-binding the same shader.


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the mesa-dev mailing list