/// <summary> /// If this port declaration is a port array, return the appropriate patch location inside /// the port array's nth port (using the potential array index) /// Otherwise, <see cref="GetPointerToPatch(RenderKernelFunction.BasePort*)"/> /// </summary> public void **GetPointerToPatch(RenderKernelFunction.BasePort *ports, ushort potentialArrayIndex) { if (!IsArray) { return((void **)((byte *)ports + PatchOffset)); } return(AsPortArray(ports).NthInputPortPointer(potentialArrayIndex)); }
public ref UntypedPortArray AsPortArray(RenderKernelFunction.BasePort *ports) { // Assert IsArray ? return(ref Unsafe.AsRef <UntypedPortArray>((byte *)ports + PatchOffset)); }
/// <summary> /// Returns a pointer to the <see cref="DataInput{TDefinition, TType}.Ptr"/> field, /// that this port declaration represents. /// </summary> public void **GetPointerToPatch(RenderKernelFunction.BasePort *ports) { return((void **)((byte *)ports + PatchOffset)); }
public ref BufferDescription AsUntyped(RenderKernelFunction.BasePort *kernelPorts) => ref *(BufferDescription *)((byte *)kernelPorts + Offset);
public ref BufferDescription GetAggregateBufferAt(RenderKernelFunction.BasePort *ports, int byteOffset) { return(ref *(BufferDescription *)((byte *)ports + PatchOffset + byteOffset)); }
public void *Resolve(RenderKernelFunction.BasePort *ports) { return((byte *)ports + PatchOffset); }
public Pointers(RenderKernelFunction.BasePort *ports, RenderKernelFunction.BaseData *data, RenderKernelFunction.BaseKernel *kernel) { Ports = ports; Data = data; Kernel = kernel; }