private static ShaderResourceView GetNativeShaderResourceViewImpl(GraphicsResource resource) { return(resource.NativeShaderResourceView); }
public void ResourceBarrierTransition(GraphicsResource resource, GraphicsResourceState newState) { // Nothing to do }
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 descriptor. /// </summary> /// <param name="slot">The slot.</param> /// <param name="unorderedAccessView">The unordered access view.</param> public void SetUnorderedAccessView(int slot, GraphicsResource unorderedAccessView) { // TODO D3D12 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); }
/// <summary> /// Gets the DX11 native resource handle /// </summary> /// <param name="resource">The Stride GraphicsResourceBase</param> /// <returns></returns> public static object GetNativeResource(GraphicsResource resource) { return(GetNativeResourceImpl(resource)); }
// // Gets the DirectX 12 native resource handle. // private static Resource GetNativeResourceImpl(GraphicsResource resource) => resource.NativeResource;
public void Copy(GraphicsResource source, GraphicsResource destination) { }
public void CopyRegion(GraphicsResource source, int sourceSubresource, ResourceRegion?sourecRegion, GraphicsResource destination, int destinationSubResource, int dstX = 0, int dstY = 0, int dstZ = 0) { NullHelper.ToImplement(); }
/// <summary> /// Sets an unordered access view descriptor. /// </summary> /// <param name="slot">The slot.</param> /// <param name="unorderedAccessView">The unordered access view.</param> public void SetUnorderedAccessView(int slot, GraphicsResource unorderedAccessView) { ref var heapObject = ref HeapObjects[DescriptorStartOffset + slot];
public void ResourceBarrierTransition(GraphicsResource resource, GraphicsResourceState newState) { NullHelper.ToImplement(); }
/// <summary> /// Sets a shader resource view descriptor. /// </summary> /// <param name="slot">The slot.</param> /// <param name="shaderResourceView">The shader resource view.</param> public void SetShaderResourceView(int slot, GraphicsResource shaderResourceView) { HeapObjects[DescriptorStartOffset + slot].Value = shaderResourceView; }
/// <summary> /// Gets the native shader resource view of a resource. /// </summary> /// <param name="resource">The Stride <see cref="GraphicsResource"/> instance.</param> /// <returns>An object representing the native shader resource view object.</returns> public static object GetNativeShaderResourceView(GraphicsResource resource) => GetNativeShaderResourceViewImpl(resource);
/// <summary> /// Gets the native resource handle of a DirectX 11 resource. /// </summary> /// <param name="resource">The Stride <see cref="GraphicsResource"/> instance.</param> /// <returns>An object representing the native graphics resource object.</returns> public static object GetNativeResource(GraphicsResource resource) => GetNativeResourceImpl(resource);
/// <summary> /// Gets the DX11 native resource handle /// </summary> /// <param name="resource">The Stride GraphicsResourceBase</param> /// <returns></returns> private static Resource GetNativeResourceImpl(GraphicsResource resource) { return(resource.NativeResource); }
internal void UpdateSubresource(GraphicsResource resource, int subResourceIndex, DataBox databox, ResourceRegion region) { NullHelper.ToImplement(); }
private static CpuDescriptorHandle GetNativeShaderResourceViewImpl(GraphicsResource resource) { return(resource.NativeShaderResourceView); }
/// <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 MappedResource MapSubresource(GraphicsResource resource, int subResourceIndex, MapMode mapMode, bool doNotWait = false, int offsetInBytes = 0, int lengthInBytes = 0) { NullHelper.ToImplement(); return(default(MappedResource)); }
public static object GetNativeShaderResourceView(GraphicsResource resource) { return(GetNativeShaderResourceViewImpl(resource)); }
// // Gets the DirectX 11 native shader resource view from a resource. // private static ShaderResourceView GetNativeShaderResourceViewImpl(GraphicsResource resource) => resource.NativeShaderResourceView;