Bug 106903

Summary: radv: Fragment shader output goes to wrong attachments when render targets are sparse
Product: Mesa Reporter: Philip Rebohle <philip.rebohle>
Component: Drivers/Vulkan/radeonAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact: mesa-dev
Severity: normal    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
i915 platform: i915 features:
Attachments: Patch for the 'deferred' demo

Description Philip Rebohle 2018-06-12 19:19:42 UTC
Created attachment 140140 [details] [review]
Patch for the 'deferred' demo


when there's an unused color attachment in a subpass, it looks like fragment shader outputs are not written to the correct attachments, i.e. if attachment reference 1 is VK_ATTACHMENT_UNUSED, the fragment shader output at location 2 is written to the 3rd attachment and the output at location 3 is discarded entirely. This causes rendering issues in Vampyr on DXVK.

The attached patch for Sasha Willems 'deferred' demo demonstrates the issue. It works as expected on amdvlk. Mind that the affected fragment shader needs to be recompiled manually.

- Philip
Comment 1 Samuel Pitoiset 2018-06-13 08:07:17 UTC
Well, AMDVLK hangs on Polaris/Vega here. (I recompiled that fragment shader manually).
Comment 2 Bas Nieuwenhuizen 2018-06-13 22:06:29 UTC
https://patchwork.freedesktop.org/patch/229361/ should fix this.

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.