Skip to content

Commit 3e6b598

Browse files
committed
example 42 fixed (not ported yet but works)
1 parent bc55a9a commit 3e6b598

File tree

1 file changed

+7
-5
lines changed
  • examples_tests/42.FragmentShaderPathTracer

1 file changed

+7
-5
lines changed

examples_tests/42.FragmentShaderPathTracer/main.cpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,9 @@ int main()
111111
const auto swapchainImageUsage = static_cast<asset::IImage::E_USAGE_FLAGS>(asset::IImage::EUF_COLOR_ATTACHMENT_BIT | asset::IImage::EUF_TRANSFER_DST_BIT);
112112
const video::ISurface::SFormat surfaceFormat;
113113

114-
auto initOutput = CommonAPI::Init(
114+
CommonAPI::InitOutput initOutput;
115+
CommonAPI::Init(
116+
initOutput,
115117
video::EAT_VULKAN,
116118
"Compute Shader PathTracer",
117119
requiredInstanceFeatures,
@@ -554,9 +556,9 @@ int main()
554556
// cube envmap handle
555557
{
556558
cb->bindComputePipeline(gpuComputePipeline.get());
557-
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 0u, 1u, &descriptorSets0[imgnum].get(), nullptr);
558-
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 1u, 1u, &uboDescriptorSet1.get(), nullptr);
559-
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 2u, 1u, &descriptorSet2.get(), nullptr);
559+
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 0u, 1u, &descriptorSets0[imgnum].get());
560+
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 1u, 1u, &uboDescriptorSet1.get());
561+
cb->bindDescriptorSets(EPBP_COMPUTE, gpuComputePipeline->getLayout(), 2u, 1u, &descriptorSet2.get());
560562
cb->dispatch(dispatchInfo.workGroupCount[0], dispatchInfo.workGroupCount[1], dispatchInfo.workGroupCount[2]);
561563
}
562564
// TODO: tone mapping and stuff
@@ -627,7 +629,7 @@ int main()
627629
imageBarriers[0].barrier.srcAccessMask = asset::EAF_TRANSFER_WRITE_BIT;
628630
imageBarriers[0].barrier.dstAccessMask = static_cast<asset::E_ACCESS_FLAGS>(0u);
629631
imageBarriers[0].oldLayout = asset::EIL_TRANSFER_DST_OPTIMAL;
630-
imageBarriers[0].newLayout = asset::EIL_PRESENT_SRC_KHR;
632+
imageBarriers[0].newLayout = asset::EIL_PRESENT_SRC;
631633
imageBarriers[0].srcQueueFamilyIndex = graphicsCmdPoolQueueFamIdx;
632634
imageBarriers[0].dstQueueFamilyIndex = graphicsCmdPoolQueueFamIdx;
633635
imageBarriers[0].image = dstImgViewCreationParams.image;

0 commit comments

Comments
 (0)