Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More mips per pass #1

Open
JolifantoBambla opened this issue Apr 21, 2024 · 3 comments
Open

More mips per pass #1

JolifantoBambla opened this issue Apr 21, 2024 · 3 comments

Comments

@JolifantoBambla
Copy link
Owner

Native SPD supports up to 12 mips per pass. WebGPU doesn't support arrays of textures and read-write access for most formats yet but someday it will.

@JolifantoBambla
Copy link
Owner Author

Ok, so in v2, I'll just use a coherent buffer for the mid mip - according to this, buffers are coherent by default - so that would let me (personally) do at least 8 mips per pass (all adapters I've tested with allow only 8). For more, I guess I still have to wait for arrays of textures.
Since wgpu buffers are not coherent by default yet (?), doing only up to 6 mips per pass should stay the default behavior for now though, I guess. So I'll let setPreferredLimit still set maxStorageTexturesPerShaderStage to 6 in v2.

@JMS55
Copy link

JMS55 commented Apr 24, 2024

Wgpu buffers are not currently coherent. I ran into this recently with my own SPD port to wgsl bevyengine/bevy#13003. At the point where you switch to the last active workgroup processing the last 64x64 tile, the writes from the previous pass by other workgroups will not be visible to the last workgroup.

@JolifantoBambla
Copy link
Owner Author

Yeah, that's unfortunate :/
I just added some config params now, so that firefox users can fall back to 6 mips per pass, while still supporting more than 6 on chrome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants