Skip to content

Commit

Permalink
fix python export commands
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike-Leo-Smith committed Apr 8, 2024
1 parent ac1a5ec commit 2204c35
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ext/EASTL
Submodule EASTL updated 1 files
+1 −1 CMakeLists.txt
11 changes: 5 additions & 6 deletions src/py/export_commands.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,12 @@ void export_commands(py::module &m) {
pyref)
.def("set_dispatch_size", [](ComputeDispatchCmdEncoder &self, uint32_t sx, uint32_t sy, uint32_t sz) { self.set_dispatch_size(uint3{sx, sy, sz}); })
.def("set_dispatch_buffer", [](ComputeDispatchCmdEncoder &self, uint64_t handle, uint32_t offset, uint32_t size) { self.set_dispatch_size(IndirectDispatchArg{handle, offset, size}); })
.def("encode_buffer", &ComputeDispatchCmdEncoder::encode_buffer)
.def("encode_texture", &ComputeDispatchCmdEncoder::encode_texture)
.def("encode_buffer", [](ComputeDispatchCmdEncoder &self, uint64_t handle, size_t offset, size_t size) { self.encode_buffer(handle, offset, size); })
.def("encode_texture", [](ComputeDispatchCmdEncoder &self, uint64_t handle, uint32_t level) { self.encode_texture(handle, level); })
.def("encode_uniform", [](ComputeDispatchCmdEncoder &self, char *buf, size_t size) { self.encode_uniform(buf, size); })
.def("encode_bindless_array", &ComputeDispatchCmdEncoder::encode_bindless_array)
.def("encode_accel", &ComputeDispatchCmdEncoder::encode_accel)
.def(
"build", [](ComputeDispatchCmdEncoder &c) { return std::move(c).build().release(); }, pyref);
.def("encode_bindless_array", [](ComputeDispatchCmdEncoder &self, uint64_t handle) { self.encode_bindless_array(handle); })
.def("encode_accel", [](ComputeDispatchCmdEncoder &self, uint64_t handle) { self.encode_accel(handle); })
.def("build", [](ComputeDispatchCmdEncoder &c) { return std::move(c).build().release(); }, pyref);
// buffer operation commands
// Pybind can't deduce argument list of the create function, so using lambda to inform it
py::class_<BufferUploadCommand, Command>(m, "BufferUploadCommand")
Expand Down

0 comments on commit 2204c35

Please sign in to comment.