コード例 #1
0
        /// <summary>
        /// Performs an inverse FFT.
        /// </summary>
        /// <param name="inputBufferRef"><para>Pointer to <see cref="SharpDX.Direct3D11.UnorderedAccessView"/> onto the input buffer.</para></param>
        /// <returns>
        /// Returns the computation in a temp buffers; in addition, the last buffer written to is returned.
        /// </returns>
        /// <unmanaged>HRESULT ID3DX11FFT::InverseTransform([In] const ID3D11UnorderedAccessView* pInputBuffer,[InOut] void** ppOutputBuffer)</unmanaged>
        public SharpDX.Direct3D11.UnorderedAccessView InverseTransform(SharpDX.Direct3D11.UnorderedAccessView inputBufferRef)
        {
            IntPtr returnView = IntPtr.Zero;

            InverseTransform(inputBufferRef, ref returnView);
            return(new UnorderedAccessView(returnView));
        }
コード例 #2
0
ファイル: CommandList.Direct3D.cs プロジェクト: vvvv/stride
        /// <summary>
        ///     Sets an unordered access view to the shader pipeline, without affecting ones that are already set.
        /// </summary>
        /// <param name="slot">The binding slot.</param>
        /// <param name="shaderResourceView">The shader resource view.</param>
        /// <param name="view">The native unordered access view.</param>
        /// <param name="uavInitialOffset">The Append/Consume buffer offset. See SetUnorderedAccessView for more details.</param>
        internal void OMSetSingleUnorderedAccessView(int slot, SharpDX.Direct3D11.UnorderedAccessView view, int uavInitialOffset)
        {
            currentUARenderTargetViews[slot] = view;

            int remainingSlots = currentUARenderTargetViews.Length - currentRenderTargetViewsActiveCount;

            var uavs = new SharpDX.Direct3D11.UnorderedAccessView[remainingSlots];

            Array.Copy(currentUARenderTargetViews, currentRenderTargetViewsActiveCount, uavs, 0, remainingSlots);

            var uavInitialCounts = new int[remainingSlots];

            for (int i = 0; i < remainingSlots; i++)
            {
                uavInitialCounts[i] = -1;
            }
            uavInitialCounts[slot - currentRenderTargetViewsActiveCount] = uavInitialOffset;

            outputMerger.SetUnorderedAccessViews(currentRenderTargetViewsActiveCount, uavs, uavInitialCounts);
        }
コード例 #3
0
 /// <summary>
 /// Sets an array of views for an unordered resource.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="startSlot">Index of the first element in the zero-based array to begin setting. </param>
 /// <param name="unorderedAccessView">A reference to an <see cref="SharpDX.Direct3D11.UnorderedAccessView"/> references to be set by the method. </param>
 /// <param name="uavInitialCount">An Append/Consume buffer offsets. A value of -1 indicates the current offset should be kept.   Any other values set the hidden counter for that Appendable/Consumable UAV. uAVInitialCount is only relevant for UAVs which have the <see cref="SharpDX.Direct3D11.UnorderedAccessViewBufferFlags"/> flag,  otherwise the argument is ignored. </param>
 /// <unmanaged>void CSSetUnorderedAccessViews([In] int StartSlot,[In] int NumUAVs,[In, Buffer] const ID3D11UnorderedAccessView** ppUnorderedAccessViews,[In, Buffer] const int* pUAVInitialCounts)</unmanaged>
 public void SetUnorderedAccessView(int startSlot, SharpDX.Direct3D11.UnorderedAccessView unorderedAccessView, int uavInitialCount)
 {
     SetUnorderedAccessViews(startSlot, new[] { unorderedAccessView }, new[] { uavInitialCount });
 }
コード例 #4
0
 /// <summary>
 /// Sets an array of views for an unordered resource.
 /// </summary>
 /// <remarks>
 /// </remarks>
 /// <param name="startSlot">Index of the first element in the zero-based array to begin setting. </param>
 /// <param name="unorderedAccessView">A reference to an <see cref="SharpDX.Direct3D11.UnorderedAccessView"/> references to be set by the method. </param>
 /// <unmanaged>void CSSetUnorderedAccessViews([In] int StartSlot,[In] int NumUAVs,[In, Buffer] const ID3D11UnorderedAccessView** ppUnorderedAccessViews,[In, Buffer] const int* pUAVInitialCounts)</unmanaged>
 public void SetUnorderedAccessView(int startSlot, SharpDX.Direct3D11.UnorderedAccessView unorderedAccessView)
 {
     SetUnorderedAccessView(startSlot, unorderedAccessView, -1);
 }
コード例 #5
0
        /// <summary>
        /// Performs an inverse FFT.
        /// </summary>
        /// <param name="inputBufferRef"><para>Pointer to <see cref="SharpDX.Direct3D11.UnorderedAccessView"/> onto the input buffer.</para></param>
        /// <param name="outputBufferView"><para>Buffer <see cref="SharpDX.Direct3D11.UnorderedAccessView"/> reference used as the output buffer.</para></param>
        /// <returns>Returns one of the return codes described in the topic Direct3D 11 Return Codes.</returns>
        /// <unmanaged>HRESULT ID3DX11FFT::InverseTransform([In] const ID3D11UnorderedAccessView* pInputBuffer,[InOut] void** ppOutputBuffer)</unmanaged>
        public void InverseTransform(SharpDX.Direct3D11.UnorderedAccessView inputBufferRef, SharpDX.Direct3D11.UnorderedAccessView outputBufferView)
        {
            IntPtr outputView = outputBufferView.NativePointer;

            InverseTransform(inputBufferRef, ref outputView);
        }