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

Skip to content

Problem measuring time deltas with writeTimestamp #3952

@fintelia

Description

@fintelia

The description for writeTimestamp currently states:

Writes a timestamp value into a querySet when all previous commands have completed executing.

Notably, this doesn't guarantee that subsequent commands haven't started yet. As a result, code like this:

writeTimestamp(A)
do_some_gpu_work(...)
writeTimestamp(B)

can actually be reordered by the GPU to be:

do_some_gpu_work(...)
writeTimestamp(A)
writeTimestamp(B)

resulting in the measured time being unreasonably short.

(This is related to, but not exactly the same as gfx-rs/wgpu#2521)

Metadata

Metadata

Assignees

No one assigned

    Labels

    apiWebGPU API

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions