st/mesa: fix glReadBuffer() assertion failure
authorBrian Paul <brianp@vmware.com>
Thu, 7 Apr 2016 23:38:41 +0000 (17:38 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 8 Apr 2016 15:49:05 +0000 (09:49 -0600)
commit4420f189b6d6dd68b517cd73dfdf3775d7d0f580
treef205f4e30d59ec5ff23fc6ba8714a2543aaef681
parentb9855dcdf7c94605305d6372d1f9883f76d10b6a
st/mesa: fix glReadBuffer() assertion failure

If the first call in a GL app is glReadPixels(GL_FRONT) we'd fail the
assert(st->ctx->FragmentProgram._Current) at st_atom_shader.c:114 in
update_fp().

This is because we were calling st_validate_state() without first
updating Mesa state with _mesa_update_state().

The regression came from commit 83b589301f4a150f4 "st/mesa: fix
frontbuffer glReadPixels regressions".

The new piglit gl-1.0-simple-readbuffer test exercises this.

Cc: "11.1 11.2" <mesa-stable@lists.freedesktop.org>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
src/mesa/state_tracker/st_cb_fbo.c