From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ@public.gmane.org Subject: [Bug 79462] [NVC0/Codegen] Shader compilation falis in spill logic Date: Thu, 31 Jul 2014 18:35:19 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1482493527==" Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: nouveau-bounces-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Sender: "Nouveau" To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org List-Id: nouveau.vger.kernel.org --===============1482493527== Content-Type: multipart/alternative; boundary="1406831719.BB26e1.7767"; charset="us-ascii" --1406831719.BB26e1.7767 Date: Thu, 31 Jul 2014 18:35:19 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=79462 --- Comment #1 from Ilia Mirkin --- The below patch helps avoid the crash, but it still still generate incorrect code. I think there are a few issues here, and I'll have to think a little harder about how to properly resolve them. diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 5ab6570..89c83cb 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -1576,7 +1576,8 @@ SpillCodeInserter::run(const std::list& lst) assert(defi); if (defi->isPseudo()) { - d = lval->defs.erase(d); + while (d != lval->defs.end() && (*d)->getInsn() == defi) + d = lval->defs.erase(d); --d; if (slot->reg.file == FILE_MEMORY_LOCAL) delete_Instruction(func->getProgram(), defi); -- You are receiving this mail because: You are the assignee for the bug. --1406831719.BB26e1.7767 Date: Thu, 31 Jul 2014 18:35:19 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 1 on bug 79462 from
The below patch helps avoid the crash, but it still still generate incorrect
code. I think there are a few issues here, and I'll have to think a little
harder about how to properly resolve them.


diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 5ab6570..89c83cb 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -1576,7 +1576,8 @@ SpillCodeInserter::run(const std::list<ValuePair>& lst)

          assert(defi);
          if (defi->isPseudo()) {
-            d = lval->defs.erase(d);
+            while (d != lval->defs.end() && (*d)->getInsn() == defi)
+               d = lval->defs.erase(d);
             --d;
             if (slot->reg.file == FILE_MEMORY_LOCAL)
                delete_Instruction(func->getProgram(), defi);


You are receiving this mail because:
  • You are the assignee for the bug.
--1406831719.BB26e1.7767-- --===============1482493527== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Nouveau mailing list Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org http://lists.freedesktop.org/mailman/listinfo/nouveau --===============1482493527==--