r600g: force unbind of previously bind sampler/sampler_view
authorJerome Glisse <jglisse@redhat.com>
Thu, 2 Sep 2010 20:53:33 +0000 (16:53 -0400)
committerJerome Glisse <jglisse@redhat.com>
Thu, 2 Sep 2010 20:58:47 +0000 (16:58 -0400)
commitf8d11b2e8ebaab2845080900ff4a2068f9a20b5f
tree6dbafc5a4d2d11379dc1a2755b6e7739278035ae
parente746a6bb9a6c9f797d1b40ed22b2f296f8fa5aac
r600g: force unbind of previously bind sampler/sampler_view

Previously bind sampler/sampler_view can be converted and endup
overwritting the current state we want to schedule. Example :
bind texA texB to sampler_view[0] & sampler_view[1], render,
bind texB to sampler_view[0] render. Now state associated to
texB are set to configure sampler_view slot 0, but as we don't
unbind sampler_view[1] still point to texB state so we end up
with sampler_view[1] overwritting sampler_view[0], which gives
wrong rendering if next rendering bind texA to sampler_view[0],
it will endup as texB is bound to sampler_view[0]. If you are
not confuse at that point give me a call i will be buying you
beer.

Signed-off-by: Jerome Glisse <jglisse@redhat.com>
src/gallium/drivers/r600/r600_state.c
src/gallium/winsys/r600/drm/radeon_ctx.c