Conversation
|
@kolkov Hi, first off thanks for your work on this library, I'm working on migrating off of a cgo webgpu implementation on to your backend and I noticed there was no public API for the WriteTexture method I'm using in my project. I had a couple of questions; |
|
Hey @Carmen-Shannon, thanks for the PR and for choosing to migrate to our Pure Go backend! Really glad to see someone building real projects on top of wgpu — a 3D engine is exactly the kind of use case we want to support well. The I've reviewed the code and it's solid overall. A few suggestions to align with our existing patterns — happy to discuss any of these: 1.
|
|
I'll make those changes now to get this aligned better with the existing codebase, thanks for your feedback! |
|
@kolkov In regards to the validation style; I noticed that I would just like a little clarification as to what should be checked in quick edit: combining the q.hal and pointer arguments makes sense logically to me |
|
By the way, feel free to force push to keep the commit history clean — we squash merge anyway, so a single clean commit is perfectly fine. Totally up to you though. |
|
Good point — you're right that specific error messages are better for debugging. The compact style in Your approach of combining One ask: please don't change Thanks for pushing back on this, it's the right call. |
|
Your questions actually prompted some bigger thinking on our side. The public API layer was the last thing we built and we cut some corners — your PR exposed real inconsistencies in how we handle validation, error messages, and type design. We've opened two research issues to figure out the right approach going forward:
If you have thoughts on any of this — especially from the perspective of someone migrating to our library — we'd really value your input on those issues. |
kolkov
left a comment
There was a problem hiding this comment.
Looks great, thanks for the quick turnaround! All the key changes are in place — ImageCopyTexture in descriptor.go, ImageDataLayout alias, direct Origin3D assignment, and nice tests too.
One minor nit: TextureDataLayout in types.go is unused now that WriteTexture uses ImageDataLayout. Feel free to drop it, or we can clean it up later — not blocking.
Approving, good to merge once CI passes.
|
I will take a look at both of those threads and see if I can contribute any insight as I get further along with my own re-factor to get on gogpu 100%. I'm sure I'll run into something that'll prompt some good feedback for you. I fixed the descriptor.go file as I forgot to fmt it. |
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
- naga v0.14.6: MSL pass-through globals fix (naga#40) - CHANGELOG: WriteTexture (#95 by @Carmen-Shannon) + naga update
- naga v0.14.6: MSL pass-through globals fix (naga#40) - CHANGELOG: WriteTexture (#95 by @Carmen-Shannon) + naga update
No description provided.