nv50/ir: initialize RelocInfo to 0
authorChristoph Bumiller <e0425955@student.tuwien.ac.at>
Thu, 6 Oct 2011 18:45:08 +0000 (20:45 +0200)
committerChristoph Bumiller <e0425955@student.tuwien.ac.at>
Fri, 21 Oct 2011 21:00:38 +0000 (23:00 +0200)
src/gallium/drivers/nv50/codegen/nv50_ir_target.cpp

index 46662b7db3dc33a96ceb3bb1abb90bab04aa184f..b1c696899c790e5aaee0a935e56c1c1a4ea6df12 100644 (file)
@@ -258,6 +258,8 @@ CodeEmitter::addReloc(RelocEntry::Type ty, int w, uint32_t data, uint32_t m,
                  size + RELOC_ALLOC_INCREMENT * sizeof(RelocEntry)));
       if (!relocInfo)
          return false;
+      if (n == 0)
+         memset(relocInfo, 0, sizeof(RelocInfo));
    }
    ++relocInfo->count;