summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2011-04-24 17:35:45 +1000
committerDave Airlie <[email protected]>2011-04-25 05:59:47 +1000
commit863eecd0d892e9e7e01c6bb91f1937a450865bea (patch)
treea235b96a8f86b905169be07d86ac2f87dfdb8fee
parent0a9cec3475fb14be8aa5fa66557d338556cd8ed5 (diff)
st/mesa: fix regression since a22aba4eae9b29db731487bce90e8292f7e82c72
"st/mesa: check image size before copy_image_data_to_texture()" caused a regression in piglit fbo-generatemipmap-formats test on all gallium drivers. Level 0 for NPOT textures will not match minified values, so don't do this check for level 0. Signed-off-by: Dave Airlie <[email protected]>
-rw-r--r--src/mesa/state_tracker/st_cb_texture.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c
index ab7f6a51684..a27c30e51fe 100644
--- a/src/mesa/state_tracker/st_cb_texture.c
+++ b/src/mesa/state_tracker/st_cb_texture.c
@@ -1843,9 +1843,9 @@ st_finalize_texture(struct gl_context *ctx,
/* Need to import images in main memory or held in other textures.
*/
if (stImage && stObj->pt != stImage->pt) {
- if (stImage->base.Width == u_minify(stObj->width0, level) &&
+ if (level == 0 || (stImage->base.Width == u_minify(stObj->width0, level) &&
stImage->base.Height == u_minify(stObj->height0, level) &&
- stImage->base.Depth == u_minify(stObj->depth0, level)) {
+ stImage->base.Depth == u_minify(stObj->depth0, level))) {
/* src image fits expected dest mipmap level size */
copy_image_data_to_texture(st, stObj, level, stImage);
}