浏览代码

[BUGFIX] Temp bugfix for resource textures image layouts

Panagiotis Christopoulos Charitos 8 年之前
父节点
当前提交
d5ae3151d0
共有 2 个文件被更改,包括 6 次插入0 次删除
  1. 5 0
      src/anki/gr/vulkan/TextureImpl.cpp
  2. 1 0
      src/anki/resource/TextureResource.cpp

+ 5 - 0
src/anki/gr/vulkan/TextureImpl.cpp

@@ -304,6 +304,11 @@ Error TextureImpl::initImage(const TextureInitInfo& init_)
 
 	ANKI_VK_CHECK(vkCreateImage(getDevice(), &ci, nullptr, &m_imageHandle));
 	getGrManagerImpl().trySetVulkanHandleName(init.getName(), VK_DEBUG_REPORT_OBJECT_TYPE_IMAGE_EXT, m_imageHandle);
+#if 0
+	printf("Creating texture %p %s\n",
+		static_cast<void*>(m_imageHandle),
+		init.getName() ? init.getName().cstr() : "Unnamed");
+#endif
 
 	// Allocate memory
 	//

+ 1 - 0
src/anki/resource/TextureResource.cpp

@@ -70,6 +70,7 @@ Error TextureResource::load(const ResourceFilename& filename, Bool async)
 	TextureInitInfo init("RsrcTex");
 	init.m_usage = TextureUsageBit::SAMPLED_FRAGMENT | TextureUsageBit::SAMPLED_TESSELLATION_EVALUATION
 		| TextureUsageBit::TRANSFER_DESTINATION;
+	init.m_initialUsage = TextureUsageBit::SAMPLED_FRAGMENT | TextureUsageBit::SAMPLED_TESSELLATION_EVALUATION;
 	U faces = 0;
 
 	ResourceFilePtr file;