cts icon indicating copy to clipboard operation
cts copied to clipboard

[wgsl] Validate errors are not generated for overrides which aren't present in the module.

Open dj2 opened this issue 1 year ago • 3 comments

With the decision in https://github.com/gpuweb/gpuweb/issues/4624 an override that is unused but set is allowed. There is no way to test that the value was set correctly due to it not being used, but we should have a test that it will fail shader or pipeline-creation if there is a const-evaluation error.

There are two cases to be tested:

  1. Override exists in module without a default
  2. Override exists in module with a default

For 1. we need a test where the override has no default in the module, is unused by the entry point and when it is set at pipeline creation it overflows and a pipeline-creation error should be reported.

For 2. we need a test where the override has a default in the module, is unused by the entry point and the value calculation overflows this causes a shader creation error.

dj2 avatar May 15 '24 14:05 dj2

This blocked on the resolution of https://github.com/gpuweb/gpuweb/issues/4648

dj2 avatar May 16 '24 15:05 dj2

This blocked on the resolution of gpuweb/gpuweb#4648

The resolution of that issue means no errors occur for unused overrides. I believe that means there are no tests to add as a result.

alan-baker avatar Jul 02 '24 13:07 alan-baker

The title did not match the description. We just need to add a test that the pipeline is created when there are overrides provided to the pipeline that do not exist in the shader module.

dj2 avatar Mar 19 '25 14:03 dj2