stride3d / stride3d/stride

[Graphics] Vertex buffers cannot be bound to compute shaders

Open
#1,638 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.