diff --git a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.cpp b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.cpp index 1166cefc4e..dbe9889835 100644 --- a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.cpp +++ b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.cpp @@ -1198,7 +1198,7 @@ bool plMetalDevice::plMetalPipelineRecord::operator==(const plMetalPipelineRecor state->operator==(*p.state); } -MTL::CommandBuffer* plMetalDevice::GetCurrentCommandBuffer() +MTL::CommandBuffer* plMetalDevice::GetCurrentCommandBuffer() const { if (fCurrentOffscreenCommandBuffer) { return fCurrentOffscreenCommandBuffer; diff --git a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.h b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.h index 939ed94616..c5f3cfd89a 100644 --- a/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.h +++ b/Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.h @@ -161,8 +161,8 @@ class plMetalDevice /// Create a new command buffer to encode all the operations needed to draw a frame // Currently requires a CA drawable and not a Metal drawable. In since CA drawable is only abstract implementation I know about, not sure where we would find others? void CreateNewCommandBuffer(CA::MetalDrawable* drawable); - MTL::CommandBuffer* GetCurrentCommandBuffer(); - MTL::CommandBuffer* GetCurrentDrawableCommandBuffer() { return fCurrentCommandBuffer; } + MTL::CommandBuffer* GetCurrentCommandBuffer() const; + MTL::CommandBuffer* GetCurrentDrawableCommandBuffer() const { return fCurrentCommandBuffer; } CA::MetalDrawable* GetCurrentDrawable() const; /// Submit the command buffer to the GPU and draws all the render passes. Clears the current command buffer. void SubmitCommandBuffer();