-
Notifications
You must be signed in to change notification settings - Fork 345
Closed
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)
Milestone
Description
dictionary GPURenderPassTimestampWrite {
required GPUQuerySet querySet;
required GPUSize32 queryIndex;
required GPURenderPassTimestampLocation location;
};
partial dictionary GPURenderPassDescriptor : GPUObjectDescriptorBase {
GPURenderPassTimestampWrites timestampWrites = [];
};
Following the SPEC, we could set timestampWrites as below:
GPURenderPassDescriptor descriptor;
descriptor.timestampWrites[0].querySet = querySet;
descriptor.timestampWrites[0].queryIndex = 0;
descriptor.timestampWrites[0].location = "beginning";
descriptor.timestampWrites[1].querySet = querySet;
descriptor.timestampWrites[1].queryIndex = 1;
descriptor.timestampWrites[1].location = "beginning";
But for Metal on TBDR devices, only the queryIndex 1 has timestamp values, the value at queryIndex 0 is always zero.
I'm not sure whether it's a bug of MTLRenderPassDescriptor.sampleBufferAttachments, or it's a real limition (No error from validation layer).
Another issue is writing the timestamp of the different location to a different querySet, it also does not work:
GPURenderPassDescriptor descriptor;
descriptor.timestampWrites[0].querySet = querySet0;
descriptor.timestampWrites[0].queryIndex = 0;
descriptor.timestampWrites[0].location = "beginning";
descriptor.timestampWrites[1].querySet = querySet1;
descriptor.timestampWrites[1].queryIndex = 1;
descriptor.timestampWrites[1].location = "end";
Only the seond querySet could be written with timestamp value.
Metadata
Metadata
Assignees
Labels
copyeditingPure editorial stuff (copyediting, *.bs file syntax, etc.)Pure editorial stuff (copyediting, *.bs file syntax, etc.)