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