Exposed transform and MDI buffers in SHBatch and exposed Batches in SHSuperBatch
This commit is contained in:
parent
8e2c32d110
commit
ce16ca6f8d
|
@ -586,6 +586,31 @@ namespace SHADE
|
||||||
cmdBuffer->EndLabeledSegment();
|
cmdBuffer->EndLabeledSegment();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
/* SHBatch - Getter Functions */
|
||||||
|
/*-----------------------------------------------------------------------------------*/
|
||||||
|
Handle<SHVkBuffer> SHBatch::GetTransformBuffer(uint32_t frameIndex) const noexcept
|
||||||
|
{
|
||||||
|
if (frameIndex >= transformDataBuffer.size())
|
||||||
|
{
|
||||||
|
SHLOG_WARNING("[SHBatch] Attempted to retrieve a transform buffer of an invalid index.");
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
return transformDataBuffer[frameIndex];
|
||||||
|
}
|
||||||
|
|
||||||
|
Handle<SHVkBuffer> SHBatch::GetMDIBuffer(uint32_t frameIndex) const noexcept
|
||||||
|
{
|
||||||
|
if (frameIndex >= drawDataBuffer.size())
|
||||||
|
{
|
||||||
|
SHLOG_WARNING("[SHBatch] Attempted to retrieve a MDI draw data buffer of an invalid index.");
|
||||||
|
return {};
|
||||||
|
}
|
||||||
|
|
||||||
|
return drawDataBuffer[frameIndex];
|
||||||
|
}
|
||||||
|
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
/* SHBatch - Helper Functions */
|
/* SHBatch - Helper Functions */
|
||||||
/*---------------------------------------------------------------------------------*/
|
/*---------------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -94,6 +94,8 @@ namespace SHADE
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
Handle<SHVkPipeline> GetPipeline() const noexcept { return pipeline; };
|
Handle<SHVkPipeline> GetPipeline() const noexcept { return pipeline; };
|
||||||
bool IsEmpty() const noexcept { return subBatches.empty(); }
|
bool IsEmpty() const noexcept { return subBatches.empty(); }
|
||||||
|
Handle<SHVkBuffer> GetTransformBuffer(uint32_t frameIndex) const noexcept;
|
||||||
|
Handle<SHVkBuffer> GetMDIBuffer(uint32_t frameIndex) const noexcept;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
|
|
@ -63,6 +63,7 @@ namespace SHADE
|
||||||
/* Getter Functions */
|
/* Getter Functions */
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
Handle<SHSubpass> GetSubpass() const noexcept { return subpass; };
|
Handle<SHSubpass> GetSubpass() const noexcept { return subpass; };
|
||||||
|
const std::vector<SHBatch>& GetBatches() const noexcept { return batches; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/*-----------------------------------------------------------------------------*/
|
/*-----------------------------------------------------------------------------*/
|
||||||
|
|
Loading…
Reference in New Issue