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

Improve the note about unexpected timestamp values #4135

Merged
merged 3 commits into from
May 25, 2023
Merged

Conversation

toji
Copy link
Member

@toji toji commented May 24, 2023

Fixes #4069

Removes the reference to timestamps being zeroed out and instead encourages developers to be aware of occasional nonsensical values.

Fixes #4069

Removes the reference to timestamps being zeroed out and instead
encourages developers to be aware of occasional nonsensical values.
@toji toji requested review from kainino0x and litherum May 24, 2023 19:40
@github-actions
Copy link
Contributor

github-actions bot commented May 24, 2023

Previews, as seen when this build job started (1d9b0e8):
WebGPU webgpu.idl | Explainer | Correspondence Reference
WGSL grammar.js | wgsl.lalr.txt

spec/index.bs Outdated Show resolved Hide resolved
spec/index.bs Outdated Show resolved Hide resolved
spec/index.bs Outdated
Note: The physical device may reset the timestamp counter occasionally, which can result in
unexpected values such as negative deltas between timestamps that logically should be monotonically
increasing. These instances should be rare and can safely be ignored. Applications should not be
written in such a way that unexpected timestamps cause an application failure.
Copy link
Contributor

Choose a reason for hiding this comment

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

Add cross-references from the two timestampWrites members and the writeTimestamp method saying something like "The timestamp written is in nanoseconds, but its value is implementation-defined and may not increase monotonically. See [[#timestamp]]."

Copy link
Member Author

Choose a reason for hiding this comment

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

This is already in the [[#timestamp]] section. I've moved it to make that more apparent.

Copy link
Contributor

Choose a reason for hiding this comment

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

What I meant is we should add links from timestampWrites/writeTimestamp to this section. Otherwise this text is not going to be easily found by developers, I think.

Copy link
Member Author

Choose a reason for hiding this comment

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

Ah! Got it. Updated to point towards this section from the other relevant definitions.

@kainino0x kainino0x merged commit 32533cd into main May 25, 2023
4 checks passed
@kainino0x kainino0x deleted the timestamp_note branch May 25, 2023 00:34
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.

Timestamp query resets
2 participants