Exemplo n.º 1
0
        public virtual int CreatePlacedResource(
            ID3D12Heap pHeap,
            ulong HeapOffset,
            ref D3D12_RESOURCE_DESC pDesc,
            D3D12_RESOURCE_STATES InitialState,
            ref D3D12_CLEAR_VALUE pOptimizedClearValue,
            ref Guid riid,
            out IntPtr ppvResource
            )
        {
            var fp = GetFunctionPointer(29);

            if (m_CreatePlacedResourceFunc == null)
            {
                m_CreatePlacedResourceFunc = (CreatePlacedResourceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreatePlacedResourceFunc));
            }

            return(m_CreatePlacedResourceFunc(m_ptr, pHeap != null ? pHeap.Ptr : IntPtr.Zero, HeapOffset, ref pDesc, InitialState, ref pOptimizedClearValue, ref riid, out ppvResource));
        }
Exemplo n.º 2
0
        public virtual void UpdateTileMappings(
            ID3D12Resource pResource,
            uint NumResourceRegions,
            ref D3D12_TILED_RESOURCE_COORDINATE pResourceRegionStartCoordinates,
            ref D3D12_TILE_REGION_SIZE pResourceRegionSizes,
            ID3D12Heap pHeap,
            uint NumRanges,
            ref D3D12_TILE_RANGE_FLAGS pRangeFlags,
            ref uint pHeapRangeStartOffsets,
            ref uint pRangeTileCounts,
            D3D12_TILE_MAPPING_FLAGS Flags
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_UpdateTileMappingsFunc == null)
            {
                m_UpdateTileMappingsFunc = (UpdateTileMappingsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(UpdateTileMappingsFunc));
            }

            m_UpdateTileMappingsFunc(m_ptr, pResource != null ? pResource.Ptr : IntPtr.Zero, NumResourceRegions, ref pResourceRegionStartCoordinates, ref pResourceRegionSizes, pHeap != null ? pHeap.Ptr : IntPtr.Zero, NumRanges, ref pRangeFlags, ref pHeapRangeStartOffsets, ref pRangeTileCounts, Flags);
        }