aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/state_trackers/clover')
-rw-r--r--src/gallium/state_trackers/clover/core/resource.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/clover/core/resource.cpp b/src/gallium/state_trackers/clover/core/resource.cpp
index 0c671f47388..80bcd2a851a 100644
--- a/src/gallium/state_trackers/clover/core/resource.cpp
+++ b/src/gallium/state_trackers/clover/core/resource.cpp
@@ -177,14 +177,10 @@ mapping::mapping(command_queue &q, resource &r,
(flags & CL_MAP_READ ? PIPE_TRANSFER_READ : 0 ) |
(blocking ? PIPE_TRANSFER_UNSYNCHRONIZED : 0));
- pxfer = pctx->get_transfer(pctx, r.pipe, 0, usage,
- box(origin + r.offset, region));
- if (!pxfer)
- throw error(CL_OUT_OF_RESOURCES);
-
- p = pctx->transfer_map(pctx, pxfer);
+ p = pctx->transfer_map(pctx, r.pipe, 0, usage,
+ box(origin + r.offset, region), &pxfer);
if (!p) {
- pctx->transfer_destroy(pctx, pxfer);
+ pxfer = NULL;
throw error(CL_OUT_OF_RESOURCES);
}
}
@@ -198,6 +194,5 @@ mapping::mapping(mapping &&m) :
mapping::~mapping() {
if (pxfer) {
pctx->transfer_unmap(pctx, pxfer);
- pctx->transfer_destroy(pctx, pxfer);
}
}