Bug 96791

Summary: Cannot use image from swapchains for sampling
Product: Mesa Reporter: Lionel Landwerlin <lionel.g.landwerlin>
Component: Drivers/Vulkan/intelAssignee: Intel 3D Bugs Mailing List <intel-3d-bugs>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium CC: jason
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: anv: wsi: create swapchain images using specified image usage

Description Lionel Landwerlin 2016-07-03 18:28:02 UTC
Created attachment 124873 [details] [review]
anv: wsi: create swapchain images using specified image usage

Using images created from the swapchain for sampling leads to uninitialized memory access and sometimes crashes.
Turns out the right flags aren't set for X11/Wayland.
Comment 1 Jason Ekstrand 2016-07-04 16:55:43 UTC
Thanks for the bug report and the patch!  The convention in the mesa project is to send patches to the mesa-dev@list.freedesktop.org mailing list.  You can do so easily with "git send-email my_patch_name.patch".  Please do so and I will ensure that it gets reviewed and committed.

I only have two comments on the patch:

 1) The prefix "anv/wsi:" fits the mesa convention better.

 2) I don't think you need to OR in COLOR_ATTACHMENT_BIT, just use the bits the user requested.
Comment 2 Lionel Landwerlin 2016-07-04 17:07:56 UTC
Sure, closing here.
Comment 3 Jason Ekstrand 2016-07-04 17:13:31 UTC
It's still a bug, so let's leave it open until the patch lands.
Comment 4 Jason Ekstrand 2016-07-04 17:24:54 UTC
Fixed by the following commit:

commit dbbc4fb4cc8792fa25125a9c828b649d61113362
Author: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Date:   Mon Jul 4 18:06:58 2016 +0100

    anv/wsi: create swapchain images using specified image usage

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.