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

amdgpu: Handle 8-bit float format case for stencil. #2092

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

squidbus
Copy link
Collaborator

@squidbus squidbus commented Jan 8, 2025

8-bit float format is sometimes used for stencil views of a depth-stencil image. It's possible that because float formats don't do conversion this just happens to work on a real GPU even though 8-bit floats aren't supported; the shaders I've seen just read it as uint anyway. Handle this case by changing 8-bit float format to 8-bit unsigned integer automatically, to match stencil format.

Unfortunately we can't really know if this will end up being used for a stencil view of an existing depth-stencil image as we need the format change to happen earlier than that point, e.g. to use the right types in the shader resources and resolve the Vulkan format for the ImageViewInfo. Therefore, this just applies the conversion to all 8-bit float resources. If we do hit any non-stencil cases this should still work as it would on real hardware due to the lack of bit conversion for float formats.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant