Bug 94348 - vkBindImageMemory doesn't take into account the offset when the image is used as a depth buffer
Summary: vkBindImageMemory doesn't take into account the offset when the image is used...
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/intel (show other bugs)
Version: git
Hardware: Other All
: medium normal
Assignee: Intel 3D Bugs Mailing List
QA Contact: Intel 3D Bugs Mailing List
Depends on:
Reported: 2016-03-01 10:49 UTC by Neil Roberts
Modified: 2016-03-01 17:22 UTC (History)
0 users

See Also:
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.