コード例 #1
0
 public DataBox MapSubresource(GraphicsResource resource, int subResourceIndex, MapMode mapMode)
 {
     throw new NotImplementedException();
 }
コード例 #2
0
 public void UnmapSubresource(GraphicsResource resource, int subResourceIndex)
 {
     throw new NotImplementedException();
 }
コード例 #3
0
 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));
 }
コード例 #4
0
 internal void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region)
 {
     throw new NotImplementedException();
 }
コード例 #5
0
 /// <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);
 }
コード例 #6
0
 public DataBox MapSubresource(GraphicsResource resource, int subResourceIndex, MapMode mapMode)
 {
     throw new NotImplementedException();
 }
コード例 #7
0
        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);
        }
コード例 #8
0
 /// <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();
 }
コード例 #9
0
 /// <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();
 }
コード例 #10
0
 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);
 }
コード例 #11
0
 /// <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();
 }
コード例 #12
0
 /// <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();
 }
コード例 #13
0
 public void UnmapSubresource(GraphicsResource resource, int subResourceIndex)
 {
     throw new NotImplementedException();
 }
コード例 #14
0
 /// <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();
 }
コード例 #15
0
 /// <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);
 }
コード例 #16
0
 /// <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();
 }
コード例 #17
0
 /// <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);
 }
コード例 #18
0
        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);
        }
コード例 #19
0
        /// <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);
        }
コード例 #20
0
 /// <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;
 }
コード例 #21
0
 internal void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region)
 {
     throw new NotImplementedException();
 }