new compute dispatch
This commit is contained in:
@@ -491,10 +491,16 @@ void ComputeCommand::pushConstants(Gfx::SeShaderStageFlags stage, uint32 offset,
|
||||
vkCmdPushConstants(handle, pipeline->getLayout(), stage, offset, size, data);
|
||||
}
|
||||
|
||||
void ComputeCommand::dispatch(uint32 threadX, uint32 threadY, uint32 threadZ) {
|
||||
void ComputeCommand::dispatch(uint32 threadGroupCountX, uint32 threadGroupCountY, uint32 threadGroupCountZ) {
|
||||
assert(threadId == std::this_thread::get_id());
|
||||
vkCmdDispatch(handle, threadX, threadY, threadZ);
|
||||
vkCmdDispatch(handle, threadGroupCountX, threadGroupCountY, threadGroupCountZ);
|
||||
}
|
||||
|
||||
void ComputeCommand::dispatch(UVector threadGroupSize) {
|
||||
assert(threadId == std::this_thread::get_id());
|
||||
vkCmdDispatch(handle, threadGroupSize.x, threadGroupSize.y, threadGroupSize.z);
|
||||
}
|
||||
|
||||
void ComputeCommand::dispatchIndirect(Gfx::PShaderBuffer buffer, uint32 offset) {
|
||||
assert(threadId == std::this_thread::get_id());
|
||||
vkCmdDispatchIndirect(handle, buffer.cast<ShaderBuffer>()->getHandle(), offset);
|
||||
|
||||
Reference in New Issue
Block a user