<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - [HSW] segfault in copy image when copying from cubemap to 2d"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94198#c2">Comment # 2</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - [HSW] segfault in copy image when copying from cubemap to 2d"
href="https://bugs.freedesktop.org/show_bug.cgi?id=94198">bug 94198</a>
from <span class="vcard"><a class="email" href="mailto:imirkin@alum.mit.edu" title="Ilia Mirkin <imirkin@alum.mit.edu>"> <span class="fn">Ilia Mirkin</span></a>
</span></b>
<pre>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?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the QA Contact for the bug.</li>
</ul>
</body>
</html>