[Graphics] Vertex buffers cannot be bound to compute shaders
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 7.8k
- Forks
- 1.2k
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 49
Description
Describe the bug
Vertex buffers cannot be used in compute shaders because the AllowRawViews flag is not set. See Raw Views of Buffers.
A fix would be to simply add the raw view flag. This doesn't limit any functionality but allows for more usage of the buffer. Also useful for index buffers.
To Reproduce
Bind vertex buffer to a compute shader resource defined as ByteAddressBuffer.
Expected behavior
Buffer can be read in a compute shader
Additional context
This can be used to process geometry with compute shaders.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named. Start at the vertex-buffer creation path and compare its resource flags with the Direct3D 11 raw-buffer requirements; reproduce the ByteAddressBuffer compute-shader case, then verify vertex and index buffers can be read from a compute shader.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- computer-graphics, game-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100