Fixes StaticVector size type warning inside Vulkan CDeviceCommandContext.

This was SVN commit r27423.
This commit is contained in:
Vladislav Belov 2023-01-12 06:40:42 +00:00
parent ec704d8179
commit 32c43eaef8
2 changed files with 5 additions and 4 deletions

View File

@ -282,7 +282,7 @@ void CDeviceCommandContext::BlitFramebuffer(IFramebuffer* destinationFramebuffer
if (sourceFramebuffer->As<CFramebuffer>()->GetSampleCount() == 1)
{
// TODO: we need to check for VK_FORMAT_FEATURE_BLIT_*_BIT for used formats.
for (size_t index = 0; index < destinationColorAttachments.size(); ++index)
for (CFramebuffer::ColorAttachments::size_type index = 0; index < destinationColorAttachments.size(); ++index)
{
CTexture* sourceColorAttachment = sourceColorAttachments[index];
CTexture* destinationColorAttachment = destinationColorAttachments[index];
@ -318,7 +318,7 @@ void CDeviceCommandContext::BlitFramebuffer(IFramebuffer* destinationFramebuffer
ENSURE(destinationFramebuffer->As<CFramebuffer>()->GetSampleCount() == 1);
ENSURE(sourceFramebuffer->As<CFramebuffer>()->GetWidth() == destinationFramebuffer->As<CFramebuffer>()->GetWidth());
ENSURE(sourceFramebuffer->As<CFramebuffer>()->GetHeight() == destinationFramebuffer->As<CFramebuffer>()->GetHeight());
for (size_t index = 0; index < destinationColorAttachments.size(); ++index)
for (CFramebuffer::ColorAttachments::size_type index = 0; index < destinationColorAttachments.size(); ++index)
{
CTexture* sourceColorAttachment = sourceColorAttachments[index];
CTexture* destinationColorAttachment = destinationColorAttachments[index];

View File

@ -52,7 +52,8 @@ public:
VkRenderPass GetRenderPass() const { return m_RenderPass; }
VkFramebuffer GetFramebuffer() const { return m_Framebuffer; }
const PS::StaticVector<CTexture*, 4>& GetColorAttachments() { return m_ColorAttachments; }
using ColorAttachments = PS::StaticVector<CTexture*, 4>;
const ColorAttachments& GetColorAttachments() { return m_ColorAttachments; }
CTexture* GetDepthStencilAttachment() { return m_DepthStencilAttachment; }
AttachmentLoadOp GetColorAttachmentLoadOp() const { return m_ColorAttachmentLoadOp; }
@ -97,7 +98,7 @@ private:
// It's reponsibility of CFramebuffer owner to guarantee lifetime of
// attachments.
PS::StaticVector<CTexture*, 4> m_ColorAttachments;
ColorAttachments m_ColorAttachments;
CTexture* m_DepthStencilAttachment = nullptr;
};