mirror of
https://github.com/ZDoom/ZDRay.git
synced 2024-11-22 03:51:26 +00:00
Move pipeline barrier to a more logical location
This commit is contained in:
parent
6e8757649c
commit
b67f265c75
1 changed files with 4 additions and 4 deletions
|
@ -148,10 +148,6 @@ void GPURaytracer2::CreateVulkanObjects()
|
||||||
CreatePipeline();
|
CreatePipeline();
|
||||||
CreateDescriptorSet();
|
CreateDescriptorSet();
|
||||||
|
|
||||||
PipelineBarrier()
|
|
||||||
.AddMemory(VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR)
|
|
||||||
.Execute(cmdbuffer.get(), VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
|
|
||||||
|
|
||||||
FinishCommands();
|
FinishCommands();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,6 +394,10 @@ void GPURaytracer2::CreateTopLevelAccelerationStructure()
|
||||||
rangeInfo.primitiveCount = maxInstanceCount;
|
rangeInfo.primitiveCount = maxInstanceCount;
|
||||||
|
|
||||||
cmdbuffer->buildAccelerationStructures(1, &buildInfo, rangeInfos);
|
cmdbuffer->buildAccelerationStructures(1, &buildInfo, rangeInfos);
|
||||||
|
|
||||||
|
PipelineBarrier()
|
||||||
|
.AddMemory(VK_ACCESS_ACCELERATION_STRUCTURE_WRITE_BIT_KHR, VK_ACCESS_ACCELERATION_STRUCTURE_READ_BIT_KHR)
|
||||||
|
.Execute(cmdbuffer.get(), VK_PIPELINE_STAGE_ACCELERATION_STRUCTURE_BUILD_BIT_KHR, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GPURaytracer2::CreateShaders()
|
void GPURaytracer2::CreateShaders()
|
||||||
|
|
Loading…
Reference in a new issue