A command queue for executing compute workloads on the GPU.
More...
#include <ComputeQueue.h>
A command queue for executing compute workloads on the GPU.
◆ EBarrier
If a barrier should be placed before accessing the buffer.
◆ ~ComputeQueue()
◆ Dispatch()
| virtual void ComputeQueue::Dispatch |
( |
uint | inThreadGroupsX, |
|
|
uint | inThreadGroupsY = 1, |
|
|
uint | inThreadGroupsZ = 1 ) |
|
pure virtual |
Dispatch a compute shader with the specified number of thread groups.
◆ Execute()
| virtual void ComputeQueue::Execute |
( |
| ) |
|
|
pure virtual |
Execute accumulated command list.
◆ ExecuteAndWait()
| void ComputeQueue::ExecuteAndWait |
( |
| ) |
|
|
inline |
Execute and wait for the command list to finish.
◆ ScheduleReadback()
Schedule buffer to be copied from GPU to CPU.
◆ SetBuffer()
| virtual void ComputeQueue::SetBuffer |
( |
const char * | inName, |
|
|
const ComputeBuffer * | inBuffer ) |
|
pure virtual |
Bind a read only buffer to the shader. Note that the contents of the buffer cannot be modified on CPU until execution finishes (only relevant for buffers of type UploadBuffer).
◆ SetConstantBuffer()
| virtual void ComputeQueue::SetConstantBuffer |
( |
const char * | inName, |
|
|
const ComputeBuffer * | inBuffer ) |
|
pure virtual |
Bind a constant buffer to the shader. Note that the contents of the buffer cannot be modified until execution finishes.
◆ SetRWBuffer()
Bind a read/write buffer to the shader.
- Parameters
-
| inName | Name of the buffer as specified in the shader. |
| inBuffer | The buffer to bind. |
| inBarrier | If set to Yes, a barrier will be placed before accessing the buffer to ensure all previous writes to the buffer are visible. |
◆ SetShader()
| virtual void ComputeQueue::SetShader |
( |
const ComputeShader * | inShader | ) |
|
|
pure virtual |
Activate a shader. Shader must be set first before buffers can be bound. After every Dispatch call, the shader must be set again and all buffers must be bound again.
◆ Wait()
| virtual void ComputeQueue::Wait |
( |
| ) |
|
|
pure virtual |
After executing, this waits until execution is done.
The documentation for this class was generated from the following file: