<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - XCOM: Enemy Unknown Causes lockup"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80419#c127">Comment # 127</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - XCOM: Enemy Unknown Causes lockup"
href="https://bugs.freedesktop.org/show_bug.cgi?id=80419">bug 80419</a>
from <span class="vcard"><a class="email" href="mailto:davmac@davmac.org" title="Davin McCall <davmac@davmac.org>"> <span class="fn">Davin McCall</span></a>
</span></b>
<pre>The comment above from Jose Fonseca (and follow up from Feral's Edwin Smith)
imply that the problem here is with the game calling
glDrawRangeElementsBaseVertex with bad start/end values, resulting in the
indices being out-of-range which is illegal per the GL spec, and implying that
this is what causes the crash.
I have tried patching Mesa to effectively reduce glDrawRangeElementsBaseVertex
calls to glDrawElementsBaseVertex (i.e. same method but with no start/end
supplied). Patch follows below (inline because it is so short). However, I am
sorry to say that this did *not* prevent the crashes. I conclude that there may
still be a bug in Mesa and/or kernel space DRM (although it's possible my patch
isn't having the effect I intended - I'm not familiar enough with Mesa code
base to be sure).
diff --git a/src/mesa/vbo/vbo_exec_array.c b/src/mesa/vbo/vbo_exec_array.c
index f0245fd..d1f4ac6 100644
--- a/src/mesa/vbo/vbo_exec_array.c
+++ b/src/mesa/vbo/vbo_exec_array.c
@@ -935,7 +935,9 @@ vbo_exec_DrawRangeElementsBaseVertex(GLenum mode,
(void) check_draw_elements_data;
#endif
- vbo_validated_drawrangeelements(ctx, mode, index_bounds_valid, start, end,
+ //vbo_validated_drawrangeelements(ctx, mode, index_bounds_valid, start,
end,
+ // count, type, indices, basevertex, 1, 0);
+ vbo_validated_drawrangeelements(ctx, mode, GL_FALSE, ~0, ~0,
count, type, indices, basevertex, 1, 0);
}</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>