Commit f740af27 authored by Eric Anholt's avatar Eric Anholt Committed by Marge Bot

mesa/st: Finalize the texture before BlitFramebuffer from it.

If the texture hasn't yet been validated, the current tex image contents
may have been ignored in favor of the texture's main miptree.  Fixes test
failure on softpipe and intermittent failures on radeonsi in:

mesa/piglit!428

Cc: mesa-stable
Tested-by: Chia-I Wu's avatarChia-I Wu <olvaffe@gmail.com>
Reviewed-by: Chia-I Wu's avatarChia-I Wu <olvaffe@gmail.com>
Reviewed-by: default avatarMarek Olšák <marek.olsak@amd.com>
Part-of: <mesa/mesa!8091>
parent 5f216652
......@@ -39,6 +39,7 @@
#include "st_cb_bitmap.h"
#include "st_cb_blit.h"
#include "st_cb_fbo.h"
#include "st_cb_texture.h"
#include "st_manager.h"
#include "st_scissor.h"
#include "st_util.h"
......@@ -180,6 +181,12 @@ st_BlitFramebuffer(struct gl_context *ctx,
blit.mask = PIPE_MASK_RGBA;
if (srcAtt->Type == GL_TEXTURE) {
/* Make sure that the st_texture_object->pt is the current storage for
* our miplevel. The finalize would happen at some point anyway, might
* as well be now.
*/
st_finalize_texture(ctx, st->pipe, srcAtt->Texture, srcAtt->CubeMapFace);
struct st_texture_object *srcObj = st_texture_object(srcAtt->Texture);
if (!srcObj || !srcObj->pt) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment