瀏覽代碼

st/mesa: fix a regression from cae2bb76

stObj->pt is null when a TFP texture is passed to st_finalize_texture,
and with the changes introduced in the above commit this resulted in a
new texture being created and the existing image being copied into it.

NOTE: This is a candidate for the 7.10 branch.

Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
tags/android-x86-2.2-r2
Fredrik Höglund 14 年之前
父節點
當前提交
71b889f904
共有 1 個檔案被更改,包括 1 行新增2 行删除
  1. 1
    2
      src/mesa/state_tracker/st_cb_texture.c

+ 1
- 2
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);
}

Loading…
取消
儲存