private ResourceAllocationInfo getShares() { ResourceAllocationInfo raInfo = new ResourceAllocationInfo(); SharesInfo sharesInfo = new SharesInfo(); String val = cb.get_option("value"); if (val.Equals(SharesLevel.high.ToString())) { sharesInfo.level = SharesLevel.high; } else if (val.Equals(SharesLevel.normal.ToString())) { sharesInfo.level = SharesLevel.normal; } else if (val.Equals(SharesLevel.low.ToString())) { sharesInfo.level = SharesLevel.low; } else { sharesInfo.level = SharesLevel.custom; sharesInfo.shares = int.Parse(val); } raInfo.shares = sharesInfo; return(raInfo); }
public static ResourceDescription1 Buffer(ResourceAllocationInfo resourceAllocInfo, ResourceFlags flags = ResourceFlags.None) { return(new ResourceDescription1( ResourceDimension.Buffer, resourceAllocInfo.Alignment, resourceAllocInfo.SizeInBytes, 1, 1, 1, Format.Unknown, 1, 0, TextureLayout.RowMajor, flags, 0, 0, 0)); }
private ResourceAllocationInfo getShares() { ResourceAllocationInfo raInfo = new ResourceAllocationInfo(); SharesInfo sharesInfo = new SharesInfo(); String val = cb.get_option("value"); if(val.Equals(SharesLevel.high.ToString())) { sharesInfo.level=SharesLevel.high; } else if(val.Equals(SharesLevel.normal.ToString())) { sharesInfo.level=SharesLevel.normal; } else if(val.Equals(SharesLevel.low.ToString())) { sharesInfo.level=SharesLevel.low; } else { sharesInfo.level=SharesLevel.custom; sharesInfo.shares=int.Parse(val); } raInfo.shares=sharesInfo; return raInfo; }