Fix packet scatter to raw pointers - #518
Open
jeongseok-meta wants to merge 9 commits into
Open
jeongseok-meta wants to merge 9 commits into
jeongseok-meta wants to merge 9 commits into
Conversation
jeongseok-meta
added a commit
to jeongseok-meta/drjit
that referenced
this pull request
Jul 21, 2026
jeongseok-meta
force-pushed
the
fix-raw-pointer-packet-scatter
branch
from
July 21, 2026 10:17
086a67e to
e25a39c
Compare
wjakob
force-pushed
the
master
branch
3 times, most recently
from
August 18, 2026 14:29
c0798bb to
93575f9
Compare
wjakob
force-pushed
the
master
branch
2 times, most recently
from
August 21, 2026 11:19
405372d to
43b0a48
Compare
Preserve index nesting during recursive packet flattening, support native nested DynamicArray values, and reject unsupported dynamic/JIT/AD outer values with one diagnostic. Add focused regression coverage for both nested cases.
8 tasks
wjakob
force-pushed
the
master
branch
2 times, most recently
from
September 9, 2026 19:52
b7d95ca to
12b41af
Compare
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.
Motivation
dr::scatter()accepts raw-pointer targets, but packet values currently try to callscatter_packet_on the pointer type. Pointer expressions such as.data()also cannot bind to the existing lvalue target parameter. This prevents Momentum's rasterizer from building.conda-forge currently carries a patch for this behavior. It can be removed after this fix is included in a Dr.Jit release.
Changes
DynamicArrayrecursion.DynamicArrayvalues, signed indices, and explicit-template lvalue calls.Testing
DynamicArrayvalues.[1, ..., 16], confirming recursive flattening without collisions.DynamicArraypacket scatter produces[1, 2, 3, 4, 5, 6]; dynamically sized outer values and JIT/AD packet values fail with only the intended unsupported-value diagnostic.DynamicArrayvalues but fails to compile for static arrays containing JIT/AD elements; Momentum's raw-pointer callers use native fixed-size packets.tests/test_call_ext.py: 128 passedpymomentum/test/test_renderer.pypasses all 8 tests.python -m py_compile tests/test_memop_ext.pygit diff --check