st/mesa: fix texture image resource selection in st_render_texture()
authorBrian Paul <brianp@vmware.com>
Tue, 27 Jun 2017 15:36:19 +0000 (09:36 -0600)
committerBrian Paul <brianp@vmware.com>
Fri, 30 Jun 2017 19:37:10 +0000 (13:37 -0600)
commit95d5c48f68b598cfa6db25f44aac52b3e11403cc
tree20c2384847bd0a4ee7b50923fc270b550321d6f7
parentf4d5e55dd1cb4617ee18387d2aff337676b420c4
st/mesa: fix texture image resource selection in st_render_texture()

If we're rendering to an incomplete/inconsistent (cube) texture, the
different faces/levels of the texture may be stored in different
resources.  Before, we always used the texture object resource.  Now,
we use the texture image resource.  In normal circumstances, that's
the same resource.  But in some cases, such as the Piglit
fbo-incomplete-texture-03 test, the cube faces are in different
resources and we need to render to the texture image resource.

Fixes fbo-incomplete-texture-03 with VMware driver.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/state_tracker/st_cb_fbo.c