Commit 94a6104
fix(object-array): wire VX_TYPE_USER_DATA_OBJECT into exemplar dispatch
The Khronos CTS `UserDataObject.UserKernelObjectArray/*` subtests
(test_user_data_object.c:516) call `vxCreateObjectArray(ctx, udo, 20)`
with a UDO as the exemplar. rustVX's `create_object_like_exemplar`
helper in openvx-core had `match` arms for IMAGE, ARRAY, PYRAMID,
SCALAR, MATRIX, DISTRIBUTION, REMAP, LUT, THRESHOLD, OBJECT_ARRAY —
but not USER_DATA_OBJECT — so the new UDO type tag (0x816) fell to
the `_ => null_mut()` default. `vxCreateObjectArray` then returned
NULL and the CTS `ASSERT_VX_OBJECT(VX_TYPE_OBJECT_ARRAY)` blew up
before the test even got to exercising the UDO API.
Add the missing arm: query `VX_USER_DATA_OBJECT_NAME` /
`VX_USER_DATA_OBJECT_SIZE` from the exemplar, then call
`vxCreateUserDataObject` to produce each fresh slot. Same semantics
as the IMAGE/ARRAY arms — clone the exemplar's metadata, not its
contents, so each slot in the resulting object-array gets its own
independent zero-initialised buffer.
The FFI calls are declared inline because openvx-core can't import
the `vx_user_data_object` alias from openvx-buffer without a
circular dep; `*mut c_void` is the underlying repr (same as the
alias in user_data_object.rs).
The constants `VX_TYPE_USER_DATA_OBJECT` / `VX_USER_DATA_OBJECT_NAME`
/ `VX_USER_DATA_OBJECT_SIZE` / `VX_MAX_REFERENCE_NAME` are declared
as function-local consts to keep the match arm self-documenting
without colliding with the pre-existing file-scope
`VX_TYPE_TARGET = 0x816` (a latent labeling artefact predating this
PR — left untouched here to avoid scope creep).
Verified locally:
* `cargo build --release -p openvx-ffi` — clean build
* `cargo test --release -p openvx-ffi --test user_data_object`
— all 15 existing UDO Rust integration tests still pass
The two failing CTS subtests
(`UserKernelObjectArray/{0,1}/USER_DATA_OBJECT_FROM_{REF,ATTR}`)
should now pass on the next CI run, alongside the 12 UDO subtests
that were already green on the previous run.
Co-authored-by: Cursor <cursoragent@cursor.com>1 parent 103b18a commit 94a6104
1 file changed
Lines changed: 54 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7468 | 7468 | | |
7469 | 7469 | | |
7470 | 7470 | | |
7471 | | - | |
| 7471 | + | |
| 7472 | + | |
| 7473 | + | |
| 7474 | + | |
| 7475 | + | |
| 7476 | + | |
| 7477 | + | |
| 7478 | + | |
| 7479 | + | |
| 7480 | + | |
| 7481 | + | |
| 7482 | + | |
| 7483 | + | |
| 7484 | + | |
| 7485 | + | |
| 7486 | + | |
| 7487 | + | |
| 7488 | + | |
| 7489 | + | |
| 7490 | + | |
| 7491 | + | |
| 7492 | + | |
| 7493 | + | |
| 7494 | + | |
| 7495 | + | |
| 7496 | + | |
7472 | 7497 | | |
7473 | 7498 | | |
7474 | 7499 | | |
| |||
7703 | 7728 | | |
7704 | 7729 | | |
7705 | 7730 | | |
| 7731 | + | |
| 7732 | + | |
| 7733 | + | |
| 7734 | + | |
| 7735 | + | |
| 7736 | + | |
| 7737 | + | |
| 7738 | + | |
| 7739 | + | |
| 7740 | + | |
| 7741 | + | |
| 7742 | + | |
| 7743 | + | |
| 7744 | + | |
| 7745 | + | |
| 7746 | + | |
| 7747 | + | |
| 7748 | + | |
| 7749 | + | |
| 7750 | + | |
| 7751 | + | |
| 7752 | + | |
| 7753 | + | |
| 7754 | + | |
| 7755 | + | |
| 7756 | + | |
| 7757 | + | |
| 7758 | + | |
7706 | 7759 | | |
7707 | 7760 | | |
7708 | 7761 | | |
| |||
0 commit comments