summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric Nugteren <web@cedricnugteren.nl>2019-05-07 20:47:50 +0200
committerCedric Nugteren <web@cedricnugteren.nl>2019-05-07 20:47:50 +0200
commitc5a82f6978b3c459d70a04f0bf3904b424c867b5 (patch)
tree0aafdfc46a8cf50d36bd174b5ccbfc61e4b9e3ae
parentc6ba86cdc3da8ab9599fff5483cedbe5b1422687 (diff)
Added a host-code check to make sure the avc_motion_estimation is available
-rw-r--r--src/utilities/compile.cpp1
-rw-r--r--src/utilities/utilities.hpp1
2 files changed, 2 insertions, 0 deletions
diff --git a/src/utilities/compile.cpp b/src/utilities/compile.cpp
index 00cb90cb..46cef1d7 100644
--- a/src/utilities/compile.cpp
+++ b/src/utilities/compile.cpp
@@ -60,6 +60,7 @@ std::shared_ptr<Program> CompileFromSource(
// For Intel GPUs with subgroup support, use subgroup shuffling.
if (device.IsGPU() && device.HasExtension(kKhronosIntelSubgroups) &&
+ device.HasExtension(kKhronosIntelAvcMotionEstimation) &&
(precision == Precision::kSingle || precision == Precision::kHalf)) {
header_string += "#define USE_SUBGROUP_SHUFFLING 1\n";
header_string += "#define SUBGROUP_SHUFFLING_INTEL 1\n";
diff --git a/src/utilities/utilities.hpp b/src/utilities/utilities.hpp
index 23486d35..77221277 100644
--- a/src/utilities/utilities.hpp
+++ b/src/utilities/utilities.hpp
@@ -48,6 +48,7 @@ using double2 = std::complex<double>;
const std::string kKhronosAttributesAMD = "cl_amd_device_attribute_query";
const std::string kKhronosAttributesNVIDIA = "cl_nv_device_attribute_query";
const std::string kKhronosIntelSubgroups = "cl_intel_subgroups";
+const std::string kKhronosIntelAvcMotionEstimation = "cl_intel_device_side_avc_motion_estimation";
// Catched an unknown error
constexpr auto kUnknownError = -999;