Skip to content

Existential Values Nested in Composite Types #9839

@NV-xiaoyongs

Description

@NV-xiaoyongs

Description:

Existential values nested inside structs, tuples, or arrays should work correctly when:

Loaded from buffers
Passed between dynamically dispatched functions

Test Cases:

interface IFoo { float eval(); }

struct Container {
IFoo item; // Existential in struct field
int metadata;
}

struct ArrayContainer {
IFoo[4] items; // Array of existentials
}

// Buffer containing existentials
StructuredBuffer gContainers;

void test() {
// Load from buffer
Container c = gContainers[0];
float val = c.item.eval(); // Dispatch from buffer-loaded existential

// Pass between functions
process(c);

}

void process(Container c) {
c.item.eval(); // Should still dispatch correctly
}

// Dynamically dispatched function receiving nested existential
interface IProcessor {
void process(Container c); // Container has IFoo field
}

Expected Behavior:

Buffer loads correctly reconstruct existential representation (tag + value)
Passing through functions preserves dispatch capability
Notes:

Memory layout in buffers must match existential tuple format
Need to handle alignment of nested existentials

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions