[Nouveau] [Bug 91598] Broken Rendering of Plasma 5 Desktop

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91598

--- Comment #13 from David March  ---
Just wanted to add that this also can be replicated on KDE4 (I have since
downgraded to get a usable system) as well (although far more rare).  In this
case it is a freeze (sometimes indefinite) but I do not notice any visible
graphical corruption yet.  The same (mostly - kwin is listed rather than
plasmashell, of course messages as above are in the log like so:

(Note reverse order - output generated  using 'journalctl -r'


Sep 06 12:42:39 gentoot3400 kernel: nouveau E[  PGRAPH][:01:00.0] TRAP_PROP
- TP 0 - e0c: , e18: , e1c: 000807f0, e20: 2a00, e24:
0003
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[  PGRAPH][:01:00.0] TRAP_PROP
- TP 0 - RT_FAULT - Address 0047a7f200
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[ PFB][:01:00.0] trapped
write at 0x0047a79000 on channel 0xf949 [kwin[1926]] PGRAPH/PROP/RT0
reason: PAGE_NOT_PRESENT
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[  PGRAPH][:01:00.0] ch 4
[0x000f949000 kwin[1926]] subc 3 class 0x8297 mthd 0x1b0c data 0x1000f010
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[  PGRAPH][:01:00.0] TRAP_PROP
- TP 0 - e0c: , e18: , e1c: 079e, e20: 2a00, e24:
0003
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[  PGRAPH][:01:00.0] TRAP_PROP
- TP 0 - RT_FAULT - Address 0047a79000
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[kwin[1926]] validate: -22
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[kwin[1926]] validating bo list
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[kwin[1926]] fail set_domain
Sep 06 12:42:39 gentoot3400 kernel: nouveau E[kwin[1926]] validate: -22

-

So the issue is not just really an issue related to Plasma 5 although it is
worse on Plasma 5.  Again it does seem to occur far less often with KDE4
though.

New System Info:

Linux gentoot3400 4.2.0-gentoo #1 SMP Mon Aug 31 17:07:28 EDT 2015 x86_64
Intel(R) Core(TM)2 Quad CPU Q6600 @ 2.40GHz GenuineIntel GNU/Linux

media-libs/mesa-11.0.0_rc2
x11-drivers/xf86-video-nouveau-1.0.11
kde-base/kwin-4.11.22(4)
x11-base/xorg-server-1.17.2-r1

(with compositing ON)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #8 from Ilia Mirkin  ---
This patch should get it going, but I don't think I want to commit it as-is.
This gets me the same overly-lit rendering as r600, so any remaining issues are
in the st. Should probably investigate what the "real" rendering looks like,
neither lighting matches any screenshots of the game I've found online.


diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
index 0cd21cf..268ea0b 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp
@@ -2121,8 +2121,10 @@ RegAlloc::InsertConstraintsPass::insertConstraintMoves()

 Instruction *defi = cst->getSrc(s)->defs.front()->getInsn();
 // catch some cases where don't really need MOVs
+/*
 if (cst->getSrc(s)->refCount() == 1 && !defi->constrainedDefs())
continue;
+*/

 LValue *lval = new_LValue(func, cst->src(s).getFile());
 lval->reg.size = size;

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 90276] [NVE4] read fault error, bisected

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90276

--- Comment #17 from Arthur Heymans  ---
Reversing 3d9e3921f4d77bcaeea913c48b894d1208f0cb06 solves the problem.

Howerever c39f472e9f14e49a9bc091977ced0ec45fc00c57 changes some names so I
don't know what to for recent kernels.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #9 from Marcin Slusarz  ---
Yes, this fixes gun rendering.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 90276] [NVE4] read fault error, bisected

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90276

--- Comment #19 from Arthur Heymans  ---
Ok there are still crashes but they tend to happen less easier/fast.
Applications that once produced a reproducible instant crashes, now crashes
with same errors after ~30min or more. (also works on more recent kernels)

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #7 from Ilia Mirkin  ---
OK, I think I see what's happening... the sequence goes something like this:

  3: mov u32 %r438 0x3f80 (0)

 16: mov u32 $r0 %r445 (0)
 17: mov u32 $r1 %r452 (0)
 18: call abs BUILTIN:1 (0)
 19: mov u32 %r455 $r1 (0)
 20: nop - { $r0 $r2d } (0)
 21: nop - $p0q (0)

337: mov u32 %r1227 %r1012 (0)
338: mov u32 %r1228 %r1014 (0)
339: mov u32 %r1229 %r954 (0)
340: merge b128 %r1222q %r1227 %r1228 %r1229 %r438 (0)
341: export b128 # o[0x10] %r1222q (0)

Now the resulting "code" looks like:

  1: mov u32 $r2 0x3f80 (8)
  7: mov u32 $r10 0x0004 (8)

263: mov u32 $r1073741823 $r10 (8)
264: mov u32 $r0 $r11 (8)
265: mov u32 $r1 $r16 (8)
266: export b128 # o[0x10] %r1222q (8)

So it must be trying to stick this stuff into r0..r3. However there's a clobber
of $r2 between the initial move and the desire to use it, without any
constraint move being inserted. So the RA fails because it doesn't understand
the situation properly. I *think*.

Not sure why the first 3 args of the merge have a mov but the 4th one doesn't.
Perhaps something eliminates it for some reason? Also worth noting that this
works fine on GK110, presumably due to slightly different RA constraints.
However we don't get anywhere close to using up the 64 registers here either.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 90276] [NVE4] read fault error, bisected

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=90276

--- Comment #18 from Ilia Mirkin  ---
(In reply to Arthur Heymans from comment #17)
> Reversing 3d9e3921f4d77bcaeea913c48b894d1208f0cb06 solves the problem.
> 
> Howerever c39f472e9f14e49a9bc091977ced0ec45fc00c57 changes some names so I
> don't know what to for recent kernels.

The code in question is still here:

http://cgit.freedesktop.org/~darktama/nouveau/tree/drm/nouveau/nvkm/subdev/fb/ramgf100.c#n600

It's surprising that reverting that commit helps... it fixed issues for people
with funny memory partitioning IIRC.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] nvc0: always emit a full shader colormask

2015-09-06 Thread Ilia Mirkin
Indications are that if the colormask indicates a single bit set on
fermi, that value will always be read from $r0 instead of a potentially
higher register (if e.g. green is set). Not to upset the counting logic,
always set the header up with a full color mask for each RT.

Fixes the following piglit:
  fbo-stencil blit GL_DEPTH32F_STENCIL8

Signed-off-by: Ilia Mirkin 
---

Needs a piglit run on both fermi and kepler just to make sure.

 src/gallium/drivers/nouveau/nvc0/nvc0_program.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c 
b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
index 12f1bb7..a168dd6 100644
--- a/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
+++ b/src/gallium/drivers/nouveau/nvc0/nvc0_program.c
@@ -449,7 +449,7 @@ nvc0_fp_gen_header(struct nvc0_program *fp, struct 
nv50_ir_prog_info *info)
 
for (i = 0; i < info->numOutputs; ++i) {
   if (info->out[i].sn == TGSI_SEMANTIC_COLOR)
- fp->hdr[18] |= info->out[i].mask << info->out[i].slot[0];
+ fp->hdr[18] |= 0xf << info->out[i].slot[0];
}
 
fp->fp.early_z = info->prop.fp.earlyFragTests;
-- 
2.4.6

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91551] DXTn compressed normal maps produce severe artifacts on all NV5x and NVDx chipsets

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91551

--- Comment #8 from Mauro Rossi  ---
Hi,

I tried to apply the two patches proposed by jr, in
https://bugs.freedesktop.org/show_bug.cgi?id=90887 thread,

built patched nouveau_dri.so i386 target and checked about the artifacts on
FS2open mod.

In my use case the artifacts are still there.

I'll check again with next proposed patches, I only need to playback the
apitrace on specific HW

Mauro

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] oops in reservation_object_wait_timeout_rcu

2015-09-06 Thread Marcin Ĺšlusarz
 BUG: unable to handle kernel paging request at c90003161018
 IP: [] reservation_object_wait_timeout_rcu+0x35c/0x580
 PGD 13a89a067 PUD 13a89b067 PMD 136735067 PTE 0
 Oops:  [#1] PREEMPT SMP 
 Modules linked in: ctr ccm rfcomm bnep arc4 iwldvm mac80211 binfmt_misc 
iwlwifi cfg80211 rtsx_usb uvcvideo btusb btbcm btintel bluetooth 
videobuf2_vmalloc videobuf2_memops videobuf2_core v4l2_common 
snd_hda_codec_hdmi videodev snd_hda_codec_idt snd_hda_codec_generic dell_wmi 
snd_hda_intel sparse_keymap dell_laptop dcdbas snd_hda_controller snd_hda_codec 
x86_pkg_temp_thermal coretemp snd_hwdep snd_pcm snd_hda_core microcode 
snd_seq_midi snd_seq_midi_event serio_raw snd_rawmidi snd_seq snd_timer 
snd_seq_device snd lpc_ich soundcore parport_pc ppdev lp parport hid_generic 
nouveau mxm_wmi ttm i915 psmouse i2c_algo_bit drm_kms_helper ahci libahci 
usbhid drm hid wmi video
 CPU: 1 PID: 920 Comm: Xorg Not tainted 4.1.2+ #57
 Hardware name: Dell Inc.  Inspiron 7720/04M3YM, BIOS A07 08/16/2012
 task: 880136dec2c0 ti: 880136de4000 task.ti: 880136de4000
 RIP: 0010:[]  [] 
reservation_object_wait_timeout_rcu+0x35c/0x580
 RSP: 0018:880136de7c78  EFLAGS: 00010246
 RAX: c90003161000 RBX: 8800ab123b00 RCX: ab123200
 RDX: ab123200 RSI:  RDI: 81c5be00
 RBP: 880136de7cd8 R08:  R09: 
 R10:  R11: 880136de7d80 R12: 
 R13: 1d4c R14: c326 R15: 88003290a1b8
 FS:  7f29a7237980() GS:88013f24() knlGS:
 CS:  0010 DS:  ES:  CR0: 80050033
 CR2: c90003161018 CR3: 32cf8000 CR4: 001407e0
 Stack:
  8157ce70 8800336a8898 000136de7ca8 88003290a250
  88004711ce40 00020190a3f0 880136de7cd8 fff0
   88003290a000 88003290a3f0 0082
 Call Trace:
  [] ? reservation_object_wait_timeout_rcu+0xa0/0x580
  [] nouveau_gem_ioctl_cpu_prep+0x6d/0x190 [nouveau]
  [] ? might_fault+0x8b/0xa0
  [] drm_ioctl+0x1a5/0x6b0 [drm]
  [] ? trace_hardirqs_on+0xd/0x10
  [] ? _raw_spin_unlock_irqrestore+0x42/0x80
  [] nouveau_drm_ioctl+0x72/0xd0 [nouveau]
  [] do_vfs_ioctl+0x308/0x540
  [] ? __fget+0x5/0x210
  [] ? __fget_light+0x2a/0xa0
  [] SyS_ioctl+0x81/0xa0
  [] system_call_fastpath+0x16/0x73
 Code: d5 a1 81 be c7 03 00 00 48 c7 c7 25 d0 a1 81 c6 05 d0 66 7a 00 01 e8 34 
eb b8 ff e9 f5 fd ff ff 0f 1f 80 00 00 00 00 48 8b 43 08 <48> 8b 40 18 48 85 c0 
0f 84 c7 fd ff ff 48 89 df ff d0 84 c0 0f 
 RIP  [] reservation_object_wait_timeout_rcu+0x35c/0x580
  RSP 
 CR2: c90003161018
 ---[ end trace c4e9ff6a0281167a ]---


Happened once, while I was "testing" Portal.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91890] [nve7] witcher2: blurry image & DATA_ERRORs (class 0xa097 mthd 0x2380/0x238c)

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91890

--- Comment #5 from Marcin Slusarz  ---
This patch resolves both blurriness and DATA_ERRORs. 
Thanks!

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] pci: Handle 5-bit and 8-bit tag field

2015-09-06 Thread Pierre Moreau
If the hardware supports extended tag field (8-bit ones), then enabled it. This
is usually done by the VBIOS, but not on some MBPs (see fdo#86537).
In case extended tag field is not supported, 5-bit tag field is used which
limits the possible values to 32. Apparently bits 7:0 of 0x8841c stores some
number of outstanding requests, so cap it to 32 if extended tag is unsupported.

Fixes: fdo#86537
Signed-off-by: Pierre Moreau 
---
 drm/nouveau/nvkm/subdev/pci/base.c | 25 +
 1 file changed, 25 insertions(+)

diff --git a/drm/nouveau/nvkm/subdev/pci/base.c 
b/drm/nouveau/nvkm/subdev/pci/base.c
index d1c148e..70631b3 100644
--- a/drm/nouveau/nvkm/subdev/pci/base.c
+++ b/drm/nouveau/nvkm/subdev/pci/base.c
@@ -46,6 +46,14 @@ nvkm_pci_wr32(struct nvkm_pci *pci, u16 addr, u32 data)
pci->func->wr32(pci, addr, data);
 }
 
+u32
+nvkm_pci_mask(struct nvkm_pci *pci, u16 addr, u32 mask, u32 add)
+{
+   u32 data = pci->func->rd32(pci, addr);
+   pci->func->wr32(pci, addr, (data & ~mask) | add);
+   return data;
+}
+
 void
 nvkm_pci_rom_shadow(struct nvkm_pci *pci, bool shadow)
 {
@@ -115,6 +123,23 @@ nvkm_pci_init(struct nvkm_subdev *subdev)
if (ret)
return ret;
 
+   if (pci_is_pcie(pdev)) {
+   /* Tag field is 8-bit long, regardless of EXT_TAG.
+* However, if EXT_TAG is disabled, only the lower 5 bits of 
the tag
+* field should be used, limiting the number of request to 32.
+*
+* Apparently, 0x041c stores some limit on the number of 
requests
+* possible, so if EXT_TAG is disabled, limit that requests 
number to
+* 32
+*
+* Fixes fdo#86537
+*/
+   if (nvkm_pci_rd32(pci, 0x007c) & 0x0020)
+   nvkm_pci_mask(pci, 0x0080, 0x, 0x0100);
+   else
+   nvkm_pci_mask(pci, 0x041c, 0x0060, 0x);
+   }
+
pci->irq = pdev->irq;
return ret;
 }
-- 
2.5.1

___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #2 from Ilia Mirkin  ---
GlennK reproduced the same issue on r600, so it's most likely a st/mesa bug.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #3 from Ilia Mirkin  ---
(In reply to Ilia Mirkin from comment #2)
> GlennK reproduced the same issue on r600, so it's most likely a st/mesa bug.

Errr... two issues. One is the lighting issue, which also happens on r600.
Another is the blacked out bits, which is nouveau-specific.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #1 from Marcin Slusarz  ---
Created attachment 118103
  --> https://bugs.freedesktop.org/attachment.cgi?id=118103=edit
Shadow Warrior on Intel

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] New: [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

Bug ID: 91895
   Summary: [nve7] Shadow Warrior: black gun & messed up colors
   Product: Mesa
   Version: git
  Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: NEW
  Severity: normal
  Priority: medium
 Component: Drivers/DRI/nouveau
  Assignee: nouveau@lists.freedesktop.org
  Reporter: marcin.slus...@gmail.com
QA Contact: nouveau@lists.freedesktop.org

Created attachment 118102
  --> https://bugs.freedesktop.org/attachment.cgi?id=118102=edit
Shadow Warrior on Nouveau

Screenshots comparing intel and nouveau attached.
Apitrace:
http://people.freedesktop.org/~mslusarz/ShadowWarrior.bin.x86.trace.xz (174MB)

This is on mesa-git (3c6c4d4f298ec81fe57992790a68aaab2e573519) with the patch
from bug#91890.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

Marcin Slusarz  changed:

   What|Removed |Added

 Attachment #118102|text/plain  |image/png
  mime type||

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [PATCH] nv50/ir: use unordered_set instead of list to keep track of var defs

2015-09-06 Thread Tobias Klausmann
The set of variable defs does not need to be ordered in any way, and
removing/adding elements is a fairly common operation in various
optimization passes.

This shortens runtime of piglit test fp-long-alu to ~11s from ~22s
No piglit regressions observed on nvc0!

Signed-off-by: Tobias Klausmann 
---
 src/gallium/drivers/nouveau/codegen/nv50_ir.cpp|  4 ++--
 src/gallium/drivers/nouveau/codegen/nv50_ir.h  |  7 +++---
 .../drivers/nouveau/codegen/nv50_ir_inlines.h  | 28 +-
 .../nouveau/codegen/nv50_ir_lowering_nv50.cpp  |  4 ++--
 .../nouveau/codegen/nv50_ir_lowering_nvc0.cpp  |  6 ++---
 .../drivers/nouveau/codegen/nv50_ir_peephole.cpp   |  4 ++--
 src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 17 +++--
 7 files changed, 38 insertions(+), 32 deletions(-)

diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
index cce6055..745cdc9 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp
@@ -154,9 +154,9 @@ ValueDef::set(Value *defVal)
if (value == defVal)
   return;
if (value)
-  value->defs.remove(this);
+  value->defs.erase(this);
if (defVal)
-  defVal->defs.push_back(this);
+  defVal->defs.insert(this);
 
value = defVal;
 }
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.h 
b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
index ba1b085..deeabff 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.h
@@ -570,6 +570,7 @@ public:
 
inline Value *rep() const { return join; }
 
+   inline Instruction *getUniqueInsnMerged() const;
inline Instruction *getUniqueInsn() const;
inline Instruction *getInsn() const; // use when uniqueness is certain
 
@@ -586,11 +587,11 @@ public:
static inline Value *get(Iterator&);
 
unordered_set uses;
-   std::list defs;
+   unordered_set defs;
typedef unordered_set::iterator UseIterator;
typedef unordered_set::const_iterator UseCIterator;
-   typedef std::list::iterator DefIterator;
-   typedef std::list::const_iterator DefCIterator;
+   typedef unordered_set::iterator DefIterator;
+   typedef unordered_set::const_iterator DefCIterator;
 
int id;
Storage reg;
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
index e465f24..8c8e54c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_inlines.h
@@ -205,21 +205,26 @@ const LValue *ValueDef::preSSA() const
 
 Instruction *Value::getInsn() const
 {
-   return defs.empty() ? NULL : defs.front()->getInsn();
+   return defs.empty() ? NULL : (*defs.begin())->getInsn();
 }
 
-Instruction *Value::getUniqueInsn() const
+Instruction *Value::getUniqueInsnMerged() const
 {
if (defs.empty())
   return NULL;
+   /* It is not guaranteed that this is the first in the set, lets find it */
+   for (DefCIterator it = defs.begin(); it != defs.end(); ++it)
+  if ((*it)->get() == this)
+ return (*it)->getInsn();
+   /* We should never hit this assert */
+   assert(0);
+   return NULL;
+}
 
-   // after regalloc, the definitions of coalesced values are linked
-   if (join != this) {
-  for (DefCIterator it = defs.begin(); it != defs.end(); ++it)
- if ((*it)->get() == this)
-return (*it)->getInsn();
-  // should be unreachable and trigger assertion at the end
-   }
+Instruction *Value::getUniqueInsn() const
+{
+   if (defs.empty())
+  return NULL;
 #ifdef DEBUG
if (reg.data.id < 0) {
   int n = 0;
@@ -230,8 +235,9 @@ Instruction *Value::getUniqueInsn() const
  WARN("value %%%i not uniquely defined\n", id); // return NULL ?
}
 #endif
-   assert(defs.front()->get() == this);
-   return defs.front()->getInsn();
+   ValueDef *def = *defs.begin();
+   assert(def->get() == this);
+   return def->getInsn();
 }
 
 inline bool Instruction::constrainedDefs() const
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp 
b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index bea293b..9d1244d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -211,7 +211,7 @@ NV50LegalizePostRA::visit(Function *fn)
if (outWrites) {
   for (std::list::iterator it = outWrites->begin();
it != outWrites->end(); ++it)
- (*it)->getSrc(1)->defs.front()->getInsn()->setDef(0, 
(*it)->getSrc(0));
+ (*(*it)->getSrc(1)->defs.begin())->getInsn()->setDef(0, 
(*it)->getSrc(0));
   // instructions will be deleted on exit
   outWrites->clear();
}
@@ -343,7 +343,7 @@ NV50LegalizeSSA::propagateWriteToOutput(Instruction *st)
   return;
 
// check def instruction can store
-   

[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #4 from Ilia Mirkin  ---
Probably relevant to the nouveau-specific issue:

ERROR: no viable spill candidates left

I bet the end result is black, which explains those spots. Haven't done more
debugging on that yet.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #5 from Ilia Mirkin  ---
Created attachment 118107
  --> https://bugs.freedesktop.org/attachment.cgi?id=118107=edit
vertex shader that fails to compile

Don't know if this is *the* issue, but it's certainly *an* issue. A little
surprising that such a simple shader dies -- no control flow, no nothing. Fails
to find spill candidates.

Perhaps the function calls somehow mess it up.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau


[Nouveau] [Bug 91895] [nve7] Shadow Warrior: black gun & messed up colors

2015-09-06 Thread bugzilla-daemon
https://bugs.freedesktop.org/show_bug.cgi?id=91895

--- Comment #6 from Marcin Slusarz  ---
Hmm, I'm not sure anymore which lighting is the correct one...

One more trace with better view:
http://people.freedesktop.org/~mslusarz/ShadowWarrior.bin.x86.2.trace.xz (181
MB)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
___
Nouveau mailing list
Nouveau@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/nouveau