new compute dispatch

This commit is contained in:
Dynamitos
2026-04-06 09:54:04 +02:00
parent 925537dcb3
commit 7271fe8a0b
10 changed files with 55 additions and 35 deletions
+8 -2
View File
@@ -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);