OSDN Git Service

i965: Fix miptree layout for EGLImage-based renderbuffers
authorChad Versace <chadversary@chromium.org>
Thu, 25 Aug 2016 23:08:15 +0000 (16:08 -0700)
committerChad Versace <chadversary@chromium.org>
Thu, 25 Aug 2016 23:52:00 +0000 (16:52 -0700)
commitc82f99e883cfa66b3a3b135e7b1dab0a5bfae164
treebaa974ede3b4f37325c355f91bcc7745573c3022
parentbebc1a1d995e33f173ea207848bcddd81f6dd19a
i965: Fix miptree layout for EGLImage-based renderbuffers

When glEGLImageTargetRenderbufferStorageOES() was given an EGLImage
created from the non-base slice of a miptree,
intel_image_target_renderbuffer_storage() forgot to apply the intra-tile
offsets __DRIimage::tile_x,tile_y to the miptree layout.

This patch fixes the problem with a quick hack suitable for
cherry-picking. A proper fix requires more thorough plumbing in
intel_miptree_create_layout() and brw_tex_layout().

Patch 1/2 that fixes test
'dEQP-EGL.functional.image.create.gles2_cubemap_*'.

Reported-by: Haixia Shi <hshi@chromium.org>
Diagnosed-by: Haixia Shi <hshi@chromium.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Cc: mesa-stable@lists.freedesktop.org
Change-Id: I8a64b0048a1ee9e714ebb3f33fffd8334036450b
src/mesa/drivers/dri/i965/intel_fbo.c