[Bug 94198] [HSW] segfault in copy image when copying from cubemap to 2d

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 17 19:08:36 UTC 2016


https://bugs.freedesktop.org/show_bug.cgi?id=94198

--- Comment #2 from Ilia Mirkin <imirkin at alum.mit.edu> ---
Looks like what's happening is that the view_tex_obj in meta_copy_image
effectively becomes an incomplete cubemap texture, and the intel_texture_view
logic isn't ready for that.

   _mesa_GenTextures(1, view_tex_name);
   view_tex_obj = _mesa_lookup_texture(ctx, *view_tex_name);
   view_tex_obj->Target = tex_obj->Target;
   view_tex_obj->TargetIndex = tex_obj->TargetIndex;

   *view_tex_image = _mesa_get_tex_image(ctx, view_tex_obj, tex_obj->Target,
0);
   _mesa_init_teximage_fields(*view_tex_image);

   ctx->Driver.TextureView(view_tex_obj)

but only one image of the view_tex_obj was initialized. intel_texture_view then
does:

   const int numFaces = _mesa_num_tex_faces(texObj->Target);
   for (face = 0; face < numFaces; face++) {
      for (level = 0; level < numLevels; level++) {
         struct gl_texture_image *image = texObj->Image[face][level];
         struct intel_texture_image *intel_image = intel_texture_image(image);

         intel_miptree_reference(&intel_image->mt, intel_orig_tex->mt);

but while the Target is GL_TEXTURE_CUBE_MAP (and thus there are 6 faces), only
one of them [the first] has been initialized. I guess the solution is to
pre-initialize all of the faces in meta_copy_image.c:make_view?

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-3d-bugs/attachments/20160217/a09fb589/attachment.html>


More information about the intel-3d-bugs mailing list