st/mesa: fix sampler view reference counting bug in glDraw/CopyPixels
authorBrian Paul <brianp@vmware.com>
Wed, 18 Feb 2015 18:16:55 +0000 (11:16 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 19 Feb 2015 22:36:59 +0000 (15:36 -0700)
commit62a8883f32f8a4c8c7d85390d4b17986e4018edf
treedb793976ed2029a05fd49f72c56ff685def33e5f
parent89c96afe3c0acf8f2fccaf02da02945afe8ba5f3
st/mesa: fix sampler view reference counting bug in glDraw/CopyPixels

Use pipe_sampler_view_reference() instead of ordinary assignment.
Also add a new sanity check assertion.

Fixes piglit gl-1.0-drawpixels-color-index test crash.  But note
that the test still fails.

Cc: "10.4, 10.5" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/mesa/state_tracker/st_cb_drawpixels.c