webgpu / webgpufundamentals

https://webgpufundamentals.org
BSD 3-Clause "New" or "Revised" License
624 stars 88 forks source link

Remove entryPoint seem broke example #86

Closed iamgqb closed 7 months ago

iamgqb commented 7 months ago

This commit remove all entry points. https://github.com/webgpu/webgpufundamentals/commit/abe4e2e8b9cc4eeb52b3ba4ed1d24a6d64263ec8

And now all sample on https://webgpufundamentals.org/ is not working.

for example the first article

image

the error message indicate the entryPoint is required

image

add the entryPoint , the example working

image
greggman commented 7 months ago

Sorry, please upgrade to chrome v121 (assuming you're using Chrome). I will add a message asap

greggman commented 7 months ago

I added a msg

Screenshot 2024-01-25 at 11 43 16

Note: This is a non-breaking change to the WebGPU spec. It used to be that entryPoint: 'nameOfEntryPoint' was required but the spec changed so that if there is only a single entry point of the correct type (@vertex, @fragment, @compute then you don't need to specify an entry point. WebGPU will use the single entry point. Non-breaking means the old unchanged examples still work. The ones with entryPoint: 'vs', etc...

My guess is, not specifying the entryPoint will become the most common way to use WebGPU as it's less tedious and since this site is about teaching WebGPU it seemed best to switch it to this likely more common way. Unfortunately that means requiring version 121 or greater of Chrome. Safari Technology Preview already supports this feature. Firefox Nightly has other issues but should also support WebGPU enough to run most of the samples here soon.

iamgqb commented 7 months ago

wow,nice feature!I will close this issue.

Thank you for your response and tip.

greggman commented 7 months ago

I reverted these. I'm waffling on which way is better

It's clearer (So good for learning) that to see entryPoint: 'nameOfFunction' but it's likely most devs will leave it out so 🤔