Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Swizzled image view on R8_UNORM is not sampled correctly #243

Closed
llyzs opened this issue Jul 10, 2021 · 2 comments
Closed

Swizzled image view on R8_UNORM is not sampled correctly #243

llyzs opened this issue Jul 10, 2021 · 2 comments
Labels
fixed The issue has been fixed in published build

Comments

@llyzs
Copy link

llyzs commented Jul 10, 2021

Steps to reproduce:

  1. Create an image with R8_UNORM format
  2. Clear the image with color {1.0, 0.0, 0.0, 0.0} using vkCmdClearColorImage
  3. (Optional) Render something on the image created above
  4. Create an image view with swizzle (VkImageViewCreateInfo.components) equals to {VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_ZERO, VK_COMPONENT_SWIZZLE_R}. That is, the R channel is being used as Alpha when being sampled.
  5. Create an image with B8G8R8A8_UNORM format as framebuffer
  6. Render onto the framebuffer by sampling from the image view created in step 3

The result is either complete black or contains many small black blocks (image corruption), and sometimes the driver even freezes.

Note:

  • RADV driver does not have the issue.
  • It only happens with R8_UNORM format. Use RGBA format with the same swizzle pattern does not have the issue.

Tested on RX6700XT but it is likely an issue with the RX5xxx gen as well.

@JaxLinAMD
Copy link
Contributor

looks like a known issue.

JaxLinAMD added a commit that referenced this issue Jul 22, 2021
New feature and improvement
* Enable extension: VK_EXT_extended_dynamic_state2
* Enable extension: VK_KHR_copy_commands2
* Enable implicit external synchronization for all GPUs
* Add Pal setting: dumpCmdBufPerFrame

Issue fix
* Issue #243: Swizzled image view on R8_UNORM is not sampled correctly
* Hang, crash or corruption issue for a couple of DXVK games
@jinjianrong jinjianrong added the fixed The issue has been fixed in published build label Jul 22, 2021
@llyzs
Copy link
Author

llyzs commented Jul 24, 2021

Confirmed this was fixed with latest release.

@llyzs llyzs closed this as completed Jul 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed The issue has been fixed in published build
Projects
None yet
Development

No branches or pull requests

3 participants