Browse Source

Vulkan: Fixing build

Panagiotis Christopoulos Charitos 9 years ago
parent
commit
c5f24f84fc

+ 7 - 7
src/anki/gr/vulkan/CommandBufferImpl.cpp

@@ -77,7 +77,7 @@ Error CommandBufferImpl::init(const CommandBufferInitInfo& init)
 
 
 	if(!!(m_flags & CommandBufferFlag::SECOND_LEVEL))
 	if(!!(m_flags & CommandBufferFlag::SECOND_LEVEL))
 	{
 	{
-		const FramebufferImpl& impl = init.m_framebuffer->getImplementation();
+		const FramebufferImpl& impl = *init.m_framebuffer->m_impl;
 
 
 		inheritance.renderPass = impl.getRenderPassHandle();
 		inheritance.renderPass = impl.getRenderPassHandle();
 		inheritance.subpass = 0;
 		inheritance.subpass = 0;
@@ -116,7 +116,7 @@ void CommandBufferImpl::beginRenderPassInternal()
 {
 {
 	VkRenderPassBeginInfo bi = {};
 	VkRenderPassBeginInfo bi = {};
 	bi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
 	bi.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
-	FramebufferImpl& impl = m_activeFb->getImplementation();
+	FramebufferImpl& impl = *m_activeFb->m_impl;
 	bi.renderPass = impl.getRenderPassHandle();
 	bi.renderPass = impl.getRenderPassHandle();
 	bi.clearValueCount = impl.getAttachmentCount();
 	bi.clearValueCount = impl.getAttachmentCount();
 	bi.pClearValues = impl.getClearValues();
 	bi.pClearValues = impl.getClearValues();
@@ -162,7 +162,7 @@ void CommandBufferImpl::endRenderPass()
 	ANKI_CMD(vkCmdEndRenderPass(m_handle), ANY_OTHER_COMMAND);
 	ANKI_CMD(vkCmdEndRenderPass(m_handle), ANY_OTHER_COMMAND);
 
 
 	// Default FB barrier/transition
 	// Default FB barrier/transition
-	if(m_activeFb->getImplementation().isDefaultFramebuffer())
+	if(m_activeFb->m_impl->isDefaultFramebuffer())
 	{
 	{
 		setImageBarrier(VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
 		setImageBarrier(VK_PIPELINE_STAGE_ALL_GRAPHICS_BIT,
 			VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
 			VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT,
@@ -191,7 +191,7 @@ void CommandBufferImpl::endRecording()
 void CommandBufferImpl::bindResourceGroup(ResourceGroupPtr rc, U set, const TransientMemoryInfo* dynInfo)
 void CommandBufferImpl::bindResourceGroup(ResourceGroupPtr rc, U set, const TransientMemoryInfo* dynInfo)
 {
 {
 	commandCommon();
 	commandCommon();
-	const ResourceGroupImpl& impl = rc->getImplementation();
+	const ResourceGroupImpl& impl = *rc->m_impl;
 
 
 	if(impl.m_handle)
 	if(impl.m_handle)
 	{
 	{
@@ -238,7 +238,7 @@ void CommandBufferImpl::generateMipmaps2d(TexturePtr tex, U face, U layer)
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	ANKI_ASSERT(impl.m_type != TextureType::_3D && "Not for 3D");
 	ANKI_ASSERT(impl.m_type != TextureType::_3D && "Not for 3D");
 
 
 	for(U i = 0; i < impl.m_mipCount - 1u; ++i)
 	for(U i = 0; i < impl.m_mipCount - 1u; ++i)
@@ -335,7 +335,7 @@ void CommandBufferImpl::uploadTextureSurface(
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	TextureImpl& impl = tex->getImplementation();
+	TextureImpl& impl = *tex->m_impl;
 	impl.checkSurface(surf);
 	impl.checkSurface(surf);
 	ANKI_ASSERT(impl.usageValid(TextureUsageBit::UPLOAD));
 	ANKI_ASSERT(impl.usageValid(TextureUsageBit::UPLOAD));
 
 
@@ -439,7 +439,7 @@ void CommandBufferImpl::uploadTextureVolume(
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	TextureImpl& impl = tex->getImplementation();
+	TextureImpl& impl = *tex->m_impl;
 	impl.checkVolume(vol);
 	impl.checkVolume(vol);
 	ANKI_ASSERT(impl.usageValid(TextureUsageBit::UPLOAD));
 	ANKI_ASSERT(impl.usageValid(TextureUsageBit::UPLOAD));
 
 

+ 23 - 24
src/anki/gr/vulkan/CommandBufferImpl.inl.h

@@ -190,8 +190,7 @@ inline void CommandBufferImpl::setImageBarrier(VkPipelineStageFlags srcStage,
 	TexturePtr tex,
 	TexturePtr tex,
 	const VkImageSubresourceRange& range)
 	const VkImageSubresourceRange& range)
 {
 {
-	setImageBarrier(
-		srcStage, srcAccess, prevLayout, dstStage, dstAccess, newLayout, tex->getImplementation().m_imageHandle, range);
+	setImageBarrier(srcStage, srcAccess, prevLayout, dstStage, dstAccess, newLayout, tex->m_impl->m_imageHandle, range);
 
 
 	m_texList.pushBack(m_alloc, tex);
 	m_texList.pushBack(m_alloc, tex);
 }
 }
@@ -199,7 +198,7 @@ inline void CommandBufferImpl::setImageBarrier(VkPipelineStageFlags srcStage,
 inline void CommandBufferImpl::setTextureBarrierInternal(
 inline void CommandBufferImpl::setTextureBarrierInternal(
 	TexturePtr tex, TextureUsageBit prevUsage, TextureUsageBit nextUsage, const VkImageSubresourceRange& range)
 	TexturePtr tex, TextureUsageBit prevUsage, TextureUsageBit nextUsage, const VkImageSubresourceRange& range)
 {
 {
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	ANKI_ASSERT(impl.usageValid(prevUsage));
 	ANKI_ASSERT(impl.usageValid(prevUsage));
 	ANKI_ASSERT(impl.usageValid(nextUsage));
 	ANKI_ASSERT(impl.usageValid(nextUsage));
 
 
@@ -225,7 +224,7 @@ inline void CommandBufferImpl::setTextureSurfaceBarrier(
 			&& "This transition happens inside CommandBufferImpl::generateMipmapsX");
 			&& "This transition happens inside CommandBufferImpl::generateMipmapsX");
 	}
 	}
 
 
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	impl.checkSurface(surf);
 	impl.checkSurface(surf);
 
 
 	VkImageSubresourceRange range;
 	VkImageSubresourceRange range;
@@ -242,7 +241,7 @@ inline void CommandBufferImpl::setTextureVolumeBarrier(
 			&& "This transition happens inside CommandBufferImpl::generateMipmaps");
 			&& "This transition happens inside CommandBufferImpl::generateMipmaps");
 	}
 	}
 
 
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	impl.checkVolume(vol);
 	impl.checkVolume(vol);
 
 
 	VkImageSubresourceRange range;
 	VkImageSubresourceRange range;
@@ -292,7 +291,7 @@ inline void CommandBufferImpl::setBufferBarrier(VkPipelineStageFlags srcStage,
 inline void CommandBufferImpl::setBufferBarrier(
 inline void CommandBufferImpl::setBufferBarrier(
 	BufferPtr buff, BufferUsageBit before, BufferUsageBit after, PtrSize offset, PtrSize size)
 	BufferPtr buff, BufferUsageBit before, BufferUsageBit after, PtrSize offset, PtrSize size)
 {
 {
-	const BufferImpl& impl = buff->getImplementation();
+	const BufferImpl& impl = *buff->m_impl;
 
 
 	VkPipelineStageFlags srcStage;
 	VkPipelineStageFlags srcStage;
 	VkAccessFlags srcAccess;
 	VkAccessFlags srcAccess;
@@ -321,7 +320,7 @@ inline void CommandBufferImpl::drawElements(
 inline void CommandBufferImpl::drawArraysIndirect(U32 drawCount, PtrSize offset, BufferPtr buff)
 inline void CommandBufferImpl::drawArraysIndirect(U32 drawCount, PtrSize offset, BufferPtr buff)
 {
 {
 	drawcallCommon();
 	drawcallCommon();
-	const BufferImpl& impl = buff->getImplementation();
+	const BufferImpl& impl = *buff->m_impl;
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::INDIRECT));
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::INDIRECT));
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset + sizeof(DrawArraysIndirectInfo) * drawCount) <= impl.getSize());
 	ANKI_ASSERT((offset + sizeof(DrawArraysIndirectInfo) * drawCount) <= impl.getSize());
@@ -333,7 +332,7 @@ inline void CommandBufferImpl::drawArraysIndirect(U32 drawCount, PtrSize offset,
 inline void CommandBufferImpl::drawElementsIndirect(U32 drawCount, PtrSize offset, BufferPtr buff)
 inline void CommandBufferImpl::drawElementsIndirect(U32 drawCount, PtrSize offset, BufferPtr buff)
 {
 {
 	drawcallCommon();
 	drawcallCommon();
-	const BufferImpl& impl = buff->getImplementation();
+	const BufferImpl& impl = *buff->m_impl;
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::INDIRECT));
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::INDIRECT));
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset + sizeof(DrawElementsIndirectInfo) * drawCount) <= impl.getSize());
 	ANKI_ASSERT((offset + sizeof(DrawElementsIndirectInfo) * drawCount) <= impl.getSize());
@@ -353,8 +352,8 @@ inline void CommandBufferImpl::resetOcclusionQuery(OcclusionQueryPtr query)
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	VkQueryPool handle = query->getImplementation().m_handle.m_pool;
-	U32 idx = query->getImplementation().m_handle.m_queryIndex;
+	VkQueryPool handle = query->m_impl->m_handle.m_pool;
+	U32 idx = query->m_impl->m_handle.m_queryIndex;
 	ANKI_ASSERT(handle);
 	ANKI_ASSERT(handle);
 
 
 #if ANKI_BATCH_COMMANDS
 #if ANKI_BATCH_COMMANDS
@@ -381,8 +380,8 @@ inline void CommandBufferImpl::beginOcclusionQuery(OcclusionQueryPtr query)
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	VkQueryPool handle = query->getImplementation().m_handle.m_pool;
-	U32 idx = query->getImplementation().m_handle.m_queryIndex;
+	VkQueryPool handle = query->m_impl->m_handle.m_pool;
+	U32 idx = query->m_impl->m_handle.m_queryIndex;
 	ANKI_ASSERT(handle);
 	ANKI_ASSERT(handle);
 
 
 	ANKI_CMD(vkCmdBeginQuery(m_handle, handle, idx, 0), ANY_OTHER_COMMAND);
 	ANKI_CMD(vkCmdBeginQuery(m_handle, handle, idx, 0), ANY_OTHER_COMMAND);
@@ -394,8 +393,8 @@ inline void CommandBufferImpl::endOcclusionQuery(OcclusionQueryPtr query)
 {
 {
 	commandCommon();
 	commandCommon();
 
 
-	VkQueryPool handle = query->getImplementation().m_handle.m_pool;
-	U32 idx = query->getImplementation().m_handle.m_queryIndex;
+	VkQueryPool handle = query->m_impl->m_handle.m_pool;
+	U32 idx = query->m_impl->m_handle.m_queryIndex;
 	ANKI_ASSERT(handle);
 	ANKI_ASSERT(handle);
 
 
 	ANKI_CMD(vkCmdEndQuery(m_handle, handle, idx), ANY_OTHER_COMMAND);
 	ANKI_CMD(vkCmdEndQuery(m_handle, handle, idx), ANY_OTHER_COMMAND);
@@ -412,7 +411,7 @@ inline void CommandBufferImpl::clearTextureInternal(
 	static_assert(sizeof(vclear) == sizeof(clearValue), "See file");
 	static_assert(sizeof(vclear) == sizeof(clearValue), "See file");
 	memcpy(&vclear, &clearValue, sizeof(clearValue));
 	memcpy(&vclear, &clearValue, sizeof(clearValue));
 
 
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	if(impl.m_aspect == VK_IMAGE_ASPECT_COLOR_BIT)
 	if(impl.m_aspect == VK_IMAGE_ASPECT_COLOR_BIT)
 	{
 	{
 		ANKI_CMD(vkCmdClearColorImage(
 		ANKI_CMD(vkCmdClearColorImage(
@@ -430,7 +429,7 @@ inline void CommandBufferImpl::clearTextureInternal(
 inline void CommandBufferImpl::clearTextureSurface(
 inline void CommandBufferImpl::clearTextureSurface(
 	TexturePtr tex, const TextureSurfaceInfo& surf, const ClearValue& clearValue, DepthStencilAspectMask aspect)
 	TexturePtr tex, const TextureSurfaceInfo& surf, const ClearValue& clearValue, DepthStencilAspectMask aspect)
 {
 {
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	ANKI_ASSERT(impl.m_type != TextureType::_3D && "Not for 3D");
 	ANKI_ASSERT(impl.m_type != TextureType::_3D && "Not for 3D");
 
 
 	VkImageSubresourceRange range;
 	VkImageSubresourceRange range;
@@ -441,7 +440,7 @@ inline void CommandBufferImpl::clearTextureSurface(
 inline void CommandBufferImpl::clearTextureVolume(
 inline void CommandBufferImpl::clearTextureVolume(
 	TexturePtr tex, const TextureVolumeInfo& vol, const ClearValue& clearValue, DepthStencilAspectMask aspect)
 	TexturePtr tex, const TextureVolumeInfo& vol, const ClearValue& clearValue, DepthStencilAspectMask aspect)
 {
 {
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	ANKI_ASSERT(impl.m_type == TextureType::_3D && "Only for 3D");
 	ANKI_ASSERT(impl.m_type == TextureType::_3D && "Only for 3D");
 
 
 	VkImageSubresourceRange range;
 	VkImageSubresourceRange range;
@@ -452,7 +451,7 @@ inline void CommandBufferImpl::clearTextureVolume(
 inline void CommandBufferImpl::uploadBuffer(BufferPtr buff, PtrSize offset, const TransientMemoryToken& token)
 inline void CommandBufferImpl::uploadBuffer(BufferPtr buff, PtrSize offset, const TransientMemoryToken& token)
 {
 {
 	commandCommon();
 	commandCommon();
-	BufferImpl& impl = buff->getImplementation();
+	BufferImpl& impl = *buff->m_impl;
 
 
 	VkBufferCopy region;
 	VkBufferCopy region;
 	region.srcOffset = token.m_offset;
 	region.srcOffset = token.m_offset;
@@ -478,7 +477,7 @@ inline void CommandBufferImpl::pushSecondLevelCommandBuffer(CommandBufferPtr cmd
 	ANKI_ASSERT(m_subpassContents == VK_SUBPASS_CONTENTS_MAX_ENUM
 	ANKI_ASSERT(m_subpassContents == VK_SUBPASS_CONTENTS_MAX_ENUM
 		|| m_subpassContents == VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS);
 		|| m_subpassContents == VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS);
 
 
-	ANKI_ASSERT(cmdb->getImplementation().m_finalized);
+	ANKI_ASSERT(cmdb->m_impl->m_finalized);
 
 
 	m_subpassContents = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS;
 	m_subpassContents = VK_SUBPASS_CONTENTS_SECONDARY_COMMAND_BUFFERS;
 
 
@@ -487,7 +486,7 @@ inline void CommandBufferImpl::pushSecondLevelCommandBuffer(CommandBufferPtr cmd
 		beginRenderPassInternal();
 		beginRenderPassInternal();
 	}
 	}
 
 
-	ANKI_CMD(vkCmdExecuteCommands(m_handle, 1, &cmdb->getImplementation().m_handle), ANY_OTHER_COMMAND);
+	ANKI_CMD(vkCmdExecuteCommands(m_handle, 1, &cmdb->m_impl->m_handle), ANY_OTHER_COMMAND);
 
 
 	++m_rpCommandCount;
 	++m_rpCommandCount;
 	m_cmdbList.pushBack(m_alloc, cmdb);
 	m_cmdbList.pushBack(m_alloc, cmdb);
@@ -552,7 +551,7 @@ inline void CommandBufferImpl::fillBuffer(BufferPtr buff, PtrSize offset, PtrSiz
 {
 {
 	commandCommon();
 	commandCommon();
 	ANKI_ASSERT(!insideRenderPass());
 	ANKI_ASSERT(!insideRenderPass());
-	const BufferImpl& impl = buff->getImplementation();
+	const BufferImpl& impl = *buff->m_impl;
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::FILL));
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::FILL));
 
 
 	ANKI_ASSERT(offset < impl.getSize());
 	ANKI_ASSERT(offset < impl.getSize());
@@ -573,12 +572,12 @@ inline void CommandBufferImpl::writeOcclusionQueryResultToBuffer(
 	commandCommon();
 	commandCommon();
 	ANKI_ASSERT(!insideRenderPass());
 	ANKI_ASSERT(!insideRenderPass());
 
 
-	const BufferImpl& impl = buff->getImplementation();
+	const BufferImpl& impl = *buff->m_impl;
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::QUERY_RESULT));
 	ANKI_ASSERT(impl.usageValid(BufferUsageBit::QUERY_RESULT));
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset % 4) == 0);
 	ANKI_ASSERT((offset + sizeof(U32)) <= impl.getSize());
 	ANKI_ASSERT((offset + sizeof(U32)) <= impl.getSize());
 
 
-	const OcclusionQueryImpl& q = query->getImplementation();
+	const OcclusionQueryImpl& q = *query->m_impl;
 
 
 #if ANKI_BATCH_COMMANDS
 #if ANKI_BATCH_COMMANDS
 	flushBatches(CommandBufferCommandType::WRITE_QUERY_RESULT);
 	flushBatches(CommandBufferCommandType::WRITE_QUERY_RESULT);
@@ -653,7 +652,7 @@ inline void CommandBufferImpl::flushDsetBindings()
 inline void CommandBufferImpl::bindPipeline(PipelinePtr ppline)
 inline void CommandBufferImpl::bindPipeline(PipelinePtr ppline)
 {
 {
 	commandCommon();
 	commandCommon();
-	const PipelineImpl& impl = ppline->getImplementation();
+	const PipelineImpl& impl = *ppline->m_impl;
 
 
 	ANKI_CMD(vkCmdBindPipeline(m_handle, impl.m_bindPoint, impl.m_handle), ANY_OTHER_COMMAND);
 	ANKI_CMD(vkCmdBindPipeline(m_handle, impl.m_bindPoint, impl.m_handle), ANY_OTHER_COMMAND);
 
 

+ 8 - 9
src/anki/gr/vulkan/FramebufferImpl.cpp

@@ -86,7 +86,7 @@ Bool FramebufferImpl::initInfoValid(const FramebufferInitInfo& inf)
 
 
 	if(inf.m_depthStencilAttachment.m_texture)
 	if(inf.m_depthStencilAttachment.m_texture)
 	{
 	{
-		const TextureImpl& impl = inf.m_depthStencilAttachment.m_texture->getImplementation();
+		const TextureImpl& impl = *inf.m_depthStencilAttachment.m_texture->m_impl;
 		if(impl.m_akAspect == DepthStencilAspectMask::DEPTH_STENCIL
 		if(impl.m_akAspect == DepthStencilAspectMask::DEPTH_STENCIL
 			&& !(impl.m_workarounds & TextureImplWorkaround::S8_TO_D24S8))
 			&& !(impl.m_workarounds & TextureImplWorkaround::S8_TO_D24S8))
 		{
 		{
@@ -111,12 +111,12 @@ void FramebufferImpl::setupAttachmentDescriptor(const FramebufferAttachmentInfo&
 	}
 	}
 	else
 	else
 	{
 	{
-		layout = att.m_texture->getImplementation().computeLayout(att.m_usageInsideRenderPass, 0);
+		layout = att.m_texture->m_impl->computeLayout(att.m_usageInsideRenderPass, 0);
 	}
 	}
 
 
 	desc = {};
 	desc = {};
 	desc.format = (m_defaultFramebuffer) ? getGrManagerImpl().getDefaultFramebufferSurfaceFormat()
 	desc.format = (m_defaultFramebuffer) ? getGrManagerImpl().getDefaultFramebufferSurfaceFormat()
-										 : convertFormat(att.m_texture->getImplementation().m_format);
+										 : convertFormat(att.m_texture->m_impl->m_format);
 	desc.samples = VK_SAMPLE_COUNT_1_BIT;
 	desc.samples = VK_SAMPLE_COUNT_1_BIT;
 	desc.loadOp = convertLoadOp(att.m_loadOperation);
 	desc.loadOp = convertLoadOp(att.m_loadOperation);
 	desc.storeOp = convertStoreOp(att.m_storeOperation);
 	desc.storeOp = convertStoreOp(att.m_storeOperation);
@@ -144,9 +144,8 @@ Error FramebufferImpl::initRenderPass(const FramebufferInitInfo& init)
 		setupAttachmentDescriptor(att, attachmentDescriptions[i]);
 		setupAttachmentDescriptor(att, attachmentDescriptions[i]);
 
 
 		references[i].attachment = i;
 		references[i].attachment = i;
-		references[i].layout = (att.m_texture)
-			? att.m_texture->getImplementation().computeLayout(att.m_usageInsideRenderPass, 0)
-			: VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+		references[i].layout = (att.m_texture) ? att.m_texture->m_impl->computeLayout(att.m_usageInsideRenderPass, 0)
+											   : VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
 
 
 		++ci.attachmentCount;
 		++ci.attachmentCount;
 	}
 	}
@@ -157,7 +156,7 @@ Error FramebufferImpl::initRenderPass(const FramebufferInitInfo& init)
 		setupAttachmentDescriptor(init.m_depthStencilAttachment, attachmentDescriptions[ci.attachmentCount]);
 		setupAttachmentDescriptor(init.m_depthStencilAttachment, attachmentDescriptions[ci.attachmentCount]);
 
 
 		dsReference.attachment = ci.attachmentCount;
 		dsReference.attachment = ci.attachmentCount;
-		dsReference.layout = init.m_depthStencilAttachment.m_texture->getImplementation().computeLayout(
+		dsReference.layout = init.m_depthStencilAttachment.m_texture->m_impl->computeLayout(
 			init.m_depthStencilAttachment.m_usageInsideRenderPass, 0);
 			init.m_depthStencilAttachment.m_usageInsideRenderPass, 0);
 
 
 		++ci.attachmentCount;
 		++ci.attachmentCount;
@@ -215,7 +214,7 @@ Error FramebufferImpl::initFramebuffer(const FramebufferInitInfo& init)
 		for(U i = 0; i < init.m_colorAttachmentCount; ++i)
 		for(U i = 0; i < init.m_colorAttachmentCount; ++i)
 		{
 		{
 			const FramebufferAttachmentInfo& att = init.m_colorAttachments[i];
 			const FramebufferAttachmentInfo& att = init.m_colorAttachments[i];
-			TextureImpl& tex = att.m_texture->getImplementation();
+			TextureImpl& tex = *att.m_texture->m_impl;
 
 
 			attachments[count] = tex.getOrCreateSingleSurfaceView(att.m_surface, att.m_aspect);
 			attachments[count] = tex.getOrCreateSingleSurfaceView(att.m_surface, att.m_aspect);
 
 
@@ -231,7 +230,7 @@ Error FramebufferImpl::initFramebuffer(const FramebufferInitInfo& init)
 		if(hasDepthStencil)
 		if(hasDepthStencil)
 		{
 		{
 			const FramebufferAttachmentInfo& att = init.m_depthStencilAttachment;
 			const FramebufferAttachmentInfo& att = init.m_depthStencilAttachment;
-			TextureImpl& tex = att.m_texture->getImplementation();
+			TextureImpl& tex = *att.m_texture->m_impl;
 
 
 			DepthStencilAspectMask aspect;
 			DepthStencilAspectMask aspect;
 			if(!!(tex.m_workarounds & TextureImplWorkaround::S8_TO_D24S8))
 			if(!!(tex.m_workarounds & TextureImplWorkaround::S8_TO_D24S8))

+ 7 - 7
src/anki/gr/vulkan/GpuMemoryManager.cpp

@@ -41,7 +41,7 @@ static const Array<ClassInf, CLASS_COUNT> CLASSES = {{{256_B, 16_KB},
 	{64_MB, 256_MB},
 	{64_MB, 256_MB},
 	{128_MB, 256_MB}}};
 	{128_MB, 256_MB}}};
 
 
-class GpuMemoryManager::Memory final : public ClassAllocatorMemory,
+class GpuMemoryManager::Memory final : public ClassGpuAllocatorMemory,
 									   public IntrusiveListEnabled<GpuMemoryManager::Memory>
 									   public IntrusiveListEnabled<GpuMemoryManager::Memory>
 {
 {
 public:
 public:
@@ -53,7 +53,7 @@ public:
 	U8 m_classIdx = MAX_U8;
 	U8 m_classIdx = MAX_U8;
 };
 };
 
 
-class GpuMemoryManager::Interface final : public ClassAllocatorInterface
+class GpuMemoryManager::Interface final : public ClassGpuAllocatorInterface
 {
 {
 public:
 public:
 	GrAllocator<U8> m_alloc;
 	GrAllocator<U8> m_alloc;
@@ -62,7 +62,7 @@ public:
 	VkDevice m_dev = VK_NULL_HANDLE;
 	VkDevice m_dev = VK_NULL_HANDLE;
 	U8 m_memTypeIdx = MAX_U8;
 	U8 m_memTypeIdx = MAX_U8;
 
 
-	Error allocate(U classIdx, ClassAllocatorMemory*& cmem)
+	Error allocate(U classIdx, ClassGpuAllocatorMemory*& cmem)
 	{
 	{
 		Memory* mem;
 		Memory* mem;
 
 
@@ -97,7 +97,7 @@ public:
 		return ErrorCode::NONE;
 		return ErrorCode::NONE;
 	}
 	}
 
 
-	void free(ClassAllocatorMemory* cmem)
+	void free(ClassGpuAllocatorMemory* cmem)
 	{
 	{
 		ANKI_ASSERT(cmem);
 		ANKI_ASSERT(cmem);
 
 
@@ -150,7 +150,7 @@ public:
 	}
 	}
 
 
 	// Mapp memory
 	// Mapp memory
-	void* mapMemory(ClassAllocatorMemory* cmem)
+	void* mapMemory(ClassGpuAllocatorMemory* cmem)
 	{
 	{
 		ANKI_ASSERT(cmem);
 		ANKI_ASSERT(cmem);
 		Memory* mem = static_cast<Memory*>(cmem);
 		Memory* mem = static_cast<Memory*>(cmem);
@@ -226,7 +226,7 @@ void GpuMemoryManager::init(VkPhysicalDevice pdev, VkDevice dev, GrAllocator<U8>
 void GpuMemoryManager::allocateMemory(
 void GpuMemoryManager::allocateMemory(
 	U memTypeIdx, PtrSize size, U alignment, Bool linearResource, GpuMemoryHandle& handle)
 	U memTypeIdx, PtrSize size, U alignment, Bool linearResource, GpuMemoryHandle& handle)
 {
 {
-	ClassAllocator& calloc = m_callocs[memTypeIdx * 2 + ((linearResource) ? 0 : 1)];
+	ClassGpuAllocator& calloc = m_callocs[memTypeIdx * 2 + ((linearResource) ? 0 : 1)];
 	Error err = calloc.allocate(size, alignment, handle.m_classHandle);
 	Error err = calloc.allocate(size, alignment, handle.m_classHandle);
 	(void)err;
 	(void)err;
 
 
@@ -240,7 +240,7 @@ void GpuMemoryManager::freeMemory(GpuMemoryHandle& handle)
 {
 {
 	ANKI_ASSERT(handle);
 	ANKI_ASSERT(handle);
 
 
-	ClassAllocator& calloc = m_callocs[handle.m_memTypeIdx * 2 + ((handle.m_linear) ? 0 : 1)];
+	ClassGpuAllocator& calloc = m_callocs[handle.m_memTypeIdx * 2 + ((handle.m_linear) ? 0 : 1)];
 	calloc.free(handle.m_classHandle);
 	calloc.free(handle.m_classHandle);
 
 
 	handle = {};
 	handle = {};

+ 3 - 3
src/anki/gr/vulkan/GpuMemoryManager.h

@@ -5,7 +5,7 @@
 
 
 #pragma once
 #pragma once
 
 
-#include <anki/gr/common/ClassAllocator.h>
+#include <anki/gr/common/ClassGpuAllocator.h>
 #include <anki/gr/vulkan/Common.h>
 #include <anki/gr/vulkan/Common.h>
 
 
 namespace anki
 namespace anki
@@ -29,7 +29,7 @@ public:
 	}
 	}
 
 
 private:
 private:
-	ClassAllocatorHandle m_classHandle;
+	ClassGpuAllocatorHandle m_classHandle;
 	U8 m_memTypeIdx = MAX_U8;
 	U8 m_memTypeIdx = MAX_U8;
 	Bool8 m_linear = false;
 	Bool8 m_linear = false;
 };
 };
@@ -65,7 +65,7 @@ private:
 	GrAllocator<U8> m_alloc;
 	GrAllocator<U8> m_alloc;
 	VkDevice m_dev;
 	VkDevice m_dev;
 	DynamicArray<Interface> m_ifaces;
 	DynamicArray<Interface> m_ifaces;
-	DynamicArray<ClassAllocator> m_callocs;
+	DynamicArray<ClassGpuAllocator> m_callocs;
 	VkPhysicalDeviceMemoryProperties m_memoryProperties;
 	VkPhysicalDeviceMemoryProperties m_memoryProperties;
 };
 };
 /// @}
 /// @}

+ 2 - 2
src/anki/gr/vulkan/GrManager.cpp

@@ -65,7 +65,7 @@ void* GrManager::tryAllocateFrameTransientMemory(PtrSize size, BufferUsageBit us
 
 
 void GrManager::getTextureSurfaceUploadInfo(TexturePtr tex, const TextureSurfaceInfo& surf, PtrSize& allocationSize)
 void GrManager::getTextureSurfaceUploadInfo(TexturePtr tex, const TextureSurfaceInfo& surf, PtrSize& allocationSize)
 {
 {
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	impl.checkSurface(surf);
 	impl.checkSurface(surf);
 
 
 	U width = impl.m_width >> surf.m_level;
 	U width = impl.m_width >> surf.m_level;
@@ -92,7 +92,7 @@ void GrManager::getTextureSurfaceUploadInfo(TexturePtr tex, const TextureSurface
 
 
 void GrManager::getTextureVolumeUploadInfo(TexturePtr tex, const TextureVolumeInfo& vol, PtrSize& allocationSize)
 void GrManager::getTextureVolumeUploadInfo(TexturePtr tex, const TextureVolumeInfo& vol, PtrSize& allocationSize)
 {
 {
-	const TextureImpl& impl = tex->getImplementation();
+	const TextureImpl& impl = *tex->m_impl;
 	impl.checkVolume(vol);
 	impl.checkVolume(vol);
 
 
 	U width = impl.m_width >> vol.m_level;
 	U width = impl.m_width >> vol.m_level;

+ 1 - 1
src/anki/gr/vulkan/GrManagerImpl.cpp

@@ -635,7 +635,7 @@ void GrManagerImpl::deleteCommandBuffer(VkCommandBuffer cmdb, CommandBufferFlag
 
 
 void GrManagerImpl::flushCommandBuffer(CommandBufferPtr cmdb, Bool wait)
 void GrManagerImpl::flushCommandBuffer(CommandBufferPtr cmdb, Bool wait)
 {
 {
-	CommandBufferImpl& impl = cmdb->getImplementation();
+	CommandBufferImpl& impl = *cmdb->m_impl;
 	VkCommandBuffer handle = impl.getHandle();
 	VkCommandBuffer handle = impl.getHandle();
 
 
 	VkSubmitInfo submit = {};
 	VkSubmitInfo submit = {};

+ 6 - 7
src/anki/gr/vulkan/PipelineImpl.cpp

@@ -107,7 +107,7 @@ Error PipelineImpl::initCompute(const PipelineInitInfo& init)
 	VkPipelineShaderStageCreateInfo& stage = ci.stage;
 	VkPipelineShaderStageCreateInfo& stage = ci.stage;
 	stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
 	stage.sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
 	stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
 	stage.stage = VK_SHADER_STAGE_COMPUTE_BIT;
-	stage.module = init.m_shaders[ShaderType::COMPUTE]->getImplementation().m_handle;
+	stage.module = init.m_shaders[ShaderType::COMPUTE]->m_impl->m_handle;
 	stage.pName = "main";
 	stage.pName = "main";
 	stage.pSpecializationInfo = nullptr;
 	stage.pSpecializationInfo = nullptr;
 
 
@@ -128,14 +128,14 @@ void PipelineImpl::initShaders(const PipelineInitInfo& init, VkGraphicsPipelineC
 			continue;
 			continue;
 		}
 		}
 
 
-		ANKI_ASSERT(init.m_shaders[type]->getImplementation().m_shaderType == type);
-		ANKI_ASSERT(init.m_shaders[type]->getImplementation().m_handle);
+		ANKI_ASSERT(init.m_shaders[type]->m_impl->m_shaderType == type);
+		ANKI_ASSERT(init.m_shaders[type]->m_impl->m_handle);
 
 
 		VkPipelineShaderStageCreateInfo& stage =
 		VkPipelineShaderStageCreateInfo& stage =
 			const_cast<VkPipelineShaderStageCreateInfo&>(ci.pStages[ci.stageCount]);
 			const_cast<VkPipelineShaderStageCreateInfo&>(ci.pStages[ci.stageCount]);
 
 
 		stage.stage = VkShaderStageFlagBits(1u << U(type));
 		stage.stage = VkShaderStageFlagBits(1u << U(type));
-		stage.module = init.m_shaders[type]->getImplementation().m_handle;
+		stage.module = init.m_shaders[type]->m_impl->m_handle;
 		stage.pName = "main";
 		stage.pName = "main";
 
 
 		++ci.stageCount;
 		++ci.stageCount;
@@ -326,10 +326,9 @@ Error PipelineImpl::createPplineLayout(const PipelineInitInfo& init)
 
 
 		for(U i = 0; i < U(ShaderType::COUNT); ++i)
 		for(U i = 0; i < U(ShaderType::COUNT); ++i)
 		{
 		{
-			if(init.m_shaders[i] && (init.m_shaders[i]->getImplementation().m_descriptorSetMask & (1 << j)))
+			if(init.m_shaders[i] && (init.m_shaders[i]->m_impl->m_descriptorSetMask & (1 << j)))
 			{
 			{
-				const DescriptorSetLayoutInfo& dsetInfo1 =
-					init.m_shaders[i]->getImplementation().m_descriptorSetLayoutInfos[j];
+				const DescriptorSetLayoutInfo& dsetInfo1 = init.m_shaders[i]->m_impl->m_descriptorSetLayoutInfos[j];
 
 
 				// Merge
 				// Merge
 				dsetInfo.m_texCount = max(dsetInfo.m_texCount, dsetInfo1.m_texCount);
 				dsetInfo.m_texCount = max(dsetInfo.m_texCount, dsetInfo1.m_texCount);

+ 14 - 14
src/anki/gr/vulkan/ResourceGroupImpl.cpp

@@ -90,7 +90,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 			++count;
 			++count;
 			needsDSet = true;
 			needsDSet = true;
 			updateBindPoint(b.m_usage);
 			updateBindPoint(b.m_usage);
-			ANKI_ASSERT(b.m_texture->getImplementation().usageValid(b.m_usage));
+			ANKI_ASSERT(b.m_texture->m_impl->usageValid(b.m_usage));
 
 
 			m_descriptorSetLayoutInfo.m_texCount = i + 1;
 			m_descriptorSetLayoutInfo.m_texCount = i + 1;
 		}
 		}
@@ -112,7 +112,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 			needsDSet = true;
 			needsDSet = true;
 			updateBindPoint(b.m_usage);
 			updateBindPoint(b.m_usage);
 			ANKI_ASSERT(!!(b.m_usage & BufferUsageBit::UNIFORM_ALL) && !(b.m_usage & ~BufferUsageBit::UNIFORM_ALL));
 			ANKI_ASSERT(!!(b.m_usage & BufferUsageBit::UNIFORM_ALL) && !(b.m_usage & ~BufferUsageBit::UNIFORM_ALL));
-			ANKI_ASSERT(b.m_buffer->getImplementation().usageValid(b.m_usage));
+			ANKI_ASSERT(b.m_buffer->m_impl->usageValid(b.m_usage));
 
 
 			m_descriptorSetLayoutInfo.m_uniCount = i + 1;
 			m_descriptorSetLayoutInfo.m_uniCount = i + 1;
 		}
 		}
@@ -137,7 +137,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 			needsDSet = true;
 			needsDSet = true;
 			updateBindPoint(b.m_usage);
 			updateBindPoint(b.m_usage);
 			ANKI_ASSERT(!!(b.m_usage & BufferUsageBit::STORAGE_ALL) && !(b.m_usage & ~BufferUsageBit::STORAGE_ALL));
 			ANKI_ASSERT(!!(b.m_usage & BufferUsageBit::STORAGE_ALL) && !(b.m_usage & ~BufferUsageBit::STORAGE_ALL));
-			ANKI_ASSERT(b.m_buffer->getImplementation().usageValid(b.m_usage));
+			ANKI_ASSERT(b.m_buffer->m_impl->usageValid(b.m_usage));
 
 
 			m_descriptorSetLayoutInfo.m_storageCount = i + 1;
 			m_descriptorSetLayoutInfo.m_storageCount = i + 1;
 		}
 		}
@@ -161,7 +161,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 			++count;
 			++count;
 			needsDSet = true;
 			needsDSet = true;
 			updateBindPoint(b.m_usage);
 			updateBindPoint(b.m_usage);
-			ANKI_ASSERT(b.m_texture->getImplementation().usageValid(b.m_usage));
+			ANKI_ASSERT(b.m_texture->m_impl->usageValid(b.m_usage));
 
 
 			m_descriptorSetLayoutInfo.m_imgCount = i + 1;
 			m_descriptorSetLayoutInfo.m_imgCount = i + 1;
 		}
 		}
@@ -173,7 +173,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 		if(b.m_buffer)
 		if(b.m_buffer)
 		{
 		{
 			++count;
 			++count;
-			ANKI_ASSERT(b.m_buffer->getImplementation().usageValid(BufferUsageBit::VERTEX));
+			ANKI_ASSERT(b.m_buffer->m_impl->usageValid(BufferUsageBit::VERTEX));
 		}
 		}
 		else if(b.m_uploadedMemory)
 		else if(b.m_uploadedMemory)
 		{
 		{
@@ -183,7 +183,7 @@ U ResourceGroupImpl::calcRefCount(const ResourceGroupInitInfo& init, Bool& hasUp
 
 
 	if(init.m_indexBuffer.m_buffer)
 	if(init.m_indexBuffer.m_buffer)
 	{
 	{
-		ANKI_ASSERT(init.m_indexBuffer.m_buffer->getImplementation().usageValid(BufferUsageBit::INDEX));
+		ANKI_ASSERT(init.m_indexBuffer.m_buffer->m_impl->usageValid(BufferUsageBit::INDEX));
 		++count;
 		++count;
 	}
 	}
 
 
@@ -230,7 +230,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 		if(init.m_textures[i].m_texture)
 		if(init.m_textures[i].m_texture)
 		{
 		{
 			ANKI_ASSERT(!hole);
 			ANKI_ASSERT(!hole);
-			TextureImpl& teximpl = init.m_textures[i].m_texture->getImplementation();
+			TextureImpl& teximpl = *init.m_textures[i].m_texture->m_impl;
 
 
 			VkDescriptorImageInfo& inf = texes[i];
 			VkDescriptorImageInfo& inf = texes[i];
 			inf.imageView = teximpl.getOrCreateResourceGroupView(init.m_textures[i].m_aspect);
 			inf.imageView = teximpl.getOrCreateResourceGroupView(init.m_textures[i].m_aspect);
@@ -239,13 +239,13 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 
 
 			if(init.m_textures[i].m_sampler)
 			if(init.m_textures[i].m_sampler)
 			{
 			{
-				inf.sampler = init.m_textures[i].m_sampler->getImplementation().m_handle;
+				inf.sampler = init.m_textures[i].m_sampler->m_impl->m_handle;
 
 
 				m_refs[refCount++] = init.m_textures[i].m_sampler;
 				m_refs[refCount++] = init.m_textures[i].m_sampler;
 			}
 			}
 			else
 			else
 			{
 			{
-				inf.sampler = teximpl.m_sampler->getImplementation().m_handle;
+				inf.sampler = teximpl.m_sampler->m_impl->m_handle;
 				// No need to ref
 				// No need to ref
 			}
 			}
 
 
@@ -279,7 +279,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 		{
 		{
 			ANKI_ASSERT(!hole);
 			ANKI_ASSERT(!hole);
 			VkDescriptorBufferInfo& inf = unis[i];
 			VkDescriptorBufferInfo& inf = unis[i];
-			inf.buffer = init.m_uniformBuffers[i].m_buffer->getImplementation().getHandle();
+			inf.buffer = init.m_uniformBuffers[i].m_buffer->m_impl->getHandle();
 			inf.offset = init.m_uniformBuffers[i].m_offset;
 			inf.offset = init.m_uniformBuffers[i].m_offset;
 			inf.range = init.m_uniformBuffers[i].m_range;
 			inf.range = init.m_uniformBuffers[i].m_range;
 			if(inf.range == 0)
 			if(inf.range == 0)
@@ -330,7 +330,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 		{
 		{
 			ANKI_ASSERT(!hole);
 			ANKI_ASSERT(!hole);
 			VkDescriptorBufferInfo& inf = storages[i];
 			VkDescriptorBufferInfo& inf = storages[i];
-			inf.buffer = init.m_storageBuffers[i].m_buffer->getImplementation().getHandle();
+			inf.buffer = init.m_storageBuffers[i].m_buffer->m_impl->getHandle();
 			inf.offset = init.m_storageBuffers[i].m_offset;
 			inf.offset = init.m_storageBuffers[i].m_offset;
 			inf.range = init.m_storageBuffers[i].m_range;
 			inf.range = init.m_storageBuffers[i].m_range;
 			if(inf.range == 0)
 			if(inf.range == 0)
@@ -380,7 +380,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 		{
 		{
 			ANKI_ASSERT(!hole);
 			ANKI_ASSERT(!hole);
 			VkDescriptorImageInfo& inf = images[i];
 			VkDescriptorImageInfo& inf = images[i];
-			TextureImpl& tex = binding.m_texture->getImplementation();
+			TextureImpl& tex = *binding.m_texture->m_impl;
 
 
 			inf.imageView = tex.getOrCreateSingleLevelView(binding.m_level, tex.m_akAspect);
 			inf.imageView = tex.getOrCreateSingleLevelView(binding.m_level, tex.m_akAspect);
 			inf.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
 			inf.imageLayout = VK_IMAGE_LAYOUT_GENERAL;
@@ -420,7 +420,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 		if(init.m_vertexBuffers[i].m_buffer)
 		if(init.m_vertexBuffers[i].m_buffer)
 		{
 		{
 			ANKI_ASSERT(!hole);
 			ANKI_ASSERT(!hole);
-			m_vert.m_buffs[i] = init.m_vertexBuffers[i].m_buffer->getImplementation().getHandle();
+			m_vert.m_buffs[i] = init.m_vertexBuffers[i].m_buffer->m_impl->getHandle();
 			m_vert.m_offsets[i] = init.m_vertexBuffers[i].m_offset;
 			m_vert.m_offsets[i] = init.m_vertexBuffers[i].m_offset;
 			ANKI_ASSERT(m_vert.m_offsets[i] != MAX_PTR_SIZE);
 			ANKI_ASSERT(m_vert.m_offsets[i] != MAX_PTR_SIZE);
 
 
@@ -446,7 +446,7 @@ Error ResourceGroupImpl::init(const ResourceGroupInitInfo& init)
 
 
 	if(init.m_indexBuffer.m_buffer)
 	if(init.m_indexBuffer.m_buffer)
 	{
 	{
-		m_indexBuffHandle = init.m_indexBuffer.m_buffer->getImplementation().getHandle();
+		m_indexBuffHandle = init.m_indexBuffer.m_buffer->m_impl->getHandle();
 		m_indexBufferOffset = init.m_indexBuffer.m_offset;
 		m_indexBufferOffset = init.m_indexBuffer.m_offset;
 
 
 		if(init.m_indexSize == 2)
 		if(init.m_indexSize == 2)

+ 2 - 2
src/anki/gr/vulkan/TextureImpl.cpp

@@ -184,7 +184,7 @@ Error TextureImpl::init(const TextureInitInfo& init_, Texture* tex)
 		range.layerCount = m_layerCount;
 		range.layerCount = m_layerCount;
 		range.levelCount = m_mipCount;
 		range.levelCount = m_mipCount;
 
 
-		cmdb->getImplementation().setImageBarrier(VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
+		cmdb->m_impl->setImageBarrier(VK_PIPELINE_STAGE_BOTTOM_OF_PIPE_BIT,
 			0,
 			0,
 			VK_IMAGE_LAYOUT_UNDEFINED,
 			VK_IMAGE_LAYOUT_UNDEFINED,
 			VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
 			VK_PIPELINE_STAGE_ALL_COMMANDS_BIT,
@@ -193,7 +193,7 @@ Error TextureImpl::init(const TextureInitInfo& init_, Texture* tex)
 			TexturePtr(tex),
 			TexturePtr(tex),
 			range);
 			range);
 
 
-		cmdb->getImplementation().endRecording();
+		cmdb->m_impl->endRecording();
 		getGrManagerImpl().flushCommandBuffer(cmdb);
 		getGrManagerImpl().flushCommandBuffer(cmdb);
 	}
 	}