Skip to content

Add support for 64-bit formats.#1302

Merged
manon-traverse merged 3 commits into
llvm:mainfrom
Traverse-Research:add-64-bit-types
Jun 12, 2026
Merged

Add support for 64-bit formats.#1302
manon-traverse merged 3 commits into
llvm:mainfrom
Traverse-Research:add-64-bit-types

Conversation

@manon-traverse

Copy link
Copy Markdown
Contributor

DX12, Vulkan and Metal do support 64-bit formats for a couple of use cases like Storage(UAV) Textures.
This PR adds the 64-bit formats that are supported to the list of available formats and adds the necessary code to convert to API specific formats.
Note that 64-bit formats are not always supported for vertex inputs or sampled textures.

@EmilioLaiso EmilioLaiso left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a plan to add a test exercising these new formats?

Comment thread include/API/Resources.h
Comment on lines +226 to +230
// Only for RWTextures
case Format::R64Uint:
case Format::R64Sint:
case Format::RG64Uint:
case Format::RG64Sint:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then should we have isRwTextureCompatible ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think so. Like you can still have an SRV for these and load it as a regular texture, but you can't use a sampler on it from what I understand. It's one of these edge cases where there is no clear yes/no answer on 'can we create a texture with this format'.

@manon-traverse

Copy link
Copy Markdown
Contributor Author

Is there a plan to add a test exercising these new formats?

There are already tests that use these formats. However, the resources for those tests still use raw dx12, vulkan, and metal objects, not the generic types. In a future PR we will be creating these resources with the generic types and thus need support for these 64-bit formats. Since that change is huge I am splitting it up in smaller steps that can be reviewed individually so it's easier to see what is going on.

Comment thread lib/API/DX/DXResources.h
Comment thread include/API/FormatConversion.h
@manon-traverse manon-traverse merged commit f74f9d5 into llvm:main Jun 12, 2026
26 checks passed
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.

5 participants