RequestAsyncReadback
Adds an asynchonous GPU readback request command to the command buffer.
Read time 7 minutesLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine.Rendering
- Assembly: UnityEngine.CoreModule
RequestAsyncReadback(ComputeBuffer, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(ComputeBuffer src, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(GraphicsBuffer, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(GraphicsBuffer src, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(ComputeBuffer, int, int, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(ComputeBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.
Offset in bytes in the ComputeBuffer or GraphicsBuffer.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(GraphicsBuffer, int, int, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(GraphicsBuffer src, int size, int offset, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
Size in bytes of the data to be retrieved from the ComputeBuffer or GraphicsBuffer.
Offset in bytes in the ComputeBuffer or GraphicsBuffer.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, TextureFormat, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, int, int, int, int, int, int, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, int, int, int, int, int, int, TextureFormat, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, TextureFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.
The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.
RequestAsyncReadback(Texture, int, int, int, int, int, int, int, GraphicsFormat, Action<AsyncGPUReadbackRequest>)
Adds an asynchonous GPU readback request command to the command buffer.
public void RequestAsyncReadback(Texture src, int mipIndex, int x, int width, int y, int height, int z, int depth, GraphicsFormat dstFormat, Action<AsyncGPUReadbackRequest> callback)
Parameters
The resource to read the data from.
The index of the mipmap to be fetched.
Starting X coordinate in pixels of the Texture data to be fetched.
Width in pixels of the Texture data to be fetched.
Starting Y coordinate in pixels of the Texture data to be fetched.
Height in pixels of the Texture data to be fetched.
Start Z coordinate in pixels for the Texture3D being fetched. Index of Start layer for TextureCube, Texture2DArray and TextureCubeArray being fetched.
The target TextureFormat of the data. Conversion will happen automatically if format is different from the format stored on GPU.
A delegate Action called once the request is fullfilled. The done request is passed as parameter to the Action.
Remarks
Additional Resources: AsyncGPUReadback.Request.