Skip to content

Commit

Permalink
Making the command buffer getters const
Browse files Browse the repository at this point in the history
  • Loading branch information
colincornaby committed Dec 3, 2023
1 parent 35a886b commit 40563fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions Sources/Plasma/FeatureLib/pfMetalPipeline/plMetalDevice.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 40563fd

Please sign in to comment.