diff options
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_texture.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mesa/state_tracker/st_cb_texture.c b/src/mesa/state_tracker/st_cb_texture.c index 14d33f7b490..09a10ba5819 100644 --- a/src/mesa/state_tracker/st_cb_texture.c +++ b/src/mesa/state_tracker/st_cb_texture.c @@ -1858,9 +1858,8 @@ st_finalize_texture(struct gl_context *ctx, * will match. */ if (firstImage->pt && - stObj->pt && firstImage->pt != stObj->pt && - firstImage->pt->last_level >= stObj->pt->last_level) { + (!stObj->pt || firstImage->pt->last_level >= stObj->pt->last_level)) { pipe_resource_reference(&stObj->pt, firstImage->pt); pipe_sampler_view_reference(&stObj->sampler_view, NULL); } |