diff options
author | marha <marha@users.sourceforge.net> | 2012-10-22 08:31:31 +0200 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-10-22 08:31:31 +0200 |
commit | b318686d7779dab877e5fb33b7d97034cf8f44a8 (patch) | |
tree | 8fd256304d1aac04400eead7b5f54743c472f233 /mesalib/src/mesa/state_tracker/st_cb_texture.c | |
parent | 63f9a2c22dbac3e52e4d875bd70d729de5f81a43 (diff) | |
parent | 34d741a3fc96c9424ffec29b114a1bdfde40f8b0 (diff) | |
download | vcxsrv-b318686d7779dab877e5fb33b7d97034cf8f44a8.tar.gz vcxsrv-b318686d7779dab877e5fb33b7d97034cf8f44a8.tar.bz2 vcxsrv-b318686d7779dab877e5fb33b7d97034cf8f44a8.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libX11 mesa pixman git update 22 oct 2012
Diffstat (limited to 'mesalib/src/mesa/state_tracker/st_cb_texture.c')
-rw-r--r-- | mesalib/src/mesa/state_tracker/st_cb_texture.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mesalib/src/mesa/state_tracker/st_cb_texture.c b/mesalib/src/mesa/state_tracker/st_cb_texture.c index 5bf3dc699..b19dc67bf 100644 --- a/mesalib/src/mesa/state_tracker/st_cb_texture.c +++ b/mesalib/src/mesa/state_tracker/st_cb_texture.c @@ -375,6 +375,8 @@ guess_and_alloc_texture(struct st_context *st, */ if ((stObj->base.Sampler.MinFilter == GL_NEAREST || stObj->base.Sampler.MinFilter == GL_LINEAR || + (stObj->base.BaseLevel == 0 && + stObj->base.MaxLevel == 0) || stImage->base._BaseFormat == GL_DEPTH_COMPONENT || stImage->base._BaseFormat == GL_DEPTH_STENCIL_EXT) && !stObj->base.GenerateMipmap && @@ -1111,11 +1113,15 @@ copy_image_data_to_texture(struct st_context *st, /* Copy potentially with the blitter: */ GLuint src_level; - if (stImage->pt != stObj->pt) + if (stImage->pt->last_level == 0) src_level = 0; else src_level = stImage->base.Level; + assert(src_level <= stImage->pt->last_level); + assert(u_minify(stImage->pt->width0, src_level) == stImage->base.Width); + assert(u_minify(stImage->pt->height0, src_level) == stImage->base.Height); + st_texture_image_copy(st->pipe, stObj->pt, dstLevel, /* dest texture, level */ stImage->pt, src_level, /* src texture, level */ |