Imagination PowerVR SDK Blog

Problem reading depth buffer as input attachment.


#1

It would seem that I am unable to read a depth buffer as an input attachment.
The depth buffer was written in a previous subpass. Instead of getting values from the depth buffer it would seem that I am just seeing noise.
I have no problems reading a colour buffer as an input attachment.
You can see the noise revealed in this image which was using an in-shader depth test as part of a depth peel.

I have no problems with this code on desktop GPUs and I cannot see any relevant validation messages.
Does anyone know what I might be doing wrong (or is this not supported on PowerVR)?
I am testing on a Nexus Player running the latest Android 7 preview (driver version: 0.988.3583).
An APK can be found here: https://matthewwellings.com/blog/depth-peeling-order-independent-transparency-in-vulkan/apks/vulkanDepthPeel.apk
If anyone is interested the code is here: https://github.com/openforeveryone/VulkanDepthPeel/


#2

Hi Matt,

Thanks very much for reporting this issue to us. We have reproduced the issues you are seeing and we have confirmed that this is caused by a bug in our Vulkan drivers. Due to the nature of this issue we consider it to be of high priority. We cannot confirm when a new driver with this fix will be released although we hope it will happen shortly.

Thanks,
James