/// <summary> /// Create a new instance of <see cref="GuestGpuAccessorHeader"/> from an gpu accessor. /// </summary> /// <param name="gpuAccessor">The gpu accessor</param> /// <returns>a new instance of <see cref="GuestGpuAccessorHeader"/></returns> private static GuestGpuAccessorHeader CreateGuestGpuAccessorCache(IGpuAccessor gpuAccessor) { return(new GuestGpuAccessorHeader { ComputeLocalSizeX = gpuAccessor.QueryComputeLocalSizeX(), ComputeLocalSizeY = gpuAccessor.QueryComputeLocalSizeY(), ComputeLocalSizeZ = gpuAccessor.QueryComputeLocalSizeZ(), ComputeLocalMemorySize = gpuAccessor.QueryComputeLocalMemorySize(), ComputeSharedMemorySize = gpuAccessor.QueryComputeSharedMemorySize(), PrimitiveTopology = gpuAccessor.QueryPrimitiveTopology(), }); }
/// <summary> /// Create a new instance of <see cref="GuestGpuAccessorHeader"/> from an gpu accessor. /// </summary> /// <param name="gpuAccessor">The gpu accessor</param> /// <returns>A new instance of <see cref="GuestGpuAccessorHeader"/></returns> public static GuestGpuAccessorHeader CreateGuestGpuAccessorCache(IGpuAccessor gpuAccessor) { return(new GuestGpuAccessorHeader { ComputeLocalSizeX = gpuAccessor.QueryComputeLocalSizeX(), ComputeLocalSizeY = gpuAccessor.QueryComputeLocalSizeY(), ComputeLocalSizeZ = gpuAccessor.QueryComputeLocalSizeZ(), ComputeLocalMemorySize = gpuAccessor.QueryComputeLocalMemorySize(), ComputeSharedMemorySize = gpuAccessor.QueryComputeSharedMemorySize(), PrimitiveTopology = gpuAccessor.QueryPrimitiveTopology(), TessellationModePacked = GetTessellationModePacked(gpuAccessor), StateFlags = GetGpuStateFlags(gpuAccessor) }); }