MVKCommand remove reference to MVKCommandBuffer.
diff --git a/MoltenVK/MoltenVK/Commands/MVKCommand.h b/MoltenVK/MoltenVK/Commands/MVKCommand.h
index 9049e96..3cd35df 100644
--- a/MoltenVK/MoltenVK/Commands/MVKCommand.h
+++ b/MoltenVK/MoltenVK/Commands/MVKCommand.h
@@ -41,7 +41,7 @@
MVKVulkanAPIObject* getVulkanAPIObject() override;
/** Called when this command is added to a command buffer. */
- virtual void added(MVKCommandBuffer* cmdBuffer) { _commandBuffer = cmdBuffer; };
+ virtual void added(MVKCommandBuffer* cmdBuffer) {};
/** Indicates that this command has a valid configuration and can be encoded. */
inline bool canEncode() { return _configurationResult == VK_SUCCESS; }
@@ -83,7 +83,6 @@
protected:
MVKCommandTypePool<MVKCommand>* _pool;
- MVKCommandBuffer* _commandBuffer = nullptr;
};
diff --git a/MoltenVK/MoltenVK/Commands/MVKCommand.mm b/MoltenVK/MoltenVK/Commands/MVKCommand.mm
index 957074c..7c2219a 100644
--- a/MoltenVK/MoltenVK/Commands/MVKCommand.mm
+++ b/MoltenVK/MoltenVK/Commands/MVKCommand.mm
@@ -29,11 +29,10 @@
void MVKCommand::returnToPool() {
clearConfigurationResult();
- _commandBuffer = nullptr;
_pool->returnObject(this);
}
-MVKVulkanAPIObject* MVKCommand::getVulkanAPIObject() { return _commandBuffer ? _commandBuffer->getVulkanAPIObject() : getCommandPool()->getVulkanAPIObject(); };
+MVKVulkanAPIObject* MVKCommand::getVulkanAPIObject() { return getCommandPool()->getVulkanAPIObject(); };
MVKCommandPool* MVKCommand::getCommandPool() { return _pool->getCommandPool(); }