summaryrefslogtreecommitdiff
path: root/src/gpu-compute/cl_driver.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu-compute/cl_driver.cc')
-rw-r--r--src/gpu-compute/cl_driver.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gpu-compute/cl_driver.cc b/src/gpu-compute/cl_driver.cc
index 41ae3ab9a..119091fc5 100644
--- a/src/gpu-compute/cl_driver.cc
+++ b/src/gpu-compute/cl_driver.cc
@@ -35,6 +35,8 @@
#include "gpu-compute/cl_driver.hh"
+#include <memory>
+
#include "base/intmath.hh"
#include "cpu/thread_context.hh"
#include "gpu-compute/dispatcher.hh"
@@ -93,11 +95,10 @@ ClDriver::handshake(GpuDispatcher *_dispatcher)
int
ClDriver::open(Process *p, ThreadContext *tc, int mode, int flags)
{
- int fd = p->allocFD(-1, filename, 0, 0, false);
- FDEntry *fde = p->getFDEntry(fd);
- fde->driver = this;
-
- return fd;
+ std::shared_ptr<DeviceFDEntry> fdp;
+ fdp = std::make_shared<DeviceFDEntry>(this, filename);
+ int tgt_fd = p->fds->allocFD(fdp);
+ return tgt_fd;
}
int