public void UpdateTextureCube( Texture textureCube, IntPtr source, uint sizeInBytes, CubeFace face, uint x, uint y, uint width, uint height, uint mipLevel, uint arrayLayer) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); NoAllocUpdateTextureCubeEntry entry = new NoAllocUpdateTextureCubeEntry( textureCube, stagingBlock, face, x, y, width, height, mipLevel, arrayLayer); AddEntry(UpdateTextureCubeEntryID, ref entry); }
public void UpdateBuffer(Buffer buffer, uint bufferOffsetInBytes, IntPtr source, uint sizeInBytes) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); NoAllocUpdateBufferEntry entry = new NoAllocUpdateBufferEntry(buffer, bufferOffsetInBytes, stagingBlock); AddEntry(UpdateBufferEntryID, ref entry); }
public UpdateTextureEntry Init( Texture texture, StagingBlock stagingBlock, uint x, uint y, uint z, uint width, uint height, uint depth, uint mipLevel, uint arrayLayer) { Texture = texture; StagingBlock = stagingBlock; X = x; Y = y; Z = z; Width = width; Height = height; Depth = depth; MipLevel = mipLevel; ArrayLayer = arrayLayer; return(this); }
public NoAllocUpdateBufferEntry(Tracked <DeviceBuffer> buffer, uint bufferOffsetInBytes, StagingBlock stagingBlock, uint stagingBlockSize) { Buffer = buffer; BufferOffsetInBytes = bufferOffsetInBytes; StagingBlock = stagingBlock; StagingBlockSize = stagingBlockSize; }
public UpdateBufferEntry Init(Buffer buffer, uint bufferOffsetInBytes, StagingBlock stagingBlock) { Buffer = buffer; BufferOffsetInBytes = bufferOffsetInBytes; StagingBlock = stagingBlock; return(this); }
public void UpdateBuffer(DeviceBuffer buffer, uint bufferOffsetInBytes, IntPtr source, uint sizeInBytes) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); _stagingBlocks.Add(stagingBlock); NoAllocUpdateBufferEntry entry = new NoAllocUpdateBufferEntry(Track(buffer), bufferOffsetInBytes, Track(stagingBlock.Array), sizeInBytes); AddEntry(UpdateBufferEntryID, ref entry); }
public NoAllocSetResourceSetEntry( uint slot, Tracked <ResourceSet> rs, bool isGraphics, StagingBlock dynamicOffsets) { Slot = slot; ResourceSet = rs; IsGraphics = isGraphics; DynamicOffsetCount = (uint)dynamicOffsets.SizeInBytes / sizeof(uint); DynamicOffsets_Block = dynamicOffsets; }
public void UpdateTextureCube( Texture textureCube, IntPtr source, uint sizeInBytes, CubeFace face, uint x, uint y, uint width, uint height, uint mipLevel, uint arrayLayer) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); _commands.Add(new UpdateTextureCubeEntry(textureCube, stagingBlock, face, x, y, width, height, mipLevel, arrayLayer)); }
public void UpdateTexture( Texture texture, IntPtr source, uint sizeInBytes, uint x, uint y, uint z, uint width, uint height, uint depth, uint mipLevel, uint arrayLayer) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); _commands.Add(_updateTextureEntryPool.Rent().Init(texture, stagingBlock, x, y, z, width, height, depth, mipLevel, arrayLayer)); }
public NoAllocSetResourceSetEntry( uint slot, Tracked <ResourceSet> rs, bool isGraphics, uint dynamicOffsetCount, ref uint dynamicOffsets) { Slot = slot; ResourceSet = rs; IsGraphics = isGraphics; DynamicOffsetCount = dynamicOffsetCount; for (int i = 0; i < dynamicOffsetCount; i++) { DynamicOffsets_Inline[i] = Unsafe.Add(ref dynamicOffsets, i); } DynamicOffsets_Block = default; }
public UpdateTextureCubeEntry( Texture textureCube, StagingBlock stagingBlock, CubeFace face, uint x, uint y, uint width, uint height, uint mipLevel, uint arrayLayer) { TextureCube = textureCube; StagingBlock = stagingBlock; Face = face; X = x; Y = y; Width = width; Height = height; MipLevel = mipLevel; ArrayLayer = arrayLayer; }
public NoAllocUpdateTextureCubeEntry( Texture texture, StagingBlock stagingBlock, CubeFace face, uint x, uint y, uint width, uint height, uint mipLevel, uint arrayLayer) { Texture = texture; StagingBlock = new HandleTrackedStagingBlock(stagingBlock); Face = face; X = x; Y = y; Width = width; Height = height; MipLevel = mipLevel; ArrayLayer = arrayLayer; }
private void SetResourceSet(uint slot, ResourceSet rs, uint dynamicOffsetCount, ref uint dynamicOffsets, bool isGraphics) { NoAllocSetResourceSetEntry entry; if (dynamicOffsetCount > NoAllocSetResourceSetEntry.MaxInlineDynamicOffsets) { StagingBlock block = _memoryPool.GetStagingBlock(dynamicOffsetCount * sizeof(uint)); _stagingBlocks.Add(block); for (uint i = 0; i < dynamicOffsetCount; i++) { *((uint *)block.Data + i) = Unsafe.Add(ref dynamicOffsets, (int)i); } entry = new NoAllocSetResourceSetEntry(slot, Track(rs), isGraphics, block); } else { entry = new NoAllocSetResourceSetEntry(slot, Track(rs), isGraphics, dynamicOffsetCount, ref dynamicOffsets); } AddEntry(SetResourceSetEntryID, ref entry); }
public NoAllocUpdateTextureEntry( Texture texture, StagingBlock stagingBlock, uint x, uint y, uint z, uint width, uint height, uint depth, uint mipLevel, uint arrayLayer) { Texture = texture; StagingBlock = new HandleTrackedStagingBlock(stagingBlock); X = x; Y = y; Z = z; Width = width; Height = height; Depth = depth; MipLevel = mipLevel; ArrayLayer = arrayLayer; }
public void UpdateBuffer(Buffer buffer, uint bufferOffsetInBytes, IntPtr source, uint sizeInBytes) { StagingBlock stagingBlock = _memoryPool.Stage(source, sizeInBytes); _commands.Add(new UpdateBufferEntry(buffer, bufferOffsetInBytes, stagingBlock)); }
public void Free() => StagingBlock.Free();
public override Shader CreateShader(ref ShaderDescription description) { StagingBlock stagingBlock = _pool.Stage(description.ShaderBytes); return(new OpenGLShader(_gd, description.Stage, stagingBlock)); }
public NoAllocUpdateBufferEntry(Buffer buffer, uint bufferOffsetInBytes, StagingBlock stagingBlock) { Buffer = new HandleTracked <Buffer>(buffer); BufferOffsetInBytes = bufferOffsetInBytes; StagingBlock = new HandleTrackedStagingBlock(stagingBlock); }
public UpdateBufferEntry(Buffer buffer, uint bufferOffsetInBytes, StagingBlock stagingBlock) { Buffer = buffer; BufferOffsetInBytes = bufferOffsetInBytes; StagingBlock = stagingBlock; }