cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

thom
Adept I

Bug in AMD Vulkan implementation

The latest version of Crimson ReLive software has a bug in Vulkan implementation (amdvlk32.dll) producing wrong depth buffering results.

When using a reverse-z technique (minDepth>maxDepth) depth isn't calculated properly.

More info about the technique:

- https://www.khronos.org/registry/vulkan/specs/1.0/man/html/VkViewport.html

- https://software.intel.com/en-us/articles/api-without-secrets-introduction-to-vulkan-part-3

Steps to reproduce:

- set viewport.minDepth=1.0f and viewport.maxDepth=0.0f with vkCmdSetViewport()

- render a triangle with depth=0.95f (for example)

- notice depth written to z-buffer is 0.0f instead of 0.05f

On NVIDIA hardware (GTX 960) this works correctly.

Tested (and reproducible) on:

AMD Graphics Card

- Radeon RX 560 (MSI Radeon RX 560 AERO ITX 4G OC)

Desktop or Laptop System

- Custom built desktop

Operating System

- Windows 7 x64 / Windows 10 x64

Driver version installed

- Catalyst Crimson ReLive 17.7.2 and 17.10.1

Display Devices

- ASUS MX239H EFP

Motherboard + Bios Revision

- ASUS Z170-K (BIOS 3301)

CPU/APU

- Intel i7 6700K

Power Supply Unit Make, Model & Wattage

- SilentiumPC Supremo FM2 Gold 750W

RAM

- 16GB DDR4

Depth format used

- VK_FORMAT_D32_SFLOAT_S8_UINT

Please let me know if you need more info.

0 Likes
10 Replies
thom
Adept I

Any comment from AMD team?

thom
Adept I

I uploaded a complete repro that demonstrates a problem.

It contains a full source code along with binary and screenshots from different ihvs.

Red numbers in depth screens indicate depth values written to depth buffer.

thom
Adept I

Has there been any progress on this issue?

Were you able to reproduce the error with the application I provided?

hi, thom

pastedImage_0.png

This is correct result ?

Hello Andrey,

this is incorrect result meaning the problem is reproducible also on R7 series (green triangle should be on top).

There are 4 bitmaps in the repro "Release" folder you can use for comparision:

-correct_color_(intel_nvidia).bmp

-correct_depth_(intel_nvidia).bmp

-incorrect_color_(amd).bmp

-incorrect_depth_(amd).bmp

Pay attention to depth images as they present the source of the issue.

The repro application works this way:

1) it clears a depth buffer to 1.0f

2) it renders a green triangle with depth=0.95f (depth that should be written is 0.05f)

3) it renders a red triangle with depth=0.80f (depth that should be written is 0.20f)

0 Likes
thom
Adept I

Version 18.2.1 is still affected.

thom​, do you see this problem on recent driver?

Adrenalin Edition 18.5.1:

pastedImage_0.png

I can't check with the latest driver, because we have other bug with multi GPU:

cant run vulkan applications

0 Likes

Seems correct on color buffer Will confirm with latest driver and keep you updated. Thanks.

Here's what i got using latest Vulkan driver,  so it's confirmed this issue has already been fixed. Appreciation to you!

pastedImage_0.png