Panagiotis Christopoulos Charitos 4 лет назад
Родитель
Сommit
b66f3a99bb
3 измененных файлов с 12 добавлено и 8 удалено
  1. 5 0
      AnKi/Gr/RenderGraph.cpp
  2. 2 3
      AnKi/Gr/Vulkan/TextureImpl.cpp
  3. 5 5
      AnKi/Renderer/RtShadows.cpp

+ 5 - 0
AnKi/Gr/RenderGraph.cpp

@@ -1528,6 +1528,11 @@ StringAuto RenderGraph::asUsageToStr(StackAllocator<U8>& alloc, AccelerationStru
 	ANKI_AS_USAGE(COMPUTE_READ);
 	ANKI_AS_USAGE(TRACE_RAYS_READ);
 
+	if(!usage)
+	{
+		slist.pushBackSprintf("NONE");
+	}
+
 #	undef ANKI_AS_USAGE
 
 	ANKI_ASSERT(!slist.isEmpty());

+ 2 - 3
AnKi/Gr/Vulkan/TextureImpl.cpp

@@ -305,9 +305,8 @@ 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");
+	printf("Creating texture %p %s\n", static_cast<void*>(m_imageHandle),
+		   init.getName() ? init.getName().cstr() : "Unnamed");
 #endif
 
 	// Allocate memory

+ 5 - 5
AnKi/Renderer/RtShadows.cpp

@@ -497,7 +497,7 @@ void RtShadows::run(RenderPassWorkContext& rgraphCtx)
 	rgraphCtx.bindColorTexture(0, 8, m_runCtx.m_historyRt);
 	cmdb->bindSampler(0, 9, m_r->getSamplers().m_trilinearClamp);
 	cmdb->bindSampler(0, 10, m_r->getSamplers().m_nearestNearestClamp);
-	rgraphCtx.bindColorTexture(0, 11, m_r->getDepthDownscale().getHiZRt());
+	rgraphCtx.bindTexture(0, 11, m_r->getDepthDownscale().getHiZRt(), HIZ_HALF_DEPTH);
 	rgraphCtx.bindColorTexture(0, 12, m_r->getMotionVectors().getMotionVectorsRt());
 	rgraphCtx.bindColorTexture(0, 13, m_r->getMotionVectors().getRejectionFactorRt());
 	rgraphCtx.bindColorTexture(0, 14, m_r->getGBuffer().getColorRt(2));
@@ -530,7 +530,7 @@ void RtShadows::runDenoise(RenderPassWorkContext& rgraphCtx)
 	cmdb->bindSampler(0, 0, m_r->getSamplers().m_nearestNearestClamp);
 	cmdb->bindSampler(0, 1, m_r->getSamplers().m_trilinearClamp);
 	rgraphCtx.bindColorTexture(0, 2, m_runCtx.m_intermediateShadowsRts[m_runCtx.m_denoiseOrientation]);
-	rgraphCtx.bindColorTexture(0, 3, m_r->getDepthDownscale().getHiZRt());
+	rgraphCtx.bindTexture(0, 3, m_r->getDepthDownscale().getHiZRt(), HIZ_HALF_DEPTH);
 	rgraphCtx.bindColorTexture(0, 4, m_r->getGBuffer().getColorRt(2));
 	rgraphCtx.bindColorTexture(0, 5, m_runCtx.m_currentMomentsRt);
 	rgraphCtx.bindColorTexture(0, 6, m_runCtx.m_currentHistoryLengthRt);
@@ -560,7 +560,7 @@ void RtShadows::runSvgfVariance(RenderPassWorkContext& rgraphCtx)
 	rgraphCtx.bindColorTexture(0, 2, m_runCtx.m_intermediateShadowsRts[0]);
 	rgraphCtx.bindColorTexture(0, 3, m_runCtx.m_currentMomentsRt);
 	rgraphCtx.bindColorTexture(0, 4, m_runCtx.m_currentHistoryLengthRt);
-	rgraphCtx.bindColorTexture(0, 5, m_r->getDepthDownscale().getHiZRt());
+	rgraphCtx.bindTexture(0, 5, m_r->getDepthDownscale().getHiZRt(), HIZ_HALF_DEPTH);
 
 	rgraphCtx.bindImage(0, 6, m_runCtx.m_intermediateShadowsRts[1]);
 	rgraphCtx.bindImage(0, 7, m_runCtx.m_varianceRts[1]);
@@ -590,7 +590,7 @@ void RtShadows::runSvgfAtrous(RenderPassWorkContext& rgraphCtx)
 	cmdb->bindSampler(0, 0, m_r->getSamplers().m_nearestNearestClamp);
 	cmdb->bindSampler(0, 1, m_r->getSamplers().m_trilinearClamp);
 
-	rgraphCtx.bindColorTexture(0, 2, m_r->getDepthDownscale().getHiZRt());
+	rgraphCtx.bindTexture(0, 2, m_r->getDepthDownscale().getHiZRt(), HIZ_HALF_DEPTH);
 	rgraphCtx.bindColorTexture(0, 3, m_runCtx.m_intermediateShadowsRts[readRtIdx]);
 	rgraphCtx.bindColorTexture(0, 4, m_runCtx.m_varianceRts[readRtIdx]);
 
@@ -623,7 +623,7 @@ void RtShadows::runUpscale(RenderPassWorkContext& rgraphCtx)
 
 	rgraphCtx.bindColorTexture(0, 2, m_runCtx.m_historyRt);
 	rgraphCtx.bindImage(0, 3, m_runCtx.m_upscaledRt);
-	rgraphCtx.bindColorTexture(0, 4, m_r->getDepthDownscale().getHiZRt());
+	rgraphCtx.bindTexture(0, 4, m_r->getDepthDownscale().getHiZRt(), HIZ_HALF_DEPTH);
 	rgraphCtx.bindTexture(0, 5, m_r->getGBuffer().getDepthRt(), TextureSubresourceInfo(DepthStencilAspectBit::DEPTH));
 
 	dispatchPPCompute(cmdb, 8, 8, m_r->getWidth(), m_r->getHeight());