Bug 94348

Summary: vkBindImageMemory doesn't take into account the offset when the image is used as a depth buffer
Product: Mesa Reporter: Neil Roberts <nroberts>
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    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Neil Roberts 2016-03-01 10:49:12 UTC
In cmd_buffer_emit_depth_stencil it is using image->depth_surface.offset but only image->offset gets updated during vkBindImageMemory.

I bumped into this because I was lazily using a single allocation for both the depth buffer and the color buffer in this project here:

https://github.com/bpeel/finvenkisto/tree/vulkan (the vulkan branch of it)

The depth buffer ends up overlapping with the color buffer and it makes some funky effects. If I change cmd_buffer_emit_depth_stencil to use image->offset instead then it works, but I don't know if that's the correct solution.
Comment 1 Kristian Høgsberg 2016-03-01 17:22:39 UTC
No that's the right fix, we missed that. Thanks, patch pushed.

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.