Remove useless framebuffer clear in reprojection

This commit is contained in:
Patrick Nicolas
2024-03-14 21:15:53 +01:00
parent 295d502032
commit c006e6c31b
2 changed files with 3 additions and 7 deletions
+2 -6
View File
@@ -209,7 +209,7 @@ stream_reprojection::stream_reprojection(vk::raii::Device& device, vk::raii::Phy
vk::AttachmentDescription attachment{
.format = format,
.samples = vk::SampleCountFlagBits::e1,
.loadOp = vk::AttachmentLoadOp::eClear,
.loadOp = vk::AttachmentLoadOp::eDontCare,
.storeOp = vk::AttachmentStoreOp::eStore,
.initialLayout = vk::ImageLayout::eColorAttachmentOptimal,
.finalLayout = vk::ImageLayout::eColorAttachmentOptimal,
@@ -314,7 +314,7 @@ stream_reprojection::stream_reprojection(vk::raii::Device& device, vk::raii::Phy
}},
.ColorBlendState = {.flags = {}},
.ColorBlendAttachments = {{
.colorWriteMask = vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB
.colorWriteMask = vk::ColorComponentFlagBits::eR | vk::ColorComponentFlagBits::eG | vk::ColorComponentFlagBits::eB | vk::ColorComponentFlagBits::eA
}},
.layout = *layout,
.renderPass = *renderpass,
@@ -420,9 +420,6 @@ void stream_reprojection::reproject(vk::raii::CommandBuffer& command_buffer, int
ubo[source]->lambda.y = foveation_parameters[source].y.a / foveation_parameters[source].y.scale;
ubo[source]->xc.y = foveation_parameters[source].y.center;
std::array<float, 4> col = {0, 0, 0, 1};
vk::ClearValue clear_color(col);
vk::RenderPassBeginInfo begin_info{
.renderPass = *renderpass,
.framebuffer = *framebuffers[destination],
@@ -431,7 +428,6 @@ void stream_reprojection::reproject(vk::raii::CommandBuffer& command_buffer, int
.extent = extent,
},
};
begin_info.setClearValues(clear_color);
command_buffer.pipelineBarrier(
vk::PipelineStageFlagBits::eTopOfPipe,
+1 -1
View File
@@ -103,7 +103,7 @@ void main()
else
uv = inUV;
outColor = texture(texSampler, uv);
outColor = vec4(texture(texSampler, uv).rgb, 1);
}
#endif