{"action":"created","issue":{"url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/1071","repository_url":"https://api.github.com/repos/vulkano-rs/vulkano","labels_url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/1071/labels{/name}","comments_url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/1071/comments","events_url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/1071/events","html_url":"https://github.com/vulkano-rs/vulkano/pull/1071","id":367844240,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIxMTU5MjQ1","number":1071,"title":"Add ranges for GPU locks","user":{"login":"aleksijuvani","id":3168386,"node_id":"MDQ6VXNlcjMxNjgzODY=","avatar_url":"https://avatars3.githubusercontent.com/u/3168386?v=4","gravatar_id":"","url":"https://api.github.com/users/aleksijuvani","html_url":"https://github.com/aleksijuvani","followers_url":"https://api.github.com/users/aleksijuvani/followers","following_url":"https://api.github.com/users/aleksijuvani/following{/other_user}","gists_url":"https://api.github.com/users/aleksijuvani/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksijuvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksijuvani/subscriptions","organizations_url":"https://api.github.com/users/aleksijuvani/orgs","repos_url":"https://api.github.com/users/aleksijuvani/repos","events_url":"https://api.github.com/users/aleksijuvani/events{/privacy}","received_events_url":"https://api.github.com/users/aleksijuvani/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-10-08T15:31:04Z","updated_at":"2018-10-13T17:02:04Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/vulkano-rs/vulkano/pulls/1071","html_url":"https://github.com/vulkano-rs/vulkano/pull/1071","diff_url":"https://github.com/vulkano-rs/vulkano/pull/1071.diff","patch_url":"https://github.com/vulkano-rs/vulkano/pull/1071.patch"},"body":"* [x] Added an entry to `CHANGELOG.md` if knowledge of this change could be valuable to users\r\n* [x] Updated documentation to reflect any user-facing changes - in this repository\r\n* [x] Updated documentation to reflect any user-facing changes - PR to the [guide](https://github.com/vulkano-rs/vulkano-www) that fixes existing documentation invalidated by this PR.\r\n\r\nFixes #1070.\r\n\r\nWould like to request feedback. There's some more work to be done before this should be merged, e.g. `try_gpu_lock` and related functions could be refactored into a `GpuAccess` struct which is then added as a field to all the different buffers.\r\n\r\nOnly the `DeviceLocalBuffer` currently supports the locking of subranges. Would it also be desirable to implement this for other types of buffers? For `ImmutableBuffer` I think locking the buffer is a no-op anyway, but what about `CpuAccessibleBuffer` and `CpuBufferPool`?\r\n\r\nI think it would make sense to also support this for `CpuAccessibleBuffer`, but I'm not sure about `CpuBufferPool`. Considering how `CpuBufferPool` is generally used (a chunk of the buffer is filled with data, sent to the GPU, and then another chunk of the buffer is used the next frame), does it even make sense to support this?"},"comment":{"url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/comments/429557992","html_url":"https://github.com/vulkano-rs/vulkano/pull/1071#issuecomment-429557992","issue_url":"https://api.github.com/repos/vulkano-rs/vulkano/issues/1071","id":429557992,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU1Nzk5Mg==","user":{"login":"aleksijuvani","id":3168386,"node_id":"MDQ6VXNlcjMxNjgzODY=","avatar_url":"https://avatars3.githubusercontent.com/u/3168386?v=4","gravatar_id":"","url":"https://api.github.com/users/aleksijuvani","html_url":"https://github.com/aleksijuvani","followers_url":"https://api.github.com/users/aleksijuvani/followers","following_url":"https://api.github.com/users/aleksijuvani/following{/other_user}","gists_url":"https://api.github.com/users/aleksijuvani/gists{/gist_id}","starred_url":"https://api.github.com/users/aleksijuvani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aleksijuvani/subscriptions","organizations_url":"https://api.github.com/users/aleksijuvani/orgs","repos_url":"https://api.github.com/users/aleksijuvani/repos","events_url":"https://api.github.com/users/aleksijuvani/events{/privacy}","received_events_url":"https://api.github.com/users/aleksijuvani/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T17:02:04Z","updated_at":"2018-10-13T17:02:04Z","author_association":"NONE","body":"So I wrote a benchmark, and locking and unlocking 100 locks takes around 33 µs on my system, which is acceptable, but as soon as we're up to 1000 locks it starts to take around 3.30 ms. It's not unusual for games to issue thousands of draw calls, so we should definitely try to optimize this.\r\n\r\nI think we should be able to get this number down if we implemented the range overlap checks with an interval tree instead of naively looping through all the ranges to check if they overlap. I'll give it a try."}}
{"actor":{"display_login":"aleksijuvani"}}