Skip to content

Commit

Permalink
Move pipeline statistics query to render encoder and compute encoder (g…
Browse files Browse the repository at this point in the history
…puweb#797)

These query APIs do not support on render bundles.
  • Loading branch information
haoxli authored Jun 1, 2020
1 parent 57c4179 commit 0268a8d
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions spec/index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3693,9 +3693,6 @@ interface mixin GPUProgrammablePassEncoder {
void pushDebugGroup(USVString groupLabel);
void popDebugGroup();
void insertDebugMarker(USVString markerLabel);

void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);
void endPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);
};
</script>

Expand Down Expand Up @@ -3780,6 +3777,9 @@ interface GPUComputePassEncoder {
void dispatch(GPUSize32 x, optional GPUSize32 y = 1, optional GPUSize32 z = 1);
void dispatchIndirect(GPUBuffer indirectBuffer, GPUSize64 indirectOffset);

void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);
void endPipelineStatisticsQuery();

void endPass();
};
GPUComputePassEncoder includes GPUObjectBase;
Expand Down Expand Up @@ -3854,6 +3854,9 @@ interface GPURenderPassEncoder {
void beginOcclusionQuery(GPUSize32 queryIndex);
void endOcclusionQuery(GPUSize32 queryIndex);

void beginPipelineStatisticsQuery(GPUQuerySet querySet, GPUSize32 queryIndex);
void endPipelineStatisticsQuery();

void executeBundles(sequence<GPURenderBundle> bundles);
void endPass();
};
Expand Down Expand Up @@ -4171,7 +4174,9 @@ enum GPUPipelineStatisticName {
};
</script>

When resolving pipeline statistics query, each result is written into uint64, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.
* When resolving pipeline statistics query, each result is written into uint64, and the number and order of the results written to GPU buffer matches the number and order of {{GPUPipelineStatisticName}} specified in {{GPUQuerySetDescriptor/pipelineStatistics}}.

* {{GPURenderPassEncoder/beginPipelineStatisticsQuery()}} and {{GPURenderPassEncoder/endPipelineStatisticsQuery()}} (on both {{GPUComputePassEncoder}} and {{GPURenderPassEncoder}}) cannot be nested. A pipeline statistics query must be ended before beginning another one.


# Canvas Rendering &amp; Swap Chains # {#canvas-rendering}
Expand Down

0 comments on commit 0268a8d

Please sign in to comment.