| 707 | } |
| 708 | |
| 709 | FALCOR_SCRIPT_BINDING(CopyContext) |
| 710 | { |
| 711 | using namespace pybind11::literals; |
| 712 | |
| 713 | FALCOR_SCRIPT_BINDING_DEPENDENCY(Resource) |
| 714 | FALCOR_SCRIPT_BINDING_DEPENDENCY(Buffer) |
| 715 | FALCOR_SCRIPT_BINDING_DEPENDENCY(Texture) |
| 716 | |
| 717 | pybind11::class_<CopyContext> copyContext(m, "CopyContext"); |
| 718 | |
| 719 | copyContext.def("submit", &CopyContext::submit, "wait"_a = false); |
| 720 | |
| 721 | #if FALCOR_HAS_CUDA |
| 722 | copyContext.def( |
| 723 | "wait_for_cuda", |
| 724 | [](CopyContext& self, uint64_t stream = 0) { self.waitForCuda(reinterpret_cast<cudaStream_t>(stream)); }, |
| 725 | "stream"_a = 0 |
| 726 | ); |
| 727 | copyContext.def( |
| 728 | "wait_for_falcor", |
| 729 | [](CopyContext& self, uint64_t stream = 0) { self.waitForFalcor(reinterpret_cast<cudaStream_t>(stream)); }, |
| 730 | "stream"_a = 0 |
| 731 | ); |
| 732 | #endif |
| 733 | |
| 734 | copyContext.def("uav_barrier", &CopyContext::uavBarrier, "resource"_a); |
| 735 | copyContext.def("copy_resource", &CopyContext::copyResource, "dst"_a, "src"_a); |
| 736 | copyContext.def("copy_subresource", &CopyContext::copySubresource, "dst"_a, "dst_subresource_idx"_a, "src"_a, "src_subresource_idx"_a); |
| 737 | copyContext.def("copy_buffer_region", &CopyContext::copyBufferRegion, "dst"_a, "dst_offset"_a, "src"_a, "src_offset"_a, "num_bytes"_a); |
| 738 | } |
| 739 | |
| 740 | FALCOR_SCRIPT_BINDING(ComputeContext) |
| 741 | { |
nothing calls this directly
no test coverage detected