st/mesa: simplify lastLevel determination in st_finalize_texture
authorMarek Olšák <marek.olsak@amd.com>
Wed, 23 May 2018 18:41:25 +0000 (14:41 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Fri, 25 May 2018 20:31:36 +0000 (16:31 -0400)
commita4ba7cd6a2fc2718c3b4f9107d676ad1bfd02bf1
tree77797c8f17dd3b6dc091427463f72ad95641c2a9
parentd21c086d819d78fb3f6abcbb14aa492970f442aa
st/mesa: simplify lastLevel determination in st_finalize_texture

This fixes shader images where we always bind stObj->pt and not individual
gl_texture_images.

Roughly based on i965 commit 845ad2667ab2466752f06ea30bdb9c837116c308
which does a similar thing but for a different reason.

This fixes GL CTS assertion failures introduced by Ilia.

Cc: 18.0 18.1 <mesa-stable@lists.freedesktop.org>
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
src/mesa/state_tracker/st_cb_texture.c