[Nouveau] [Bug 69155] [NV50 gallium] [piglit] bin/varying-packing-simple triggers memory corruption/failures

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Dec 1 00:03:21 PST 2013


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

Ilia Mirkin <imirkin at alum.mit.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|codegen/nv50_ir_emit_nv50.c |[NV50 gallium] [piglit]
                   |pp:169:srcAddr8: Assertion  |bin/varying-packing-simple
                   |`(offset <= 0x1fc || offset |triggers memory
                   |== 0x3fc) && !(offset &     |corruption/failures
                   |0x3)' failed.               |

--- Comment #1 from Ilia Mirkin <imirkin at alum.mit.edu> ---
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]);

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20131201/1a3d55ec/attachment-0001.html>


More information about the Nouveau mailing list