-
Notifications
You must be signed in to change notification settings - Fork 344
Description
I think there is a mismatch between what the webgpu:api,validation,encoding,cmds,setBindGroup:state_and_binding_index:* CTS test expects and the spec.
The test expects submit to fail if any resource in the bindgroup was destroyed even though the bindgroup was not used for any command (as referenced by "Enqueue a command"/"Enqueue a render command").
Relevant validation snippet of submit() in the spec:
I assume "command" refers to a command in the [[command_list]] property of a command buffer.
What is the intended behavior? Is it intended that state-setting commands (i.e. any function that doesn't use "Enqueue a command"/"Enqueue a render command") don't count as "commands"?
Note that if the answer is yes, this impacts implementation strategies since implementations might not be able to eagerly encode these state-setting commands since they potentially include destroyed resources. A concrete example:
passEnc.setPipeline(validPipeline);
passEnc.setBindGroup(0, destroyedBindGroup); // <- implementations might not be able to eagerly encode this call
passEnc.setBindGroup(0, validBindGroup);
passEnc.dispatchWorkgroups(...);
passEnc.end();
const cmdBuf = cmdEnc.finish()
queue.submit([cmdBuf]); // <- should this error?