Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds raw flag for vertex and index buffer #2370

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

tebjan
Copy link
Member

@tebjan tebjan commented Jul 3, 2024

PR Details

Adds the BufferFlags.RawBuffer to relevant instances of index and vertex buffers to allow binding them to compute shaders.

Related Issue

See #1638

Types of changes

  • Docs change / refactoring / dependency upgrade
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • My change requires a change to the documentation.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have built and run the editor to try this change out.

@tebjan tebjan marked this pull request as draft July 3, 2024 13:59
@tebjan
Copy link
Member Author

tebjan commented Jul 5, 2024

The initial approach was too simple and requires more work. Creating raw buffer views involves more than just setting a flag. It requires different flags and formats for the buffer and buffer view, leading to more changes in Stride. To create a raw view, the buffer must be created with D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS and not combined with other buffer types. This involves using CreateBuffer, CreateShaderResourceView, and CreateUnorderedAccessView with specific flags and structures. These changes are not trivial to implement.

For more details, see Raw Views of Buffers.

Currently thinking about another approach.

@tebjan tebjan force-pushed the dev/tebjan/vertex-index-buffer-raw-flag branch from 5cbac0f to 665827a Compare July 19, 2024 15:52
@tebjan tebjan force-pushed the dev/tebjan/vertex-index-buffer-raw-flag branch from 665827a to e41e4c5 Compare July 19, 2024 16:43
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.

2 participants