Skip to content

Commit eb5274b

Browse files
committed
add a few additional missing SPIR-V query cases
1 parent deea8f5 commit eb5274b

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

layers/12_spirvqueriesemu/emulate.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -343,13 +343,15 @@ struct SLayerContext
343343
}
344344

345345
// Required for OpenCL 2.2 devices.
346-
if (deviceVersion == CL_MAKE_VERSION(2, 2, 0)) {
346+
if (deviceILVersion.find("SPIR-V_1.1") != std::string::npos &&
347+
deviceVersion == CL_MAKE_VERSION(2, 2, 0)) {
347348
deviceInfo.Capabilities.push_back(spv::CapabilityPipeStorage);
348349
}
349350

350351
// Required for OpenCL 2.2, or OpenCL 3.0 devices supporting sub-groups.
351-
if (deviceVersion == CL_MAKE_VERSION(2, 2, 0) ||
352-
(deviceVersion >= CL_MAKE_VERSION(3, 0, 0) && deviceMaxNumSubGroups != 0)) {
352+
if (deviceILVersion.find("SPIR-V_1.1") != std::string::npos &&
353+
(deviceVersion == CL_MAKE_VERSION(2, 2, 0) ||
354+
(deviceVersion >= CL_MAKE_VERSION(3, 0, 0) && deviceMaxNumSubGroups != 0))) {
353355
deviceInfo.Capabilities.push_back(spv::CapabilitySubgroupDispatch);
354356
}
355357

@@ -497,7 +499,7 @@ struct SLayerContext
497499
// Required for devices supporting cl_ext_float_atomics and fp64 atomic adds.
498500
if (checkStringForExtension(deviceExtensions.c_str(), "cl_ext_float_atomics") &&
499501
(deviceFp64AtomicCapabilities & (CL_DEVICE_GLOBAL_FP_ATOMIC_ADD_EXT | CL_DEVICE_LOCAL_FP_ATOMIC_ADD_EXT))) {
500-
deviceInfo.Capabilities.push_back(spv::CapabilityAtomicFloat64MinMaxEXT);
502+
deviceInfo.Capabilities.push_back(spv::CapabilityAtomicFloat64AddEXT);
501503
}
502504

503505
// Required for devices supporting cl_ext_float_atomics and fp64 atomic min and max.

0 commit comments

Comments
 (0)