Clear image before drawing
This commit is contained in:
@@ -215,7 +215,7 @@ stream_reprojection::stream_reprojection(
|
||||
vk::AttachmentDescription attachment{
|
||||
.format = format,
|
||||
.samples = vk::SampleCountFlagBits::e1,
|
||||
.loadOp = vk::AttachmentLoadOp::eDontCare,
|
||||
.loadOp = vk::AttachmentLoadOp::eClear,
|
||||
.storeOp = vk::AttachmentStoreOp::eStore,
|
||||
.initialLayout = vk::ImageLayout::eColorAttachmentOptimal,
|
||||
.finalLayout = vk::ImageLayout::eColorAttachmentOptimal,
|
||||
@@ -437,6 +437,7 @@ void stream_reprojection::reproject(vk::raii::CommandBuffer & command_buffer, in
|
||||
ubo[source]->xc.y = foveation_parameters[source].y.center;
|
||||
}
|
||||
|
||||
vk::ClearValue clear(vk::ClearColorValue(0, 0, 0, 0));
|
||||
vk::RenderPassBeginInfo begin_info{
|
||||
.renderPass = *renderpass,
|
||||
.framebuffer = *framebuffers[destination],
|
||||
@@ -444,6 +445,8 @@ void stream_reprojection::reproject(vk::raii::CommandBuffer & command_buffer, in
|
||||
.offset = {0, 0},
|
||||
.extent = extent,
|
||||
},
|
||||
.clearValueCount = 1,
|
||||
.pClearValues = &clear,
|
||||
};
|
||||
|
||||
command_buffer.pipelineBarrier(
|
||||
|
||||
Reference in New Issue
Block a user