KhronosGroup / Vulkan-Docs

The Vulkan API Specification and related tools
Other
2.82k stars 470 forks source link

Ability to create pointers to Workgroup/Shared memory in shaders #1756

Open Cazadorro opened 2 years ago

Cazadorro commented 2 years ago

Feature request for workgroup/shared memory pointers.

Ideally we could get pointers to workgroup/shared memory like in cuda/opencl.

void foo(float * ptr){
...
}

...

shared float x[32];
foo(&x);

On the vulkan discord there was discussion after the first vulkanized event about the fact in hardware, there are performance considerations for being able to deal with both shared/global pointers in a function. So for the purposes of this feature request, the only thing actually being requested is the features of PhysicalStorageBuffer, but for just the workgroup storage class.

This would allow us to

marty-johnson59 commented 2 years ago

@cazadorro, thanks for the input and sorry for the delayed reply. We are just now gearing up for the next round of projects, and will add this request to the discussion queue to determine how it fits into plans/priorities.