-
Notifications
You must be signed in to change notification settings - Fork 335
Move pipeline statistics query to render encoder and compute encoder #797
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
Conversation
void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1); | ||
void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); | ||
|
||
void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); |
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.
Just a crazy thought: we could just make it a part of the compute pass:
dictionary GPUComputePassDescriptor {
GPUQuerySet? pipelineStatisticsQuerySet;
optional GPUSize32 pipelineStatisticsQueryIndex = 0;
};
That would have a bit less spec text duplication and complexity.
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.
To reduce duplication there could alternatively be a GPUPassEncoderBase
that shares stuff between GPUComputePassEncoder
and GPURenderPassEncoder
. In particular we'll want to finer detail control over memory barriers in compute passes eventually, and this would lead to "fatter" compute passes so having a single pipelineStatistics per pass would be too constraining.
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.
Another consideration is there is also an occlusionQuerySet in GPURenderPassDescriptor
, if add a pipelineStatisticsQuerySet, maybe it's a duplication in spec, and there will be timestamp query in the future.
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.
I think it makes sense for these to be totally separate (and specced separately) since they expose different things. Compute shader invocations only in compute passes, everything else only in render passes.
spec/index.bs
Outdated
void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset); | ||
|
||
void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); | ||
void endPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex); |
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.
Actually, since pipeline statistics queries can't be nested, could this just be endPipelineStatisticsQuery()
?
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.
Yes, I will remove these args.
313eb61
to
64ff17e
Compare
These query APIs do not support on render bundles.
beginPipelineStatisticsQuery and endPipelineStatisticsQuery have been changed in gpuweb#797, remove them in GPUProgrammablePassEncoder which are added when rebasing.
* Query API: Timestamp Query * Add writeTimestamp in GPUCommandEncoder * Add extension requirements in queries * Add issue for constraints on the availability * Unified text format * Move writeTimestamp to render/compute encoders beginPipelineStatisticsQuery and endPipelineStatisticsQuery have been changed in #797, remove them in GPUProgrammablePassEncoder which are added when rebasing. * Update spec/index.bs * Update spec/index.bs
This file was incorrectly named `float_built_functions.spce.ts`
These query APIs do not support on render bundles, move them to
GPUComputePassEncoder
andGPURenderPassEncoder
.Issue: #794
Preview | Diff