Skip to content

Use typed pointers for accessing buffers through descriptor heap#4227

Open
vainiovano wants to merge 2 commits into
KhronosGroup:mainfrom
vainiovano:typed-descriptor-heap-buffer-access
Open

Use typed pointers for accessing buffers through descriptor heap#4227
vainiovano wants to merge 2 commits into
KhronosGroup:mainfrom
vainiovano:typed-descriptor-heap-buffer-access

Conversation

@vainiovano
Copy link
Copy Markdown

I believe that untyped pointer access to uniform or storage buffers requires using explicitly laid out types, but glslang cannot currently guarantee that accesses to buffers obtained through the descriptor heap would have such layout information. Instead, we can use typed pointers similarly to buffers provided through descriptor sets.

Resolves: #4224
Resolves: #4225

I believe that untyped pointer access to uniform or storage buffers
requires using explicitly laid out types, but glslang cannot currently
guarantee that accesses to buffers obtained through the descriptor heap
would have such layout information. Instead, we can use typed pointers
similarly to buffers provided through descriptor sets.

Resolves: KhronosGroup#4224
Resolves: KhronosGroup#4225
This was previously broken, so add a test to ensure that it keeps
working.
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 23, 2026

CLA assistant check
All committers have signed the CLA.

@Tobski
Copy link
Copy Markdown
Contributor

Tobski commented Apr 24, 2026

The generated test code LGTM, but needs further review from someone more familiar with the codebase.

@Tobski
Copy link
Copy Markdown
Contributor

Tobski commented May 8, 2026

Before anyone merges this, I think we need to discuss in the Vulkan WG how we want to move forward - if we accept this change we're effectively wiping all real-world testing of untyped pointers from CTS once this is incorporated, which is probably not what we want, but it clearly fixes an issue.

@Tobski
Copy link
Copy Markdown
Contributor

Tobski commented May 8, 2026

Before anyone merges this, I think we need to discuss in the Vulkan WG how we want to move forward - if we accept this change we're effectively wiping all real-world testing of untyped pointers from CTS once this is incorporated, which is probably not what we want, but it clearly fixes an issue.

FWIW I still think we take this; let's get shaders compiling first and foremost. We should be able to more trivially make use of untyped pointers in codebases like DXC, where it's more important to use that anyway, and we should consider generating tests from that instead.

@spencer-lunarg spencer-lunarg added the Descriptor Heaps GL_EXT_descriptor_heap label May 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Descriptor Heaps GL_EXT_descriptor_heap

Projects

None yet

4 participants