nv50: GP_REG_ALLOC_RESULT must be positive
authorIlia Mirkin <imirkin@alum.mit.edu>
Sun, 12 Jan 2014 04:26:03 +0000 (23:26 -0500)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Mon, 27 Jan 2014 15:40:42 +0000 (16:40 +0100)
Set max_out to 1 when there are no outputs.

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/nv50/nv50_program.c

index 27d899a4beb44c459be48f83f9c85b1c375e1221..6dc3bbce1ed9610fcc94faf08866673b5e7235a0 100644 (file)
@@ -122,6 +122,8 @@ nv50_vertprog_assign_slots(struct nv50_ir_prog_info *info)
    }
    prog->out_nr = info->numOutputs;
    prog->max_out = n;
+   if (!prog->max_out)
+      prog->max_out = 1;
 
    if (prog->vp.psiz < info->numOutputs)
       prog->vp.psiz = prog->out[prog->vp.psiz].hw;