Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kdashg
Copy link
Contributor

@kdashg kdashg commented Feb 21, 2020

If size is zero, the size of the {{GPUBuffer}} is used. (Binding a subset instead of the
whole buffer allows for concurrent use of other parts of the buffer)

This potentially includes mapping subsets of otherwise in-use buffers.


Preview | Diff

If `size` is zero, the size of the {{GPUBuffer}} is used. (Binding a subset instead of the
whole buffer allows for concurrent use of other parts of the buffer)

This potentially includes mapping subsets of otherwise in-use buffers.
@Kangz
Copy link
Contributor

Kangz commented Feb 21, 2020

If we are to start talking about buffer subrange usage tracking, we'll need a lot more detailed proposal than this. The note in parenthesis has HUGE implications for everything else that deals with buffers.

@kdashg
Copy link
Contributor Author

kdashg commented Feb 21, 2020

I don't think we need an explicit proposal. It's possible today for implementations to do some degree of concurrent use, but this makes it easier even if we never go further at the API level.

@Kangz
Copy link
Contributor

Kangz commented Feb 24, 2020

Sounds good, also as @kvark pointed out on chat it makes the API more regular because with this PR all buffer entrypoints taking an offset also take a size. Can we still remove that note in parenthesis? Either the spec explicitly deal with subranges, or it falls under the as-if rule.

Copy link
Contributor

@kvark kvark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this for making our API consistent: in all the places where a resource is used we specify the exact part of the resource being used.

@kvark
Copy link
Contributor

kvark commented Feb 24, 2020

Also related - #491 (comment)

@kdashg kdashg requested a review from kainino0x March 10, 2020 07:55
@kdashg
Copy link
Contributor Author

kdashg commented Mar 10, 2020

Fixed, PTAL!

@kdashg
Copy link
Contributor Author

kdashg commented Mar 10, 2020

Yep, remaining size, updated. PTAL!

@kdashg kdashg merged commit 07a2e3e into gpuweb:master Mar 10, 2020
JusSn pushed a commit to JusSn/gpuweb that referenced this pull request Jun 8, 2020
* Add `size` to setIndexBuffer/setVertexBuffer.

If `size` is zero, the size of the {{GPUBuffer}} is used. (Binding a subset instead of the
whole buffer allows for concurrent use of other parts of the buffer)

This potentially opens the door to mapping subsets of otherwise in-use buffers.

* Remove in-spec comment speculating on sub-range validation.
* `size=0` => remaining size *after offset*.
JusSn pushed a commit to JusSn/gpuweb that referenced this pull request Jun 8, 2020
* Add `size` to setIndexBuffer/setVertexBuffer.

If `size` is zero, the size of the {{GPUBuffer}} is used. (Binding a subset instead of the
whole buffer allows for concurrent use of other parts of the buffer)

This potentially opens the door to mapping subsets of otherwise in-use buffers.

* Remove in-spec comment speculating on sub-range validation.
* `size=0` => remaining size *after offset*.
ben-clayton pushed a commit to ben-clayton/gpuweb that referenced this pull request Sep 6, 2022
- Added descriptions to all tests
- Fixed naming where appropriate
- Added more test cases to the viewDimensions test.

<hr>

**Author checklist for test code/plans:**

- [x] All outstanding work is tracked with "TODO" in a test/file description or `.unimplemented()` on a test.
- [x] New helpers, if any, are documented in `helper_index.md`.
- [x] (Optional, sometimes not possible.) Tests pass (or partially pass without unexpected issues) in an implementation. (Add any extra details above.)
    
**[Reviewer sign-off](https://github.com/gpuweb/cts/blob/main/docs/reviews.md) for test code/plans:** (Note: feel free to pull in other reviewers at any time for any reason.)

- [x] The test path is reasonable, the [description](https://github.com/gpuweb/cts/blob/main/docs/intro/plans.md) "describes the test, succinctly, but in enough detail that a reader can read only the test plans in a file or directory and evaluate the completeness of the test coverage."
- [ ] Tests appear to cover this area completely, except for outstanding TODOs. Validation tests use control cases.
    (This is critical for coverage. Assume anything without a TODO will be forgotten about forever.)
- [x] Existing (or new) test helpers are used where they would reduce complexity.
- [x] TypeScript code is readable and understandable (is unobtrusive, has reasonable type-safety/verbosity/dynamicity).
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.

4 participants