<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body><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> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">bug 69155</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Summary</td>
<td>codegen/nv50_ir_emit_nv50.cpp:169:srcAddr8: Assertion `(offset <= 0x1fc || offset == 0x3fc) && !(offset & 0x3)' failed.
</td>
<td>[NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69155#c1">Comment # 1</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures"
href="https://bugs.freedesktop.org/show_bug.cgi?id=69155">bug 69155</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>OK, so there are a few problems here, not the least of which is that there's
memory corruption in the program logic because nv50_program only has 16 in/out
varyings, but it reports support for a lot more than that.
Once you fix that, there's another incorrect assert. Fixing that makes the test
run, but it fails. For posterity, here is the patch that makes the test
not-completely-die. I'll look into what the test is doing and why it's failing
later.
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
index 762b48f..167d228 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_screen.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_screen.c
@@ -223,9 +223,7 @@ nv50_screen_get_shader_param(struct pipe_screen *pscreen,
unsigned shader,
case PIPE_SHADER_CAP_MAX_CONTROL_FLOW_DEPTH:
return 4;
case PIPE_SHADER_CAP_MAX_INPUTS:
- if (shader == PIPE_SHADER_VERTEX)
- return 32;
- return 0x300 / 16;
+ return 16;
case PIPE_SHADER_CAP_MAX_CONSTS:
return 65536 / 16;
case PIPE_SHADER_CAP_MAX_CONST_BUFFERS:
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
index ba4f592..a7f7a36 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_shader_state.c
@@ -443,14 +443,15 @@ nv50_fp_linkage_validate(struct nv50_context *nv50)
}
n = (m + 3) / 4;
- assert(m <= 64);
if (unlikely(nv50->gmtyprog)) {
+ assert(n <= 33);
BEGIN_NV04(push, NV50_3D(GP_RESULT_MAP_SIZE), 1);
PUSH_DATA (push, m);
BEGIN_NV04(push, NV50_3D(GP_RESULT_MAP(0)), n);
PUSH_DATAp(push, map, n);
} else {
+ assert(n <= 17); // XXX use the nva3+ ALT version?
BEGIN_NV04(push, NV50_3D(VP_GP_BUILTIN_ATTR_EN), 1);
PUSH_DATA (push, vp->vp.attrs[2]);</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>