feat(ImageCPRMapper): add ImageCPRMapper in WebGPU#3471
Open
daker wants to merge 3 commits intoKitware:masterfrom
Open
feat(ImageCPRMapper): add ImageCPRMapper in WebGPU#3471daker wants to merge 3 commits intoKitware:masterfrom
daker wants to merge 3 commits intoKitware:masterfrom
Conversation
WebGPU Glyph3DMapper could create a zero-byte glyphSSBO when the glyph mapper had no instances. Dawn rejects bind groups that bind zero-sized storage buffers, which caused runtime validation failures during CreateBindGroup. This change keeps the draw count at zero but allocates a single dummy SSBO instance when numInstances === 0, initializing identity matrix/normal data and default color when needed. That preserves behavior while ensuring the storage buffer binding remains valid.
2a5297c to
94b95e5
Compare
94b95e5 to
f3714a8
Compare
finetjul
reviewed
Apr 7, 2026
Member
finetjul
left a comment
There was a problem hiding this comment.
I did a quick review, looks fine generally speaking. Did not try it.
| ' else if (planeNum == 3u) { plane = mapperUBO.ClipPlane3; }', | ||
| ' else if (planeNum == 4u) { plane = mapperUBO.ClipPlane4; }', | ||
| ' else if (planeNum == 5u) { plane = mapperUBO.ClipPlane5; }', | ||
| ' if (dot(plane, vec4<f32>(volumePosMC, 1.0)) < 0.0) { discard; }', |
Member
There was a problem hiding this comment.
to consolidate with other mappers.
Collaborator
Author
There was a problem hiding this comment.
i will refactor this after the clipping planes PR is merged
31 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Results
Changes
PR and Code Checklist
npm run reformatto have correctly formatted codeTesting