Bug 101561

Summary: [bisected] [llvm] Blue color shift on videos in MPV when using vo=opengl[-hq]
Product: Mesa Reporter: Nick Sarnie <sarnex>
Component: Drivers/Gallium/radeonsiAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED FIXED QA Contact: Default DRI bug account <dri-devel>
Severity: major    
Priority: medium CC: mark.searles
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: good R600_DEBUG=fs,vs,gs,ps,cs
bad R600_DEBUG=fs,vs,gs,ps,cs

Description Nick Sarnie 2017-06-23 02:22:08 UTC
Hi all,

After LLVM commit e88fc4046f70131e67411cee503201e3e9665891  [AMDGPU] SDWA: add support for GFX9 in peephole pass, MPV videos have their colors shifted significantly into the blue range. It is resolved with the commit directly before the above. I am using an RX 480 on kernel 4.11.6, mesa git, xserver git, and llvm git. Using other mpv outputs, such as vo=vaapi,vdpau,x11 or xv all have normal video.

Let me know if you need any more information.

Thanks,
Sarnex
Comment 1 Nick Sarnie 2017-06-23 02:54:57 UTC
Created attachment 132151 [details]
good R600_DEBUG=fs,vs,gs,ps,cs
Comment 2 Nick Sarnie 2017-06-23 02:55:27 UTC
Created attachment 132152 [details]
bad R600_DEBUG=fs,vs,gs,ps,cs
Comment 3 Nick Sarnie 2017-06-23 03:12:37 UTC
As a final piece of information, if I compile LLVM with asserts enabled, I get the following assert

mpv: /var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/lib/Target/AMDGPU/SIPeepholeSDWA.cpp:719: bool {anonymous}::SIPeepholeSDWA::convertToSDWA(llvm::MachineInstr&, const SDWAOperandsVector&): Assertion `AMDGPU::getNamedOperandIdx(SDWAOpcode, AMDGPU::OpName::omod) != -1' failed.


Thanks,
Sarnex
Comment 4 Andy Furniss 2017-06-23 11:55:35 UTC
Yea, this commit also breaks (asserts) Unigine Valley on R9 285.

I'll open a bug on llvm tracker and link back to this one.
Comment 5 Andy Furniss 2017-06-23 12:05:11 UTC
(In reply to Andy Furniss from comment #4)
> Yea, this commit also breaks (asserts) Unigine Valley on R9 285.
> 
> I'll open a bug on llvm tracker and link back to this one.

https://bugs.llvm.org/show_bug.cgi?id=33566

Though I couldn't add the author to CC :-(
Comment 6 Andy Furniss 2017-06-23 18:17:21 UTC
(In reply to Andy Furniss from comment #5)

> Though I couldn't add the author to CC :-(

Oops ignore that bit - the author is addable, I was trying to add the llvm username which is different.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.