summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers/clover/api/transfer.cpp
diff options
context:
space:
mode:
authorTom Stellard <[email protected]>2014-07-25 17:12:28 -0400
committerTom Stellard <[email protected]>2014-07-28 10:10:30 -0400
commit3d636b47859ba084799a4caa34d22e622487f89e (patch)
treeb3d404f9a4f2c790154246a26753b586ebe56de1 /src/gallium/state_trackers/clover/api/transfer.cpp
parent7f96bea5bcb99c7eafac2bb17dfd5c5c26e6ae33 (diff)
clover: Add checks for image support to the image functions v2
Most image functions are required to return a CL_INVALID_OPERATION error when used on devices without image support. v2: - Simplified the code Reviewed-by: Francisco Jerez <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers/clover/api/transfer.cpp')
-rw-r--r--src/gallium/state_trackers/clover/api/transfer.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/clover/api/transfer.cpp b/src/gallium/state_trackers/clover/api/transfer.cpp
index 404ceb028b4..07d8a7307f2 100644
--- a/src/gallium/state_trackers/clover/api/transfer.cpp
+++ b/src/gallium/state_trackers/clover/api/transfer.cpp
@@ -101,6 +101,9 @@ namespace {
const vector_t &orig, const vector_t &region) {
vector_t size = { img.width(), img.height(), img.depth() };
+ if (!q.device().image_support())
+ throw error(CL_INVALID_OPERATION);
+
if (img.context() != q.context())
throw error(CL_INVALID_CONTEXT);