-
Notifications
You must be signed in to change notification settings - Fork 547
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
Query API and basic support on Metal #2334
Conversation
Looks like we are blocked on ash-rs/ash#100 for Vulkan :( |
Current status: 136 / 150 occlusion tests passing
|
Vulkan is blocked on ash-rs/ash#105 now |
Update on Metal: all the known issues are resolved. We pass 150/150 tests without failures or hangs 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
HAL changes LGTM
src/hal/src/device.rs
Outdated
|
||
/// Destroy a query pool object | ||
fn destroy_query_pool(&self, pool: B::QueryPool); | ||
|
||
/// Get query pool results into the specified CPU memory. | ||
/// Returns `Ok(false)` if the resutls are not ready yet and neither of `WAIT` or `PARTIAL` flags are set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resutls
-> results
src/backend/vulkan/src/command.rs
Outdated
) { | ||
let mut flags = vk::QueryControlFlags::empty(); | ||
if control.contains(query::QueryControl::PRECISE) { | ||
if control.contains(query::ControlFlags::PRECISE) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
map_query_control_flags
instead?
src/backend/metal/src/device.rs
Outdated
let is_ready = if flags.contains(query::ResultFlags::WAIT) { | ||
let mut guard = visibility.allocator.lock(); | ||
while !visibility.are_available(pool_range.start, &queries) { | ||
println!("query: not available"); //TEMP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this left here intentionally?
let queries = self.active_visibility_queries | ||
.drain(..) | ||
.collect::<SmallVec<[_; BLOCK_BUCKET]>>(); | ||
Some((Arc::clone(&self.shared), queries)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need to cloneself.shared
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we clone the Arc
, so that we can use the visibility shared structures in the callback
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I didn't notice the callback block. Sounds good
src/backend/metal/src/command.rs
Outdated
size: size_meta, | ||
}, | ||
}; | ||
// An extra paddig is requred if the client expects 64bits availability without a wait |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
paddig
-> padding
Thanks @grovesNL ! comments are addressed |
src/backend/metal/src/command.rs
Outdated
|
||
let (com_avail, com_pad) = if flags.contains(query::ResultFlags::WITH_AVAILABILITY | query::ResultFlags::WAIT) { | ||
// Technically waiting is a no-op on a single queue. However, | ||
// the client expects the avaiability to be set regardless. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
avaiability
-> availability
Landing, as per approval on gitter. |
2334: Query API and basic support on Metal r=grovesNL a=kvark Fixes #1638 (for the most part) PR checklist: - [x] `make` succeeds (on *nix) - [x] `make reftests` succeeds - [ ] tested examples with the following backends: - [ ] `rustfmt` run on changed code Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Build failed |
Bors retry
… On Aug 22, 2018, at 22:16, bors[bot] ***@***.***> wrote:
Build failed
continuous-integration/travis-ci/push
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
2334: Query API and basic support on Metal r=grovesNL a=kvark Fixes #1638 (for the most part) PR checklist: - [x] `make` succeeds (on *nix) - [x] `make reftests` succeeds - [ ] tested examples with the following backends: - [ ] `rustfmt` run on changed code Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Build failed |
Bors retry
… On Aug 22, 2018, at 22:53, bors[bot] ***@***.***> wrote:
Build failed
continuous-integration/travis-ci/push
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Bors r=grovesNL
… On Aug 22, 2018, at 22:53, bors[bot] ***@***.***> wrote:
Build failed
continuous-integration/travis-ci/push
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Not awaiting review |
2334: Query API and basic support on Metal r=grovesNL a=kvark Fixes #1638 (for the most part) PR checklist: - [x] `make` succeeds (on *nix) - [x] `make reftests` succeeds - [ ] tested examples with the following backends: - [ ] `rustfmt` run on changed code Co-authored-by: Dzmitry Malyshau <kvarkus@gmail.com>
Oh yes you are, silly bors!
… On Aug 23, 2018, at 00:08, bors[bot] ***@***.***> wrote:
Not awaiting review
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Fixes #1638 (for the most part)
PR checklist:
make
succeeds (on *nix)make reftests
succeedsrustfmt
run on changed code