Skip to content

Commit 7b8da41

Browse files
committed
fix(args): pass the view, not the buffer
1 parent 901c0a2 commit 7b8da41

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/NativeCodeGen.Core/Generation/ArgumentBuilder.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public static class ArgumentBuilder
1212
/// Gets the argument expression for a parameter, handling all parameter types:
1313
/// - Regular inputs: pass their value directly
1414
/// - Vector3: expand to x, y, z
15-
/// - Structs: pass .buffer
15+
/// - Structs: pass .view
1616
/// - Handles: pass .handle (unless rawMode)
1717
/// - Output-only pointers: pass pointer placeholder
1818
/// - Input+output pointers (@in): pass initialized pointer
@@ -53,10 +53,10 @@ public static string GetArgumentExpression(NativeParameter param, ITypeMapper ty
5353
return $"{param.Name}.r, {param.Name}.g, {param.Name}.b, {param.Name}.a";
5454
}
5555

56-
// Struct buffer
56+
// Struct view (DataView for native invoke)
5757
if (param.Type.Category == TypeCategory.Struct)
5858
{
59-
return $"{param.Name}.buffer";
59+
return $"{param.Name}.view";
6060
}
6161

6262
// Handle types - only class handles have a .handle property

0 commit comments

Comments
 (0)