Add GPUComandEncoder.fillBuffer()#2208
Merged
litherum merged 3 commits intogpuweb:mainfrom Oct 26, 2021
Merged
Conversation
Fixes gpuweb#1968. In the future, we can add a 4th parameter, |value|, of type "octet" or "byte". For now, though, the group seems to have just agreed on zeroing, rather than filling with a particular byte.
D3D implementations can implement this by copying from a pre-zeroed buffer. (If the buffer just happens to also have GPUBufferUsage.STORAGE, then D3D implementations can use ID3D12GraphicsCommandList::ClearUnorderedAccessViewUint(), if it's faster. But it isn't necessary.)
Contributor
Contributor
Kangz
approved these changes
Oct 25, 2021
kvark
approved these changes
Oct 26, 2021
Contributor
kvark
left a comment
There was a problem hiding this comment.
That's going to be useful!
Contributor
RobinMorisset
pushed a commit
to RobinMorisset/gpuweb
that referenced
this pull request
Nov 4, 2021
Add GPUComandEncoder.fillBuffer() (gpuweb#2208) Fixes gpuweb#1968. In the future, we can add a 4th parameter, `value`, of type `octet` or `byte`. For now, though, the group seems to have just agreed on zeroing, rather than filling with a particular byte. There are two commits in this PR, one that requires `GPUBufferUsage.STORAGE` on the buffer, and a second that relaxes this requirement because of gpuweb#1968 (comment).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1968.
In the future, we can add a 4th parameter,
value, of typeoctetorbyte. For now, though, the group seems to have just agreed on zeroing, rather than filling with a particular byte.There are two commits in this PR, one that requires
GPUBufferUsage.STORAGEon the buffer, and a second that relaxes this requirement because of #1968 (comment).Preview | Diff