All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 79462] New: [NVC0/Codegen] Shader compilation falis in spill logic
@ 2014-05-30 18:44 bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
       [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  0 siblings, 1 reply; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-05-30 18:44 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 2350 bytes --]

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

          Priority: medium
            Bug ID: 79462
          Assignee: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
           Summary: [NVC0/Codegen] Shader compilation falis in spill logic
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org
          Hardware: Other
            Status: NEW
           Version: unspecified
         Component: Drivers/DRI/nouveau
           Product: Mesa

Created attachment 100179
  --> https://bugs.freedesktop.org/attachment.cgi?id=100179&action=edit
failing tgsi shader

The attached shader fails in the RA step, when inserting spill code:

nv50_ir::SpillCodeInserter::run (this=0x7ffffffec0c0, lst=std::list)
    at codegen/nv50_ir_ra.cpp:1561
1561             while (!dval->uses.empty()) {

Easily reproduced with nouveau_compiler -a c0. Apparently this shader is
generated as part of the d3d9 st, with skyrimlauncher, when it's trying to
detect the graphics card.

dval is null, which means that something out there isn't an lvalue. Or, in this
case, apparently a null value??

(gdb) p *defi
$4 = {_vptr.Instruction = 0x86e570, next = 0x0, prev = 0x0, id = -1, serial =
27, op = nv50_ir::OP_SPLIT, 
  dType = nv50_ir::TYPE_B128, sType = nv50_ir::TYPE_B128, cc = nv50_ir::CC_TR,
rnd = nv50_ir::ROUND_N, 
  cache = nv50_ir::CACHE_CA, subOp = 0, encSize = 0, saturate = 0, join = 0,
fixed = 0, terminator = 0, 
  ftz = 0, dnz = 0, ipa = 0, lanes = 15, perPatch = 0, exit = 0, mask = 0,
postFactor = 0 '\000', 
  predSrc = -1 '\377', flagsDef = -1 '\377', flagsSrc = -1 '\377', sched = 0,
bb = 0x0, 
  defs = std::deque with 4 elements = {{value = 0x0, origin = 0x0, insn =
0x200}, {value = 0x85ce30, 
      origin = 0x7ffff71a0698 <main_arena+88>, insn = 0x9e5e40}, {value = 0x0,
origin = 0x0, 
      insn = 0x9e5e40}, {value = 0x0, origin = 0x0, insn = 0x9e5e40}}, 
  srcs = std::deque with 1 elements = {{mod = {bits = 0 '\000'}, indirect =
"\377\377", 
      swizzle = 0 '\000', usedAsPtr = false, value = 0x0, insn = 0x200}}}

Note that the second def isn't null but the others are? Perhaps this happens as
part of dead code elimination? Need to investigate more.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 3755 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 79462] [NVC0/Codegen] Shader compilation falis in spill logic
       [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
@ 2014-07-31 18:35   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-15 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-07-31 18:35 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 1092 bytes --]

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

--- Comment #1 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
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.

[-- Attachment #1.2: Type: text/html, Size: 1903 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [Bug 79462] [NVC0/Codegen] Shader compilation falis in spill logic
       [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  2014-07-31 18:35   ` [Bug 79462] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-09-15 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-25  1:48   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-26  6:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-09-15 16:10 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 448 bytes --]

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

--- Comment #2 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
I've spent a bunch of time looking at this issue.

So *one* of the problems is that we delete the instruction too early. But I
think there's more going on. Still debugging. The issue happens if we want to
spill a value that is split.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1204 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 79462] [NVC0/Codegen] Shader compilation falis in spill logic
       [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
  2014-07-31 18:35   ` [Bug 79462] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-15 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-09-25  1:48   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  2014-09-26  6:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-09-25  1:48 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 287 bytes --]

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

--- Comment #3 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
http://patchwork.freedesktop.org/patch/34098/

Please see if this helps.

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1103 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 79462] [NVC0/Codegen] Shader compilation falis in spill logic
       [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
                     ` (2 preceding siblings ...)
  2014-09-25  1:48   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
@ 2014-09-26  6:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ @ 2014-09-26  6:04 UTC (permalink / raw)
  To: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW


[-- Attachment #1.1: Type: text/plain, Size: 928 bytes --]

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

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #4 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> ---
I've pushed out the fix, makes at least the attached shader compile. It also
fixed UE4 demos which appear to render fine. Should get backported to 10.3 and
probably 10.2 as well.

commit 0147c10c5f00b43696ba660aab604d674a75e83c
Author: Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org>
Date:   Wed Sep 24 21:45:07 2014 -0400

    nv50/ir: avoid deleting pseudo instructions too early

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 2379 bytes --]

[-- Attachment #2: Type: text/plain, Size: 181 bytes --]

_______________________________________________
Nouveau mailing list
Nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
http://lists.freedesktop.org/mailman/listinfo/nouveau

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-26  6:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-30 18:44 [Bug 79462] New: [NVC0/Codegen] Shader compilation falis in spill logic bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
     [not found] ` <bug-79462-8800-V0hAGp6uBxMKqLRl/0Ahz6D7qz1kEfGD2LY78lusg7I@public.gmane.org/>
2014-07-31 18:35   ` [Bug 79462] " bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-15 16:10   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-25  1:48   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ
2014-09-26  6:04   ` bugzilla-daemon-CC+yJ3UmIYqDUpFQwHEjaQ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.