From 2204c358efd115c4d0bbadc21a4913ae3d002de0 Mon Sep 17 00:00:00 2001 From: Mike Smith Date: Mon, 8 Apr 2024 13:13:46 +0800 Subject: [PATCH] fix python export commands --- src/ext/EASTL | 2 +- src/py/export_commands.cpp | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/ext/EASTL b/src/ext/EASTL index 9d910b6a5..e85cf6f39 160000 --- a/src/ext/EASTL +++ b/src/ext/EASTL @@ -1 +1 @@ -Subproject commit 9d910b6a53d547a8a1f032ea439b04afb99205bc +Subproject commit e85cf6f396a81e49779caebd7295c02c72a048b0 diff --git a/src/py/export_commands.cpp b/src/py/export_commands.cpp index 12f92b959..e9b03f714 100644 --- a/src/py/export_commands.cpp +++ b/src/py/export_commands.cpp @@ -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_(m, "BufferUploadCommand")