dictionary GPUDepthStencilState { GPUStencilFaceState stencilFront = {}; } The "= {}" is not supported.
Also the "= {}" in interface GPUCommandEncoder { GPUComputePassEncoder beginComputePass(optional GPUComputePassDescriptor descriptor = {});
<rdar://problem/85238647>
In most cases, we do the right thing if just remove the "= { }" because most interfaces treat `nullopt` and default constructed inner type the same. That said, this would certainly be nice to fix.
(In reply to Sam Weinig from comment #3) > In most cases, we do the right thing if just remove the "= { }" because most > interfaces treat `nullopt` and default constructed inner type the same. > > That said, this would certainly be nice to fix. I implemented this by adding the parsing for = {} and returning the "default" value as "{}". Do I need to update the generator if "we do the right thing..."? (I saw we handle $default == "[]")
If you just want to add the parsing now that is probably fine. I can add the code generator support at some point.
Ok, (In reply to Sam Weinig from comment #5) > If you just want to add the parsing now that is probably fine. I can add the > code generator support at some point. Thanks. I've added the parsing (which was pretty simple) and have the parse return undef so the = {} is effectively accepted and thrown away.
Created attachment 453901 [details] Patch
Comment on attachment 453901 [details] Patch Can you add a test?
Created attachment 454181 [details] Patch
Now with added testing.
Created attachment 454182 [details] Patch
This r+ but I checked on Webkit Github that it has not landed and noticed that it failed some test cases. Is this required? Thanks!
Pull request: https://github.com/WebKit/WebKit/pull/3982
Committed 254138@main (551709dd217f): <https://commits.webkit.org/254138@main> Reviewed commits have been landed. Closing PR #3982 and removing active labels.