public DataBox MapSubresource(GraphicsResource resource, int subResourceIndex, MapMode mapMode) { throw new NotImplementedException(); }
public void UnmapSubresource(GraphicsResource resource, int subResourceIndex) { throw new NotImplementedException(); }
internal unsafe void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region) { if (resource == null) throw new ArgumentNullException("resource"); NativeDeviceContext.UpdateSubresource(*(SharpDX.DataBox*)Interop.Cast(ref databox), resource.NativeResource, subResourceIndex, *(SharpDX.Direct3D11.ResourceRegion*)Interop.Cast(ref region)); }
internal void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region) { throw new NotImplementedException(); }
/// <summary> /// Sets a shader resource view to the shader pipeline. /// </summary> /// <param name="stage">The shader stage.</param> /// <param name="slot">The binding slot.</param> /// <param name="shaderResourceView">The shader resource view.</param> internal void SetShaderResourceView(ShaderStage stage, int slot, GraphicsResource shaderResourceView) { shaderStages[(int)stage - 1].SetShaderResource(slot, shaderResourceView != null ? shaderResourceView.NativeShaderResourceView : null); }
public void CopyRegion(GraphicsResource source, int sourceSubresource, ResourceRegion? sourecRegion, GraphicsResource destination, int destinationSubResource, int dstX = 0, int dstY = 0, int dstZ = 0) { if (source == null) throw new ArgumentNullException("source"); if (destination == null) throw new ArgumentNullException("destination"); var nullableSharpDxRegion = new SharpDX.Direct3D11.ResourceRegion?(); if (sourecRegion.HasValue) { var value = sourecRegion.Value; nullableSharpDxRegion = new SharpDX.Direct3D11.ResourceRegion(value.Left, value.Top, value.Front, value.Right, value.Bottom, value.Back); } NativeDeviceContext.CopySubresourceRegion(source.NativeResource, sourceSubresource, nullableSharpDxRegion, destination.NativeResource, destinationSubResource, dstX, dstY, dstZ); }
/// <summary> /// Sets an unordered access view to the shader pipeline. /// </summary> /// <param name="stage">The stage.</param> /// <param name="slot">The slot.</param> /// <param name="unorderedAccessView">The unordered access view.</param> /// <exception cref="System.ArgumentException">Invalid stage.;stage</exception> public void SetUnorderedAccessView(ShaderStage stage, int slot, GraphicsResource unorderedAccessView) { throw new NotImplementedException(); }
public void Copy(GraphicsResource source, GraphicsResource destination) { if (source == null) throw new ArgumentNullException("source"); if (destination == null) throw new ArgumentNullException("destination"); NativeDeviceContext.CopyResource(source.NativeResource, destination.NativeResource); }
/// <summary> /// Sets a shader resource view to the shader pipeline. /// </summary> /// <param name="stage">The shader stage.</param> /// <param name="slot">The binding slot.</param> /// <param name="shaderResourceView">The shader resource view.</param> public void SetShaderResourceView(ShaderStage stage, int slot, GraphicsResource shaderResourceView) { throw new NotImplementedException(); }
/// <summary> /// Copies a graphics resource to a destination resource. /// </summary> /// <param name="source">The source resource.</param> /// <param name="destination">The destination resource.</param> public void Copy(GraphicsResource source, GraphicsResource destination) { throw new NotImplementedException(); }
/// <summary> /// Maps a subresource. /// </summary> /// <param name="resource">The resource.</param> /// <param name="subResourceIndex">Index of the sub resource.</param> /// <param name="mapMode">The map mode.</param> /// <param name="doNotWait">if set to <c>true</c> this method will return immediately if the resource is still being used by the GPU for writing. Default is false</param> /// <param name="offsetInBytes">The offset information in bytes.</param> /// <param name="lengthInBytes">The length information in bytes.</param> /// <returns>Pointer to the sub resource to map.</returns> public unsafe MappedResource MapSubresource(GraphicsResource resource, int subResourceIndex, MapMode mapMode, bool doNotWait = false, int offsetInBytes = 0, int lengthInBytes = 0) { if (resource == null) throw new ArgumentNullException("resource"); SharpDX.DataBox dataBox = NativeDeviceContext.MapSubresource(resource.NativeResource, subResourceIndex, (SharpDX.Direct3D11.MapMode)mapMode, doNotWait ? SharpDX.Direct3D11.MapFlags.DoNotWait : SharpDX.Direct3D11.MapFlags.None); var databox = *(DataBox*)Interop.Cast(ref dataBox); if (!dataBox.IsEmpty) { databox.DataPointer = (IntPtr)((byte*)databox.DataPointer + offsetInBytes); } return new MappedResource(resource, subResourceIndex, databox); }
public void CopyRegion(GraphicsResource source, int sourceSubresource, ResourceRegion?sourecRegion, GraphicsResource destination, int destinationSubResource, int dstX = 0, int dstY = 0, int dstZ = 0) { if (source == null) { throw new ArgumentNullException("source"); } if (destination == null) { throw new ArgumentNullException("destination"); } var nullableSharpDxRegion = new SharpDX.Direct3D11.ResourceRegion?(); if (sourecRegion.HasValue) { var value = sourecRegion.Value; nullableSharpDxRegion = new SharpDX.Direct3D11.ResourceRegion(value.Left, value.Top, value.Front, value.Right, value.Bottom, value.Back); } NativeDeviceContext.CopySubresourceRegion(source.NativeResource, sourceSubresource, nullableSharpDxRegion, destination.NativeResource, destinationSubResource, dstX, dstY, dstZ); }
/// <summary> /// Sets an unordered access view to the shader pipeline. /// </summary> /// <param name="stage">The stage.</param> /// <param name="slot">The slot.</param> /// <param name="unorderedAccessView">The unordered access view.</param> /// <exception cref="System.ArgumentException">Invalid stage.;stage</exception> internal void SetUnorderedAccessView(ShaderStage stage, int slot, GraphicsResource unorderedAccessView) { if (stage != ShaderStage.Compute) throw new ArgumentException("Invalid stage.", "stage"); NativeDeviceContext.ComputeShader.SetUnorderedAccessView(slot, unorderedAccessView != null ? unorderedAccessView.NativeUnorderedAccessView : null); }
/// <summary> /// Initializes a new instance of the <see cref="GraphicsResourceLink"/> class. /// </summary> /// <param name="graphicsResource">The graphics resource.</param> /// <exception cref="System.ArgumentNullException">graphicsResource</exception> internal GraphicsResourceLink(GraphicsResource graphicsResource) { if (graphicsResource == null) throw new ArgumentNullException("graphicsResource"); this.resource = graphicsResource; }