|
KiCad PCB EDA Suite
|
Plain owning command data, recordable on any thread without device access. More...
#include <rhi_compute.h>
Classes | |
| struct | COMMAND |
| Backend command representation; payload bytes are owned by the job. More... | |
Public Types | |
| enum class | OP { UPLOAD , BIND , BIND_GROUP , PUSH_CONSTANTS , DISPATCH , BARRIER , READBACK } |
Public Member Functions | |
| void | Upload (RHI_BufferHandle aBuffer, const void *aData, size_t aBytes, size_t aOffset=0) |
| Copy upload bytes immediately. | |
| void | Bind (RHI_ComputePipelineHandle aPipeline) |
| void | BindGroup (uint32_t aIndex, RHI_BindGroupHandle aGroup) |
| void | PushConstants (const void *aData, size_t aBytes) |
| void | Dispatch (uint32_t aGroupsX, uint32_t aGroupsY=1) |
| void | Barrier () |
| void | Readback (RHI_BufferHandle aBuffer, size_t aOffset, size_t aBytes, void *aDestination) |
| bool | IsValid () const |
| const std::vector< COMMAND > & | Commands () const |
Private Attributes | |
| bool | m_valid = true |
| std::vector< COMMAND > | m_commands |
Plain owning command data, recordable on any thread without device access.
Readback destinations must remain valid until Submit() returns. Handles belong to the GPU_COMPUTE instance that created them.
Definition at line 90 of file rhi_compute.h.
|
strong |
| Enumerator | |
|---|---|
| UPLOAD | |
| BIND | |
| BIND_GROUP | |
| PUSH_CONSTANTS | |
| DISPATCH | |
| BARRIER | |
| READBACK | |
Definition at line 93 of file rhi_compute.h.
| void RHI_COMPUTE_JOB::Barrier | ( | ) |
Definition at line 207 of file rhi_compute.cpp.
References BARRIER, and m_commands.
Referenced by BOOST_AUTO_TEST_CASE().
| void RHI_COMPUTE_JOB::Bind | ( | RHI_ComputePipelineHandle | aPipeline | ) |
Definition at line 182 of file rhi_compute.cpp.
References BIND, and m_commands.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| void RHI_COMPUTE_JOB::BindGroup | ( | uint32_t | aIndex, |
| RHI_BindGroupHandle | aGroup ) |
Definition at line 188 of file rhi_compute.cpp.
References BIND_GROUP, and m_commands.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 130 of file rhi_compute.h.
References m_commands.
Referenced by BOOST_AUTO_TEST_CASE(), RHI_VULKAN_DEVICE::ExecuteCompute(), and RhiValidateComputeJob().
| void RHI_COMPUTE_JOB::Dispatch | ( | uint32_t | aGroupsX, |
| uint32_t | aGroupsY = 1 ) |
Definition at line 201 of file rhi_compute.cpp.
References DISPATCH, and m_commands.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inline |
Definition at line 129 of file rhi_compute.h.
References m_valid.
Referenced by BOOST_AUTO_TEST_CASE(), and RhiValidateComputeJob().
| void RHI_COMPUTE_JOB::PushConstants | ( | const void * | aData, |
| size_t | aBytes ) |
Definition at line 194 of file rhi_compute.cpp.
References copyBytes(), m_commands, m_valid, PUSH_CONSTANTS, and RHI_MAX_PUSH_CONSTANT_BYTES.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| void RHI_COMPUTE_JOB::Readback | ( | RHI_BufferHandle | aBuffer, |
| size_t | aOffset, | ||
| size_t | aBytes, | ||
| void * | aDestination ) |
Definition at line 213 of file rhi_compute.cpp.
References m_commands, m_valid, and READBACK.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
| void RHI_COMPUTE_JOB::Upload | ( | RHI_BufferHandle | aBuffer, |
| const void * | aData, | ||
| size_t | aBytes, | ||
| size_t | aOffset = 0 ) |
Copy upload bytes immediately.
Invalid pointers mark the job invalid.
Definition at line 171 of file rhi_compute.cpp.
References copyBytes(), m_commands, m_valid, and UPLOAD.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
private |
Definition at line 134 of file rhi_compute.h.
Referenced by Barrier(), Bind(), BindGroup(), Commands(), Dispatch(), PushConstants(), Readback(), and Upload().
|
private |
Definition at line 133 of file rhi_compute.h.
Referenced by IsValid(), PushConstants(), Readback(), and Upload().