Ver Fonte

Minor changes

Panagiotis Christopoulos Charitos há 4 anos atrás
pai
commit
0558e85725

+ 2 - 2
AnKi/Gr/RenderGraph.h

@@ -387,11 +387,11 @@ class FramebufferDescriptionAttachment
 {
 public:
 	TextureSurfaceInfo m_surface;
-	AttachmentLoadOperation m_loadOperation = AttachmentLoadOperation::CLEAR;
+	AttachmentLoadOperation m_loadOperation = AttachmentLoadOperation::DONT_CARE;
 	AttachmentStoreOperation m_storeOperation = AttachmentStoreOperation::STORE;
 	ClearValue m_clearValue;
 
-	AttachmentLoadOperation m_stencilLoadOperation = AttachmentLoadOperation::CLEAR;
+	AttachmentLoadOperation m_stencilLoadOperation = AttachmentLoadOperation::DONT_CARE;
 	AttachmentStoreOperation m_stencilStoreOperation = AttachmentStoreOperation::STORE;
 
 	DepthStencilAspectBit m_aspect = DepthStencilAspectBit::NONE; ///< Relevant only for depth stencil textures.

+ 0 - 2
AnKi/Renderer/Common.h

@@ -132,8 +132,6 @@ public:
 
 	/// The render target that the Renderer will populate.
 	RenderTargetHandle m_outRenderTarget;
-	U32 m_outRenderTargetWidth = 0;
-	U32 m_outRenderTargetHeight = 0;
 
 	ClusteredShadingContext m_clusteredShading;
 

+ 0 - 1
AnKi/Renderer/DownscaleBlur.cpp

@@ -60,7 +60,6 @@ Error DownscaleBlur::initInternal()
 		for(U32 pass = 0; pass < m_passCount; ++pass)
 		{
 			m_fbDescrs[pass].m_colorAttachmentCount = 1;
-			m_fbDescrs[pass].m_colorAttachments[0].m_loadOperation = AttachmentLoadOperation::DONT_CARE;
 			m_fbDescrs[pass].m_colorAttachments[0].m_surface.m_level = pass;
 			m_fbDescrs[pass].bake();
 		}

+ 2 - 3
AnKi/Renderer/FinalComposite.cpp

@@ -35,7 +35,6 @@ Error FinalComposite::initInternal()
 	ANKI_CHECK(loadColorGradingTextureImage("EngineAssets/DefaultLut.ankitex"));
 
 	m_fbDescr.m_colorAttachmentCount = 1;
-	m_fbDescr.m_colorAttachments[0].m_loadOperation = AttachmentLoadOperation::DONT_CARE;
 	m_fbDescr.bake();
 
 	ANKI_CHECK(getResourceManager().loadResource("EngineAssets/BlueNoise_Rgba8_64x64.png", m_blueNoise));
@@ -178,11 +177,11 @@ void FinalComposite::run(RenderingContext& ctx, RenderPassWorkContext& rgraphCtx
 		cmdb->bindSampler(0, 1, m_r->getSamplers().m_nearestNearestClamp);
 	}
 
-	cmdb->setViewport(0, 0, ctx.m_outRenderTargetWidth, ctx.m_outRenderTargetHeight);
+	cmdb->setViewport(0, 0, m_r->getPostProcessResolution().x(), m_r->getPostProcessResolution().y());
 	drawQuad(cmdb);
 
 	// Draw UI
-	m_r->getUiStage().draw(ctx.m_outRenderTargetWidth, ctx.m_outRenderTargetHeight, ctx, cmdb);
+	m_r->getUiStage().draw(m_r->getPostProcessResolution().x(), m_r->getPostProcessResolution().y(), ctx, cmdb);
 }
 
 } // end namespace anki

+ 0 - 1
AnKi/Renderer/LightShading.cpp

@@ -80,7 +80,6 @@ Error LightShading::initLightShading()
 
 	// Create FB descr
 	m_lightShading.m_fbDescr.m_colorAttachmentCount = 1;
-	m_lightShading.m_fbDescr.m_colorAttachments[0].m_loadOperation = AttachmentLoadOperation::DONT_CARE;
 	m_lightShading.m_fbDescr.m_depthStencilAttachment.m_loadOperation = AttachmentLoadOperation::LOAD;
 	m_lightShading.m_fbDescr.m_depthStencilAttachment.m_stencilLoadOperation = AttachmentLoadOperation::DONT_CARE;
 	m_lightShading.m_fbDescr.m_depthStencilAttachment.m_aspect = DepthStencilAspectBit::DEPTH;

+ 0 - 7
AnKi/Renderer/MainRenderer.cpp

@@ -61,7 +61,6 @@ Error MainRenderer::init(const MainRendererInitInfo& inf)
 
 		// FB descr
 		m_fbDescr.m_colorAttachmentCount = 1;
-		m_fbDescr.m_colorAttachments[0].m_loadOperation = AttachmentLoadOperation::DONT_CARE;
 		m_fbDescr.bake();
 
 		ANKI_R_LOGI("There will be a blit pass to the swapchain because render scaling is not 1.0");
@@ -95,18 +94,12 @@ Error MainRenderer::render(RenderQueue& rqueue, TexturePtr presentTex)
 	if(m_rDrawToDefaultFb)
 	{
 		// m_r will draw to a presentable texture
-
 		ctx.m_outRenderTarget = presentRt;
-		ctx.m_outRenderTargetWidth = presentTex->getWidth();
-		ctx.m_outRenderTargetHeight = presentTex->getHeight();
 	}
 	else
 	{
 		// m_r will draw to a temp tex
-
 		ctx.m_outRenderTarget = ctx.m_renderGraphDescr.newRenderTarget(m_tmpRtDesc);
-		ctx.m_outRenderTargetWidth = m_tmpRtDesc.m_width;
-		ctx.m_outRenderTargetHeight = m_tmpRtDesc.m_height;
 	}
 
 	ctx.m_renderQueue = &rqueue;

+ 0 - 1
AnKi/Renderer/ShadowmapsResolve.cpp

@@ -40,7 +40,6 @@ Error ShadowmapsResolve::initInternal()
 
 	// Create FB descr
 	m_fbDescr.m_colorAttachmentCount = 1;
-	m_fbDescr.m_colorAttachments[0].m_loadOperation = AttachmentLoadOperation::CLEAR;
 	m_fbDescr.bake();
 
 	// Prog

+ 2 - 2
AnKi/Shaders/Ssr.glsl

@@ -31,7 +31,7 @@ const Vec2 NOISE_TEX_SIZE = Vec2(64.0);
 const UVec2 WORKGROUP_SIZE = UVec2(8, 8);
 layout(local_size_x = WORKGROUP_SIZE.x, local_size_y = WORKGROUP_SIZE.y, local_size_z = 1) in;
 
-layout(set = 0, binding = 8) uniform writeonly image2D out_img;
+layout(set = 0, binding = 8) uniform writeonly image2D u_outImg;
 #else
 layout(location = 0) in Vec2 in_uv;
 layout(location = 0) out Vec4 out_color;
@@ -144,7 +144,7 @@ void main()
 
 	// Store
 #if defined(ANKI_COMPUTE_SHADER)
-	imageStore(out_img, IVec2(gl_GlobalInvocationID.xy), outColor);
+	imageStore(u_outImg, IVec2(gl_GlobalInvocationID.xy), outColor);
 #else
 	out_color = outColor;
 #endif