From 52f9ccefcb75a9d42307890d7714b1cd92e864cb Mon Sep 17 00:00:00 2001 From: Michal Srb Date: Tue, 28 Mar 2017 23:39:28 +0300 Subject: st: Add cubeMapFace parameter to st_finalize_texture. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit st_finalize_texture always accesses image at face 0, but it may not be set if we are working with cubemap that had other face set. This fixes crash in piglit same-attachment-glFramebufferTexture2D-GL_DEPTH_STENCIL_ATTACHMENT. Cc: mesa-stable@lists.freedesktop.org Reviewed-by: Nicolai Hähnle --- src/gallium/state_trackers/dri/dri2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/gallium') diff --git a/src/gallium/state_trackers/dri/dri2.c b/src/gallium/state_trackers/dri/dri2.c index b50e0964431..ed6004f836d 100644 --- a/src/gallium/state_trackers/dri/dri2.c +++ b/src/gallium/state_trackers/dri/dri2.c @@ -1808,7 +1808,7 @@ dri2_interop_export_object(__DRIcontext *_ctx, return MESA_GLINTEROP_INVALID_MIP_LEVEL; } - if (!st_finalize_texture(ctx, st->pipe, obj)) { + if (!st_finalize_texture(ctx, st->pipe, obj, 0)) { mtx_unlock(&ctx->Shared->Mutex); return MESA_GLINTEROP_OUT_OF_RESOURCES; } -- cgit v1.2.3