You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many WebGPU CTS tests exercise validation of command encoders with error scopes used this way:
Set up a device and a command encoder.
Do something invalid during command encoding, like using an occlusion query in a GPURenderPassDescriptor.timestampWrites.
Push an error scope, finish the command encoder, and pop an error scope to check if there was a validation error.
WGPU emits errors for validation during command encoding before calling CommandEncoder::finish, and it shouldn't. It's difficult to cite spec. text that is not present, but the easiest way to summarize is that "generate a validation error" does not show up in the validation steps performed by the various methods of GPUCommandEncoder and {Compute,Render}PassEncoderexcept for GPUCommandEncoder.finish.
The MVP for this is to stop emitting validation errors on CommandEncoder, RenderPassEncoder, and ComputePassEncoder methods. These methods already invalidate the associated CommandEncoder and other objects when failing validation, so no action should be needed there.
The above loses some significant diagnostic quality. We'll probably want to store the first validation error a command encoder encounters, to counter this.
This issue is likely to become a meta issue, since the API surface to which this issue applies is pretty broad.
The text was updated successfully, but these errors were encountered:
Many WebGPU CTS tests exercise validation of command encoders with error scopes used this way:
GPURenderPassDescriptor.timestampWrites
.finish
the command encoder, and pop an error scope to check if there was a validation error.WGPU emits errors for validation during command encoding before calling
CommandEncoder::finish
, and it shouldn't. It's difficult to cite spec. text that is not present, but the easiest way to summarize is that "generate a validation error" does not show up in the validation steps performed by the various methods ofGPUCommandEncoder
and{Compute,Render}PassEncoder
except forGPUCommandEncoder.finish
.Steps to reproduce
Suggested implementation design
CommandEncoder
,RenderPassEncoder
, andComputePassEncoder
methods. These methods already invalidate the associatedCommandEncoder
and other objects when failing validation, so no action should be needed there.This issue is likely to become a meta issue, since the API surface to which this issue applies is pretty broad.
The text was updated successfully, but these errors were encountered: