<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - glDrawElements segfault when compiled into display list"
href="https://bugs.freedesktop.org/show_bug.cgi?id=60518#c9">Comment # 9</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - glDrawElements segfault when compiled into display list"
href="https://bugs.freedesktop.org/show_bug.cgi?id=60518">bug 60518</a>
from <span class="vcard"><a class="email" href="mailto:brianp@vmware.com" title="Brian Paul <brianp@vmware.com>"> <span class="fn">Brian Paul</span></a>
</span></b>
<pre>Jose, I think it would be more symmetric with the peer
setup_ff_generate_mipmap() function if we just enabled the vertex arrays when
we create the vertex array object. So, how about this patch:
diff --git a/src/mesa/drivers/common/meta.c b/src/mesa/drivers/common/meta.c
index ca5f5a1..1ab603a 100644
--- a/src/mesa/drivers/common/meta.c
+++ b/src/mesa/drivers/common/meta.c
@@ -3397,6 +3397,8 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
sizeof(struct vertex), OFFSET(x));
_mesa_VertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE,
sizeof(struct vertex), OFFSET(tex));
+ _mesa_EnableVertexAttribArray(0);
+ _mesa_EnableVertexAttribArray(1);
}
/* Generate a fragment shader program appropriate for the texture target */
@@ -3468,8 +3470,6 @@ setup_glsl_generate_mipmap(struct gl_context *ctx,
_mesa_DeleteObjectARB(vs);
_mesa_BindAttribLocation(mipmap->ShaderProg, 0, "position");
_mesa_BindAttribLocation(mipmap->ShaderProg, 1, "texcoords");
- _mesa_EnableVertexAttribArray(0);
- _mesa_EnableVertexAttribArray(1);
link_program_with_debug(ctx, mipmap->ShaderProg);
sampler->shader_prog = mipmap->ShaderProg;
ralloc_free(mem_ctx);
Can you test that approach, core13?</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>