Bug 95292

Summary: [IVB,SKL] vulkan: stride/tiling issue with vkCmdCopyBufferToImage from larger source buffer into destination image
Product: Mesa Reporter: Matthew Waters <ystreet00>
Component: Drivers/Vulkan/intelAssignee: Nanley Chery <nanleychery>
Status: RESOLVED FIXED QA Contact: Intel 3D Bugs Mailing List <intel-3d-bugs>
Severity: normal    
Priority: medium    
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: vkCmdCopyBufferToImage failure

Description Matthew Waters 2016-05-06 05:53:18 UTC
Created attachment 123518 [details]
vkCmdCopyBufferToImage failure

When copying from a larger buffer to a smaller image, there is some combination of stride/tiling mismatches that results in bad output.

The attached screenshot is using a 385x240 BGRA VkBuffer as the source and a 320x240 VkImage (from the swapchain) as the destination.  Using anything <= 384 for the width of the source VkBuffer doesn't exhibit this issue anything greater than 384 does.  Changing the height of the source VkBuffer has no effect on the stride mismatch.

Using:
- mesa from git be5010c
- libdrm 2.4.67-2
- Linux kernel 4.5.1-1-ARCH x86_64
- Both Ivy Bridge and Skylake chips
- https://cgit.freedesktop.org/gstreamer/gst-plugins-bad/tree/ext/vulkan

Test application:
gst-launch-1.0 videotestsrc ! video/x-raw,width=385 ! vulkanupload ! vulkansink
Comment 1 Nanley Chery 2016-05-09 19:28:38 UTC
Thank you for the bug report. Does the following patch fix the issue?
https://patchwork.freedesktop.org/patch/86194/
Comment 2 Matthew Waters 2016-05-13 11:18:36 UTC
(In reply to Nanley Chery from comment #1)
> Thank you for the bug report. Does the following patch fix the issue?
> https://patchwork.freedesktop.org/patch/86194/

I can confirm that this works.

T-b from Matthew Waters <matthew@centricular.com>
Comment 3 Nanley Chery 2016-05-13 21:11:09 UTC
The fix has been pushed upstream.

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.