void Driver::executeBuffer(const gpu::ringbuffer::Buffer &buffer) { decaf_check(!mActiveSyncWaiter); // Begin our command group (sync waiter) beginCommandGroup(); // Begin preparing our command buffer beginCommandBuffer(); // Execute guest PM4 command buffer runCommandBuffer(buffer); // End preparing our command buffer endCommandBuffer(); // Submit the generated command buffer to the host GPU queue vk::SubmitInfo submitInfo; submitInfo.commandBufferCount = 1; submitInfo.pCommandBuffers = &mActiveCommandBuffer; mQueue.submit({ submitInfo }, mActiveSyncWaiter->fence); // End our command group endCommandGroup(); // Optimize the memory layout of our segments every 10 frames. if (mActiveBatchIndex % 10 == 0) { mMemTracker.optimize(); } }
bool CreateEntityTool::handleDragDrop(InputState& inputState, const String& payload) { assert(m_entity != NULL); beginCommandGroup(wxT("Create Entity")); Controller::AddObjectsCommand* addObjectsCommand = Controller::AddObjectsCommand::addEntity(document(), *m_entity); submitCommand(addObjectsCommand); Controller::ChangeEditStateCommand* changeEditStateCommand = Controller::ChangeEditStateCommand::replace(document(), *m_entity); submitCommand(changeEditStateCommand); endCommandGroup(); m_entity = NULL; deleteFigure(m_entityFigure); m_entityFigure = NULL; return true; }
void CreateBrushTool::handleEndPlaneDrag(InputState& inputState) { assert(m_brush != NULL); assert(m_brushFigure != NULL); Controller::AddObjectsCommand* addBrushCommand = Controller::AddObjectsCommand::addBrush(document(), *m_brush); Controller::ChangeEditStateCommand* selectBrushCommand = Controller::ChangeEditStateCommand::replace(document(), *m_brush); beginCommandGroup(wxT("Create Brush")); submitCommand(addBrushCommand); submitCommand(selectBrushCommand); endCommandGroup(); m_brush = NULL; deleteFigure(m_brushFigure); m_brushFigure = NULL; }
void RotateObjectsTool::handleEndDrag(InputState& inputState) { endCommandGroup(); m_rotateHandle.unlock(); m_angle = 0.0f; }