nv50/ir: Fail if encountering unknown shader type
authorPierre Moreau <pierre.morrow@free.fr>
Sat, 6 May 2017 21:47:20 +0000 (23:47 +0200)
committerIlia Mirkin <imirkin@alum.mit.edu>
Sun, 7 May 2017 14:26:36 +0000 (10:26 -0400)
Signed-off-by: Pierre Moreau <pierre.morrow@free.fr>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir.cpp

index b67a1dd..1f640a3 100644 (file)
@@ -1214,8 +1214,8 @@ nv50_ir_generate_code(struct nv50_ir_prog_info *info)
    PROG_TYPE_CASE(FRAGMENT, FRAGMENT);
    PROG_TYPE_CASE(COMPUTE, COMPUTE);
    default:
-      type = nv50_ir::Program::TYPE_COMPUTE;
-      break;
+      INFO_DBG(info->dbgFlags, VERBOSE, "unsupported program type %u\n", type);
+      return -1;
    }
    INFO_DBG(info->dbgFlags, VERBOSE, "translating program of type %u\n", type);